[Thread Prev][Thread Next][Index]

Re: [ferret_users] vertical transect of slightly skewed grid



Hi Jessie,
The 3-argument plot commands are using the longitude/latitude coordinate variables entirely within the graphics portion of Ferret to draw on the page using the curvilinear coordinate values. The 1-D X and Y axes that form the grid of curvilinear coordinate variables is in abstract index space.  The longitudes and latitudes that are labeled on an XY plot are coming from the units of the 2D longitude and latitude curvilinear variables.

If I understand what you're doing correctly, if you know the latitude values that correspond to the indices on your plot, you can RESHAPE your result onto a grid that has Y axis defined in terms of latitude that correspond to the index values (or put it onto a latitude-y axis using @ASN). Say for instance,  if your variable is VAR, your curvilinear coordinate variables are lon2d and lat2d, then
yes? define axis/y/units=degrees_north ylat = lon2d[i=7]
yes? shade/t=1-jan-1990 var[i=7,gy=ylat@ASN]
More generally to use the coordinates for other computations or for graphics in other than the XY direction you would need to use function calls, such as SAMPLEXY_CURV. Call SAMPLEXY_CURV with a set of X points and Y points that lie along the line of constant longitude you want to use.  The function SAMPLEXY_CURV returns the result on an abstract axis in X and so you need to put the result onto an axis that has units of latitude.  The outline of the commands, just making up some numbers to use,
yes? define axis/y=1:31:0.2/units=degrees_north yaxpts
yes? let ypts_sample = y[gy=yaxpts]  ! a set of points along the Y latitude line
yes? let xpts_sample = 32.5 + ypts_sample  ! a set of points at a single X longitude

yes? let sampled_var = SAMPLEXY_CURV (var, lon, lat, xpts_sample, ypts_sample)
And then you'd need to assign or reshape that onto a grid with a Y (or X) axis, as I did above.



On 12/4/2010 12:20 PM, CAPT Carman wrote:
Ferreters,
I'm trying to make vertical transects of model output that is on a very slightly skewed grid; the skew is slight enough that to pick the longitude I want it's sufficient to just identify the right i value.  But the skew is enough that ferret won't plot the transect by calling the longitude.
 
The problem is, ferret then doesn't seem to properly label the x axis with latitudes (or I haven't found the right syntax).  It keeps putting the j values along the x axis.
 
The model output data is a 3-d array of my variable, and 2-d arrays of lat and lon, with a 1-d array of depth.  So if I use
>shade/k=1 uvel,lon,lat
it will properly plot the data; is there some way to get ferret to do that in the vertical as well?
 
Thanks,
Jessie

[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement