[Thread Prev][Thread Next][Index]

Re: [ferret_users] RCM limited area rotated lat-lon grid



Hi Ron,
If you know of a mathematical translation to take your longitude-latitude grid to the set of coordinates that you want to use, you may be able to do the kinds of things that the map projection scripts do to translate between the coordinates in your grid to locations on the plot page corresponding to the grid you want to use. Take a look at some of the map projection scripts.  Find them with

% Fgo mp

will tell you the location of all the mp*.jnl scripts, and then you can look at the contents of say, mp_mercator.jnl, mp_polyconic.jnl, etc. to see how that is done.

Or, in a less elegant method, you could define your desired output grid and use one of the scatter-to-grid functions, treating your input data as if it's just at scattered XY locations.  The trick here is to put the XY points of the input grid on a single x axis, just an index axis with length NX* NY, but keeping its Z and T variations intact.

If the variable in your dataset is "var", then this would look like this
yes? ! The x and y locations, each in a 1D list, defining the
yes? ! "scattered" point locations
yes? LET xpts = XSEQUENCE(x[gx=var] + 0*y[gy=var])
yes? LET ypts = XSEQUENCE(0*x[gx=var] + y[gy=var])

yes? ! We  also need the variable, on this 1D index axis in the
yes? ! XY directions, with the original Z and T variation.

yes? ! Define an index axis
yes? LET nxy = `var,RETURN=isize`* `var,RETURN=jsize`
yes? DEFINE AXIS/X=1:`nxy`:1 xindex

yes? ! define the variable on the Xindex,Z,T grid,
yes? ! Reshape var to the grid of xytpts

yes? LET xytpts = x[gx=xindex] + z[gz=var] + t[gt=var]
yes? LET varpts = RESHAPE(var, xytpts)


Now xpts, ypts, and varpts are scattered points which can be used in a function like scat2gridgauss_xy, with whatever output grid you want to define.

Ansley

Ron Kahana wrote:
Dear ferret users,

I want to plot the output from a regional model with a limited lat-lon grid and rotated pole (HadRM3 rcm)
on a 'real' lat-lon grid, and then calculate average values over specific regions.

the netcdf grid is:

name    axis                    # pts            start                            end
X        LONGITUDE     229mr        50.191W(309.11)        49.999E(410)
Y        LATITUDE        132 r            32.307S                        25.66N
HT      Z (m)                    1 r                -1                                -1
T        TIME                    480 r            16-JAN-2991 00:00    16-DEC-3030  00:00


I assume it is not a curvilinear grid and I'm able to plot it using map projections, but not on
an un-rotated 'real' grid.

Can you help me with that?
Many Thanks,
Ron

--
Ron Kahana
BRIDGE - Bristol Research Initiative for the Dynamic Global Environment
School of Geographical Sciences
University of Bristol BS8 1SS
t: +44(0)117 9288808
f: +44(0)117 9287878
http://www.ggy.bris.ac.uk/staff/staff_kahana.html
  


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement