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

19990708: gdvint question



>From: Matt Fearon <address@hidden>
>Organization: .
>Keywords: 199907082132.PAA07857

>I would like to convert pres coordinates to sgma coordinates
>using gdvint for all grid points over the ca region. I am
>using the eta model. I am trying to covert individual pres levels
>to individual sgma levels. I was wondering if this mannerism
>below is correct? Also I am hoping if the level at a certain grid
>point is below ground, the sgma coordinates will indicate that.
>As you can see, I probably need a great deal of help with this.
>Any advice would be greatly appreciated.
>
>
>GDFILE     = /data1/gempak/grids/99061412_eta.gem
>GDOUTF   = /data1/gempak/grids/99061412_eta.gem
>GDATTIM  = f00
>GVCORD   = pres/sgma:.5
>GLEVEL    =  1000-1;900-.9;800-.8;700-.7;600-.6;500-.5
>MAXGRD  =  3000
>GAREA      =  ca
>VCOORD   =  none;mslv;esfc
>
>Thank you,
>Matt Fearon
>address@hidden
>

Matt,

An example to interpolate from pres to sgma coordinates for the ETA, use:
 GVCORD   = pres/sgma:1
 GLEVEL   = 9500-500-500;9950-9550-50
 VCOORD   = none

The sigma:1 says that the top of the atmosphere (sgma=0) will
be at 1 mb. The glevel statement will interpolate to SGMA
levels from .95 to .05 every .05 and from .995 to .955 every .005- in Gempak, 
all sigma levels are displayed as numbers multiplied by 10000 (so this means 
SGMA=9000 is sigma .9). The eta grids on the IDD do not have mslv or esfc 
cordinate 
grids in them, so you don't need them listed in the vcoord variable (this just 
copies
grids on those coordinates into the file).

By definition of a sigma coordinate, SGMA = PRES/Psfc, all of the sigma levels
will be above ground. The pressure value of a sigma level would be:

GFUNC    = mul(quo(sgma,10000),pres@0)

and calculating a lapse rate profile in gdprof could be accomplished with:
GFUNC    = quo(ldf(tmpc),ldf(hght))   in degrees per meter
           or
           mul(quo(ldf(tmpc),ldf(hght)),1000) in degrees per km.


To answer your previous question regarding GFUNC = stab(tmpc) on
pressure coordinates, once you have run the script I provided,
you have the stability function calculated on all the pressure levels.
You can view these values on flat-2D surface with any GD program like
gdlist, gdmap, gdcntr or garp. the gddiag process calculates the function at
every gridpoint in the domain.

Steve Chiswell
Unidata User Support





From address@hidden  Fri Jul  2 18:33:21 1999
        by unidata.ucar.edu (8.8.8/8.8.8) with ESMTP id SAA29370
        for <address@hidden>; Fri, 2 Jul 1999 18:33:20 -0600 (MDT)
        by screen.dri.edu (8.9.1b+Sun/8.9.1) id RAA14343
        for <address@hidden>; Fri, 2 Jul 1999 17:33:19 -0700 (PDT)
        id xma014338; Fri, 2 Jul 99 17:32:44 -0700
        by rotor.dri.edu (8.9.1b+Sun/8.9.1) with ESMTP id RAA29989
        for <address@hidden>; Fri, 2 Jul 1999 17:33:00 -0700 (PDT)
Message-ID: <address@hidden>
Date: Fri, 02 Jul 1999 17:33:18 -0800
From: Matt Fearon <address@hidden>
X-Mailer: Mozilla 4.5 (Macintosh; U; PPC)
X-Accept-Language: en
MIME-Version: 1.0
To: Unidata Support <address@hidden>
Subject: Re: 19990701: stability from model grid
References: <address@hidden>
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; 
x-mac-creator="4D4F5353"
Content-Transfer-Encoding: 7bit

Steve,

The quick script and using gdprof performed great.
I just had an additional question regarding this subject.

** If I wanted to expand this stability calculation beyond an
individual grid point and gather the same information for
all individual grid points in California, would I have to run
gdprof for each individual station in CA or could I run another
gempak program that would allow me to extract this information
more efficiently?

My ulimate goal is to extract the stability info for the entire state of
CA at individual grid points in CA. Once I have the data extracted,
I would then like to create a separate grid file with that info and
contur it at individual levels using garp. I may also use the extracted
stability data further to look at daytime mixing depth.

Hopefully performing this procedure is a possibility. Please let me
know at your convenience.

Thank you,
Matt Fearon
address@hidden


Unidata Support wrote:

> Matt,
>
> I interpreted your previous question as how to calculate a
> sfc to 5km stability (eg a single layer).
>
> The problem you have is that the ETA grids have temperature
> all the way down to 1000mb, even if that level is below ground.
> >From your statement below, you only want to see stab(tmpc) values
> where the layer is above ground.
>
> Actually, this is something that gdcross does in a cross section,
> but since you want to output the values at a singe grid point-
> you are presumably using GDPROF which plots a profile at a
> single gridpoint/time and outputs the data values it calculates.
> This is quite easy with:
> gvcord=pres
> gfunc = stab(tmpc)
>
> however, the output will extend below the surface level when the model
> levels include tmpc below the surface.
>
> GDPROF requires two conditions for not extending below the surface
> by following the grid levels all the way down:
>
> 1) The surface pressure grid should be available on the same gvcord
> as the gfunc is calculated on.
>
> 2) The gfunc should not be a layer quantity
>
> What needs to be done is 1) copy the pres@0%none grid to
> pres@0%pres, and 2) compute stab(tmpc) and output the grid to
> a single level rather than a layer.
>
> Attatched is a quick script that will compute STBC at the midpoint of
> each 50mb model level, for each forecast time, and copy the
> surface pressure grid. After running the script, you can use
> GDPROF like:
>
>  GPOINT   = den
>  GDATTIM  = f048
>  GVCORD   = pres
>  GFUNC    = stbc
>  GVECT    =
>  GDFILE   = $HDS/1999070112_eta_grid211.gem
>  LINE     = 5
>  MARKER   = 0
>  BORDER   = 1
>  PTYPE    = log
>  SCALE    = 0
>  XAXIS    =
>  YAXIS    = 1000/100
>  WIND     = an6
>  REFVEC   =
>  WINPOS   = 1
>  FILTER   = 0
>  TITLE    = 5/-1
>  PANEL    = 0
>  CLEAR    = y
>  TEXT     = 1/22/1
>  DEVICE   = xw
>  OUTPUT   = t
>  THTALN   =
>  THTELN   =
>  MIXRLN   =
>  GEMPAK-GDPROF>r
>  GDPROF PARAMETERS
>
>  Grid file:                 $HDS/1999070112_eta_grid211.gem
>  Grid function:             stbc
>  Grid vector function:
>  X,Y grid point:             42.49   32.21
>  Lat/lon:                    39.87 -104.67
>  Number of levels:           14
>  Data range:                 -8.68   -1.49
>  Scaling factor:             10** 0
>  Wind display:            an6
> Enter <cr> to accept parameters or type EXIT:
>
>                                     PROFILE
>
>        990703/1200V048  STBC   DEN
>
>        LATITUDE, LONGITUDE = (  39.87, -104.67 )
>
>                   PRES                  STBC
>                  775.00               -6.944
>                  725.00               -7.588
>                  675.00               -7.652
>                  625.00               -6.594
>                  575.00               -6.560
>                  525.00               -8.220
>                  475.00               -8.401
>                  425.00               -8.681
>                  375.00               -7.787
>                  325.00               -7.250
>                  275.00               -7.777
>                  225.00               -6.437
>                  175.00               -4.356
>                  125.00               -1.485
>  Parameters requested: GPOINT,GDATTIM,GVCORD,GFUNC,GVECT,GDFILE,LINE,MARKER,
>  BORDER,PTYPE,SCALE,XAXIS,YAXIS,WIND,REFVEC,WINPOS,FILTER,TITLE,PANEL,CLEAR,
>  TEXT,DEVICE,OUTPUT,THTALN,THTELN,MIXRLN.
>  GEMPAK-GDPROF>
>
> In the above run, the surface pressure for DEN is 817 mb, so the first
> layer that stability is above the ground level for the ETA model is the
> 800:750 layer. STBC is output as valid at 775mb, and so on up to the top..
>
> Let me know if you need further assistance.
>
> Steve Chiswell
> Unidata User Support
>
> --------------------------------------------------------------
> #!/bin/csh -f
> # set the eta model file name appropriately!
> set GDFILE=$HDS/1999070112_eta_grid211.gem
>
> set FHRS=("f000" "f006" "f012" "f018" "f024" "f030" "f036" "f042" "f048")
>
> # loop for each forecast time
> foreach FHR ($FHRS)
>
> # copy the surface pressure grid to gvcord=pres
> gddiag << EOF1
>    GDFILE = $GDFILE
>    GDOUTF = $GDFILE
>    GDATTIM  = $FHR
>    gfunc = pres
>    glevel = 0
>    gvcord = none
>    grdnam = pres@0%pres
>    r
>
>    e
> EOF1
>
> # compute stab(tmpc) for 1000:950 layer and output to STBC@975
> # repeat up through 150:100 mb layer.
> set GLEV1=1000
> while($GLEV1 > 100)
>    @ GLEV2 = $GLEV1 - 50
>    @ GLEVA = $GLEV1 + $GLEV2
>    @ GLEVA = $GLEVA / 2
>
>    gddiag << EOF2
>    GDFILE = $GDFILE
>    GDOUTF = $GDFILE
>    GFUNC    = stab(tmpc)
>    GDATTIM  = $FHR
>    GLEVEL   = ${GLEV1}:${GLEV2}
>    GVCORD   = pres
>    grdnam = stbc@${GLEVA}
>    r
>
>    e
> EOF2
> @ GLEV1 = $GLEV1 - 50
>
> end # end while GLEV
>
> end # foreach FHR
>
> >From: Matt Fearon <address@hidden>
> >Organization: .
> >Keywords: 199907010105.TAA27142
>
> >Your previous reply was very helpful, but I think I may not
> >of explained my question enough. I am using the eta model.
> >I would like to calculate the stability or lapse rate in layer
> >sections from the surface up to 500mb. I am looking to
> >locate stable and unstable layers from the surface up to 500mb.
> >I need these calculations at individual grid points for each
> >forecast hour.
> >
> >Performing a calculation of dT/dZ from the surface to 500mb didn't
> >provide me with the ability to locate individual stability regions. Sorry to
> >be bothersome. Any advice would be extremely helpful.
> >
> >Thank you,
> >Matt Fearon
> >address@hidden
> >
> >Unidata Support wrote:
> >
> >> >From: Matt Fearon <address@hidden>
> >> >Organization: .
> >> >Keywords: 199906302250.QAA24636
> >>
> >> >I am a fairly new user of gempak software, but I know how to tinker
> >> >around
> >> >pretty well.
> >> >
> >> >I am trying to extract stab(tmpc) for layers above ground level to
> >> >achieve a temperature lapse rate at individual grid points (from the
> >> >surface
> >> >to about 5km). I have been using the gdlist program, however the region
> >> >I am
> >> >concerned with is California. Therefore I have to deal with elevation
> >> >issues.
> >> >I have been trying to use hagl instead of pres for the vertical
> >> >coordinates, but I
> >> >have been unsuccessful.
> >> >
> >> >If someone knows a good method for extracting stab(tmpc) to establish a
> >> >lapse rate
> >> >at individual grid points considering elevation, I would greatly
> >> >appreciate all advice.
> >> >
> >> >Thank you,
> >> >Matt Fearon
> >> >address@hidden
> >> >
> >>
> >> Matt,
> >>
> >> >From your question, you apparently want to calculate:
> >>
> >> T(~5km) - T(surface)
> >> -------------------
> >> Z(~5km) - Z(surface)
> >>
> >> If you are using the ETA 211 grid from the IDD for instance,
> >> you have  T@2m, T@500mb, Z@surface, Z@500mb.
> >>
> >> So, assuming that either 500mb or 550mb is adequate in approximating
> >> ~5km, you can do:
> >>
> >> gvcord = pres
> >> glevel = 500
> >> gfunc = quo(sub(tmpc,tmpc@2%hagl),sub(hght,hght@0%none^f000))
> >>
> >> The Height grid is only given at F000 (since the ground doesn't advect with
> > time),
> >> hence the ^f000 specification).
> >>
> >> Actually, since the above temperature is at 2m, while the height is at 0m 
> >> HA
> > GL,
> >> you could add 2m to the height subtraction around the last "sub"
> >> to get something like: quo(sub(,),sub(hght,add(hght@0%none^f000,2)))
> >>
> >> The point is, depending on what model grid you have, you may have to
> >> determine if you have temp at 2m , and height at 0m etc.
> >> The best way to do this is to use gdinfo to inspect your grids
> >> to determine what parameters they give you to work with.
> >> Steve Chiswell
> >> Unidata User Support
> >> ****************************************************************************
> >> Unidata User Support                                    UCAR Unidata 
> >> Program
> >> (303)497-8644                                                  P.O. Box 
> >> 3000
> >> address@hidden                                   Boulder, CO 80307
> >> ----------------------------------------------------------------------------
> >> Unidata WWW Service                        http://www.unidata.ucar.edu/
> >> ****************************************************************************
> >
>