diagonal cross section
Patrick C. Pyle
pcpyle at NCSU.EDU
Mon Dec 19 09:59:10 EST 2005
Frank,
Thanks for sharing this script. It works nicely. This will save a lot of
headache. I will let you know if I have any further questions!
Patrick
> I had a lot of trouble making arbitrary cross-sections, but have had
> success using a script that George Bryan at PSU put together. Here's
> one example that you should be able to modify. It's quite easy to add
> variables by making additional collections, and even to make calculations.
>
> Frank
>
> *------------------------------------------------------------------
> * GrADS script: crs.gs
> *
> * Script purpose: (see below)
> *
> * Author: unknown. Provided by Bob Hart or Sytske Kimball (I can't
> * remember which).
> *
> * Last modified: 10 July 2000 by George H. Bryan (PSU)
> *
> *********************************************************************
> * The following lines will display an arbitrary X section
> * from one specified point to another.
> *
> * lon1 is the westernmost longitude point
> * lon2 is the easternmost longitude point
> * lat1 is the latitude that corresponds to lon1
> * lat2 is the latitude that corresponds to lon2
> *
> * The loop is used to interpolate between points in
> * the arbitrary cross section. This code will plot
> * any cross section as long as you specify the points.
> * My code plots cross sections of PV after I calculated
> * PV on 11 pressure surfaces. I have another script
> * that plots cross sections of potential temperature, and
> * the code is very similar to this, except theta is substituted
> * for PV.
> *
> * Many thanks to Brian Doty at COLA for his help with this code.
> *
> *******************************************************************
> ****CHANGED THIS TO ENHANCE FLEXIBILITY
> ***you have to preset the dimensions, t,z,lat,lon
> say 'variable'
> pull var
> say 'using which contour interval'
> pull civ
> *extract the data to fix the x-section
> 'set lat 40 43'
> 'set lon -70 -66'
> 'q dim'
> rec1=sublin(result,2)
> lon11=subwrd(rec1,6)
> lon12=subwrd(rec1,8)
> x11=subwrd(rec1,11)
> x12=subwrd(rec1,13)
> rec2=sublin(result,3)
> lat11=subwrd(rec2,6)
> lat12=subwrd(rec2,8)
> y11=subwrd(rec2,11)
> y12=subwrd(rec2,13)
> dum=sublin(result,5)
> time=subwrd(dum,6)
> *say time
> t1=1
> t2=25
> while(t1<=t2)
>
> lon1=lon11
> lon2=lon12
> lat1=lat11
> lat2=lat12
> ztop=15
More information about the gradsusr
mailing list