# Help! Hawaii lost

• Subject: Help! Hawaii lost
• From: Martin Schultz <martin.schultz(at)dkrz.de>
• Date: Mon, 04 Sep 2000 15:36:59 +0200
• Newsgroups: comp.lang.idl-pvwave
• Organization: Max-Planck-Institut fuer Meteorologie, Hamburg
• Xref: news.doit.wisc.edu comp.lang.idl-pvwave:21265

```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

Thanks for any help,
Martin

--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
[[ 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
[[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[

```