[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help! Hawaii lost

Hi again,

   I felt really proud about my little regridding program until a
colleague pointed out that there is no Hawaii left on the grid he
is using. Technically speaking, the problem is the proper
interpolation of a fractional land-sea mask. Here is what I am
currently doing:

   ;; Convert outlon and outlat to fractional index values
   s = size(data,/Dimensions)
   nlon = N_Elements(newgrid.lon)
   nlat = N_Elements(newgrid.lat)
   ilon = newgrid.lon/360. * s[0]
   ilat = (newgrid.lat+90.)/180. * s[1]
   resultl = interpolate( data, ilon, ilat, /GRID )

Data is a 720x360 points fractional landcover mask which I want
to regrid (i.e. interpolate) to a 128x64 element grid ("quasi
T42"). Neither interpolate nor bilinear seem to recognize the
islands, depending on the exact values of newgrid.lon (and maybe
newgrid.lat). It appears that these guys just pick the values
that are closest to the destination grid and interpolate between
those. I know there must be a different function which should do
a better job with this, but what could this be? A median filter
or something like this? What is "kriging" by the way? I didn't
find the online help too informative about this.

Thanks for any help,

[[ Dr. Martin Schultz   Max-Planck-Institut fuer Meteorologie   
[[                      Bundesstr. 55, 20146 Hamburg            
[[                      phone: +49 40 41173-308                 
[[                      fax:   +49 40 41173-298                 
[[ martin.schultz@dkrz.de