average and map plot of data on irregular grids

From: H.Dang <danghy_at_nyahnyahspammersnyahnyah>
Date: Thu Mar 28 2013 - 09:50:14 MDT

Hi dear all,

I have data from several months of different years and want to do monthly
average of them. All data are on different geolocations, which is
indicated by latitude and longitude of these location. The data is like
this:

netcdf YaleE2_avkCO_200607 {
dimensions:
TES_pressure = 14 ;
good_grid_targets = 50504 ;
variables:
float TES_pressure(TES_pressure) ;
TES_pressure:long_name = "full retrieval pressure grid. Actual pressure
grid varies depending on surface pressure." ;
 TES_pressure:units = ;
int good_grid_targets(good_grid_targets) ;
good_grid_targets:_FillValue = -2147483647 ;
 good_grid_targets:long_name = "number of individual points sampled by TES"
;
good_grid_targets:units = ;
 float good_latitude(good_grid_targets) ;
good_latitude:missing_value = -999.f ;
 good_latitude:_fillvalue = -999.f ;
good_latitude:units = "degrees_north" ;
 good_latitude:long_name = "latitude" ;
good_latitude:_FillValue = 9.96921e+36f ;
 float good_longitude(good_grid_targets) ;
good_longitude:missing_value = -999.f ;
 good_longitude:_fillvalue = -999.f ;
good_longitude:units = "degrees_east" ;
 good_longitude:long_name = "longitude" ;
good_longitude:_FillValue = 9.96921e+36f ;
 float *YaleE2_TESavk_CO(good_grid_targets, TES_pressure)* ;
YaleE2_TESavk_CO:units = "volume mixing ratio relative to dry air" ;
 YaleE2_TESavk_CO:long_name = "Yale_E2 CO smoothed by TES operator" ;
YaleE2_TESavk_CO:_FillValue = 9.96921e+36f ;

I'm not interpolate them to regular grids such as 144*90 because the
process is super slow, probably one file needs several hours. The
algorithm I used is:

 91 TES_on_YaleE2_grid = new((/14,90,144/),"float")
                           ; TES_CO has 14 levels
 92 TES_on_YaleE2_grid = 0.0
 93 targets_InEachGrid = new((/90,144/),"float")
 94 targets_InEachGrid = 0.0
 95
 96 do igeo = 0, 50504; TES_data_number-1
 97 good_lat = TES_good_lat(igeo)
 98 good_lon = TES_good_lon(igeo)
 99 do ilat = 0,89
100 do ilon = 0+1, 144-1-1
101
102
 if(good_lat.ge.YaleE2_lat(ilat-1).and.good_lat.le.YaleE2_lat(ilat+1).and.
 \
103
good_lon.ge.YaleE2_lon(ilon-1).and.good_lon.le.YaleE2_lon(ilon+1)) then
104 targets_InEachGrid(ilat,ilon) = targets_InEachGrid(ilat,ilon)
+ 1
105 TES_on_YaleE2_grid(:,ilat,ilon) =
TES_on_YaleE2_grid(:,ilat,ilon) + TES_good_CO(igeo,:)
106 end if
107
108 end do ; ilon
109 end do ; ilat
110 end do ; igeo
111 ;
112 do ilev = 0,14-1
113 TES_on_YaleE2(ilev,:,:) = TES_on_YaleE2_grid(ilev,:,:) /
targets_InEachGrid(:,:)
114 end do

Probably my algorithm made the interpolation too slow, but if there are
other good ideas to do average, to make map plots, or pick up data freely,
I would like to keep the data irregular.

The latitude&longitudes in every data file are different, I guess I must
adjust all the data to the same sets of lat&lon to do average? So I wonder
if there is a function or a better idea to fulfill this task.

I appreciate any suggestions!

Hongyan

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 28 09:51:05 2013

This archive was generated by hypermail 2.1.8 : Mon Apr 15 2013 - 20:12:25 MDT