[Thread Prev][Thread Next][Index]

question on regridding crossing Greenwich



Many apologies for the novice question but our local ferret expert is
away for some time.  I am trying to regrid a 1x1 degree dataset onto
a 10x8 degree grid with the slight complication that the gridboxes
cross the Greenwich, i.e the first is  centred at 2.5e and so pokes
into the western hemisphere.  
Here is the script I am using
----------------------------------------------------------------------
define axis/x=0.5:359.5:1/modulo bigx
define axis/x=2.5e:352.5e:10/modulo xaxis
define axis/y=-84:84:8 yaxis
define grid/x=xaxis/y=yaxis newgrid
use lloyd.nc ! the 1x1 dataset
let ll2 = lloydveg[gx=bigx]
let lloydlow = ll2[g=newgrid@ave]
statistics lloydlow
save/file=lloydlow.nc lloydlow
----------------------------------------------------------------------
and here is the output from the statistics command
----------------------------------------------------------------------
             LL2[G=NEWGRID@AVE]
             X: 7.5 to 357.5
             Y: -88 to 88
             Z:  N/A
             T: 01-JAN      00:00:14 to 350
             DATA SET: ./lloyd.nc
 
 Total # of data points: 9240 (35*22*1*12)
 # flagged as bad  data: 0
 Minimum value: -1854.2
 Maximum value: 956.18
 Mean    value: 0.13159      (unweighted average)
 Standard deviation: 146.27
----------------------------------------------------------------------
I'm presumably isunderstanding something pretty simple since this
isn't what I want.  I would have hoped for 36 points in longitude not
35 as I appear to have got and similarly would have hoped for the new
field to be defined from say 357.5e to 357.5e.  If I change the
definition of xaxis to be from 5:355:10/modulo this doesn't seem to
happen.  In the unlikely event it turns out to be a bug rather than
something stupid I'm doing, I'm running version 4.45.

Any help greatly appreciated
Peter Rayner


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement