[Thread Prev][Thread Next][Index]

Re: how to display the vertical section along latitude afterusingsamplexy ?

Hello Xin,
I think you have this mostly correct.  You do not need the variable
"section".  The variable x_var is the profile, which just needs to be
reshaped to a grid defined by your new latitude axis and the original
Z axis of the variable "temp".

Here is a similar example I made up.  I find that using the STAT
command helps me see the direction and size of the axes of the

Note that this only makes sense if my_lon is monotonic.   If my_lon
and my_lat were a ship track that went first north then south, for
example, then the axis definition doesn't make sense, and you are
better off just looking at x_var = samplexy(temp, my_lon, my_lat)


USE levitus_climatology
LET my_lon = {181,185,189,191,193,197,201,203,204,205,210,211}
LET my_lat = { 11, 15, 17, 19, 23, 25, 29, 31, 33, 37, 43, 45}

LET x_var = samplexy(temp, my_lon, my_lat)
STAT x_var

DEFINE AXIS/Y/UNITS=degrees yaxsec=y_lat

LET y_profile =  RESHAPE(x_var, Y[gy=yaxsec] + Z[gz=temp])
SHADE y_profile

STAT y[gy=yaxsec] + k[gz=temp]
STAT y_profile

Ansley Manke

Xin Jin wrote:

Hi Ferreters,

I have used the function of Samplexy to  Subsample gridded fields onto profile coordinates as follow

yes? let my_lon = lon1[d=my_grid.dat]
yes? let my_lat = lat1[d=my_grid.dat]

yes? LET x_var = samplexy(temp ,my_lon,my_lat)

and I can display the vertical section well along the axis's number.

When I try to use latitude as x-axis as follow

let order = SORTI(my_lat)

let section = SAMPLEI(x_var, order)

DEFINE AXIS/Y/NAME=yax_sect/FROM_DATA/UNITS=degrees SAMPLEI(my_lat, order)

LET ysection = RESHAPE(section,Y[gy=yax_sect]+Z)

contour ysection
 **ERROR: unknown defining grid: GY=YAX_SECT --> g=user-or-pseudo-var not allowed
That is the problem.
Xin Jin
Inst.of Geophysics and Planetary Physics
University of California Los Angeles
5845 Slichter Hall
Los Angeles, CA 90095-4996, USA
phone: (310) 825 4526
fax  : (310) 206 3051
email: xjin@igpp.ucla.edu

Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement