[Thread Prev][Thread Next][Index]
Re: weird regridding behavior
Denise,
The striping you end up with with the "air[gx=xax@mod,gy=yax]" is
beyond my comprehension (Steve Hankin?), however the fix for the overall
regridding is simple. The problem comes up in the ambiguity of the region you
are asking for.
When you say simply "air[g=gfine]", ferret assumes you mean to use the region
of "air" which is 0E:2.5W, and thus when you regrid using gfine, the last
longitude (2W) isn't part of that region. This is true even though both axis
are modulo since modulo just ALLOWS you to wrap around. ferret doesn't try to
guess every situation where you want to wrap around, you have to ask for this.
So, the answer to your question is just to specify the region of the
target grid "air[x=0:358,g=gfine], and this will give you the full 180*26 grid
you want.
Mark
On Sep 2, 11:12am, Denise Worthen wrote:
> Subject: weird regridding behavior
>
> I'm using Ferret 4.91 on an SGI irix64 6.2 (had no luck installing v5.0).
>
> I have a series of NCEP/NCAR daily reanalysis netCDF files. I want to
> regrid them to a 2x2 degree grid, from a 2.5x2.5 degree grid. The
> original grid is:
>
> yes? show grid air
> GRID GMH1
> name axis # pts start end
> LON LONGITUDE 144mr 0E 2.5W
> LAT LATITUDE 73 r 90S 90N
> normal Z
> TIME TIME 365 r 03-JAN-1978 00:00 02-JAN-1979
> 00:00
>
> (The days are off by 2 because of the udunits issue.)
>
> The grid I defined is:
>
> define axis/x=0:358:2/unit=degrees/modulo xax
> define axis/y=90s:40s:2/unit=degrees yax
> define grid/x=xax/y=yax gfine
>
> I've tried two methods to get what I want using the new grid and neither
> work.
>
> The first thing I tried was to regrid directly onto grid gfine
> "air[g=gfine]". But I get one less than the expected dimension in X (ie,
> 179 values, from 0e to 356 by 2.
>
> Since both the orignal and new grid are defined modulo in X I don't
> understand why the regridding won't act the way I expect, ie, to give 180
> values in X, using the modulo function to interpolate between 357.5 and
> 0.0. On the other hand, at least there are no missing values in longitude
> (not that I expect any, but see below):
>
> yes? list/y=60s/l=1 air
> mean Daily Air temperature at sigma leve (degK)
> regrid: 2 deg on X, 2 deg on Y
> TIME: 03-JAN-1978 00:00
> DATA SET: ./regrid_1.cdf
> 60S
> 16
> 0E / 1: 272.5
> 2E / 2: 272.5
> 4E / 3: 272.4
> 6E / 4: 272.3
> 8E / 5: 272.3
> 10E / 6: 272.4
> 12E / 7: 272.5
> 14E / 8: 272.6
> 16E / 9: 272.6
> 18E / 10: 272.5
>
> The second way I tried was to explicity tell ferret to regrid on the X
> axis using modulo regridding "air[gx=xax@mod,gy=yax]". In this case I get
> regridded values with the expected dimensions in X (ie, 180 values, from 0
> to 358 by 2) but, every 5th value comes up missing:
>
> yes? list/y=60s/l=1 air
> mean Daily Air temperature at sigma leve (degK)
> regrid: 2 deg on X@MOD, 2 deg on Y@LIN
> TIME: 03-JAN-1978 00:00
> DATA SET: ./regrid_2.cdf
> 60S
> 16
> 0E / 1: 272.5
> 2E / 2: 272.5
> 4E / 3: ....
> 6E / 4: 272.3
> 8E / 5: 272.3
> 10E / 6: 272.4
> 12E / 7: 272.6
> 14E / 8: ....
> 16E / 9: 272.7
> 18E / 10: 272.5
>
> Does anyone have an explanation for what's going on here? And, more
> importantly, how to get the regridding to do what I want?
>-- End of excerpt from Denise Worthen
--
Mark Verschell NASA/Goddard Space Flight Center
verschell@neptune.gsfc.nasa.gov Code 970/Lab. for Hydrospheric Proc.
301-614-5669 Fax: 301-614-5666 Greenbelt, MD 20771
Better Living Through Denial
** USQC Certified: 100% Microsoft Free **
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement