# pressure level

From: wei huang <whua27_at_nyahnyahspammersnyahnyah>
Date: Wed Jan 26 2011 - 10:08:21 MST

Dear NCL users,

I want to plot a pressure level along y-axis from 1000(bottom) to 300(top),
but when I used the loop(given below), it is created from 1000 t0 200. Could
anyone give me some help how to do it?

thanks

wei

-------

-------

; Create labels

if (FirstTime) then

zz = z/100.

dims = dimsizes(zz)

zmax = -999.

do imax = 1,dims(0)-1

if ( .not.ismissing(zz(imax,1,1)) .and. zz(imax,1,1) .gt. zmax ) then

zmax = zz(imax,1,1)

end if

end do

imax = floattoint(zmax)

zmax = imax/10.

print("Y labels set to: 0 - " + zmax + " km")

FirstTime = False

end if

-------

-------

;Options for XY Plots

opts_xy = res

opts_xy@tiYAxisString = "Pressure (hPa)"

opts_xy@AspectRatio = 0.75

opts_xy@tmYLMode = "Explicit"

opts_xy@tmYLValues = fspan(0,100,10) ; over the 0-100 span of
the Y label

opts_xy@tmYLLabels = fspan(1000,100,10); Corresponding 11
labels

;

Variable: pv

Type: float

Total Size: 4106700 bytes

1026675 values

Number of Dimensions: 3

Dimensions and sizes: [bottom_top | 39] x [south_north | 195] x [west_east
| 135]

Coordinates:

Number Of Attributes: 6

description : Potential Vorticity

units :

FieldType : 104

MemoryOrder : XYZ

stagger :

coordinates : XLONG XLAT

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 26 10:08:28 2011

This archive was generated by hypermail 2.1.8 : Mon Jan 31 2011 - 10:38:24 MST