[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20050909: Drawing a line in gdcross



John,

Low level drawing could be done through gpanot, or to a vgf 
file in NMAP2, but that is likely not to be a pleasant experience,
and even more of a pain should you have to change something along the way.

I'd suggest a small script to create a new variable, say TIDX
(or tropopause index) defined as TIDX = PRES%TROP@0 / PRES 
and iterate this between 1000 mb and 50 mb (as an example)
so you could plot a countour of TIDX=1.

Here is the sample script I ran on the RUC 20km (grid 252 as a test):
--------------------- SNIP --------------------------------
#!/bin/csh -f

@ LEV = 1000
while ( $LEV >= 50 )
   gddiag << EOF
        GDFILE   = ruc_20|1800
        GDOUTF   = testme.ruc
        GFUNC    = quo(pres@0%trop,pres)
        GDATTIM  = f000
        GLEVEL   = ${LEV}
        GVCORD   = pres
        GRDNAM   = TIDX@${LEV}%pres
        GRDTYP   = S
        GPACK    =  
        GRDHDR   =  
        PROJ     = grid
        GRDAREA  =  
        KXKY     =  
        MAXGRD   = 5000
        CPYFIL   = ruc_20|1800
        ANLYSS   = 
        r

        e
EOF
   @ LEV = $LEV - 25
end
--------------------- SNIP --------------------------------

In this script, I'm using GDDIAG and creating a new output file
called testme.ruc which will have levels 1000 mb to 50 mb at 25mb intervals.
On each level there will be a parameter call TIDX which will be less than 1.0
at levels below the tropopause (eg PRES > PRES_TROP ) and will be
greater than 1.0 at levels above the tropopause (and 1.0 at the tropopause
pressure level defined by your PRES@0%TROP grid).

After running this script, I can run GDCROSS to overlay the TIDX
graph such as:

 GDATTIM  = f000
 GVCORD   = pres
 GFUNC    = tidx
 GDFILE   = testme.ruc
 CINT     = -1;1
.... yada yada yada....
 GEMPAK-GDCROSS>

I did this assuming a spatial cross section at a single time (eg f000). Of 
course
you would loop this for each forecast hour. You could write back to your ruc
file instead of creating a new file, but I like keeping my computations out
of original data files. The CINT=-1;1 will draw the contour line at 1.0. You
shouldn't have negative TIDX values, so the -1 is just a place holder.

The contoute I got using the 25 mb intervals looks nice and smooth, with no
difference when I tried 10mb intervals. At 25mb, the step should be
smal enough where you don't need to work about dln(pres) for these purposes.

Hope this suggestion helps!

Steve Chiswell
Unidata User SUpport




>From: John Merrill <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200509091353.j89DrtnX003670

>Hello,
>   Can you tell me how to draw a line in a cross section?
>The specific need I have is to draw the Tropopause conformation
>on a panel in GDCROSS. I'm using RUC fields, which have a grid
>for this: glevel=0, gvcord=trop, gfunc=pres or thta (as you
>well know). I recognize that the data are not in a Pressure
>array, but wonder if I can access a low-level line drawing
>routine in some way? Thanks for any help you can provide.
>        John M.
>
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.