[gembud] Grid Diagnostics Script / Model Verification?

Robert Mullenax Robert.Mullenax at csbf.nasa.gov
Fri Feb 15 08:48:35 MST 2008


OK, well I can give you a start then maybe someone else can chime in.  I figured someone much more adept would give you something more elegant, but here's the brute force method(s).  Good thing is if you script these up it will be fast.

First step is to use gddiag to create a verification grid..say you want to compare the 15 Feb 00Z 12 hour forecast of 500mb hghts to the RUC 12Z analysis..just as an example

 GEMPAK-GDDIAG>l
 GDFILE   = ruc2|12+gfs003|00
 GDOUTF   = out.gem
 GFUNC    = sub(hght,hght+2^f012)
 GDATTIM  = f000
 GLEVEL   = 500
 GVCORD   = pres
 GRDNAM   = hgtsub
 GRDTYP   = S
 GPACK    =
 GRDHDR   =
 PROJ     =
 GRDAREA  = dset
 KXKY     =
 MAXGRD   = 200
 CPYFIL   = ruc2|12
 ANLYSS   =
 
So I am creating a parameter called hgtsub in the grid out.gem that subtracts the GFS from the RUC.

You can then use gdlist to create a text output of the grid:

GEMPAK-GDLIST>l
 GDATTIM  = 080215/1200F000:080215/0000F012
 GLEVEL   = 500
 GVCORD   = pres
 GFUNC    = hgtsub
 GDFILE   = out.gem
 GAREA    = dset
 PROJ     =
 SCALE    = 0
 OUTPUT   = T
 GEMPAK-GDLIST>

If you are happy with the output, then change output=t (terminal) to output=f/out.file.  You can then use Excel or whatever to do stats on the difference file.

If you just want GEMPAK to create the average for you over the domain (the RUC domain in this case), then you would just run gddiag a second time to compute the average using savs.  Calculate savs(hgtsub) from grid out.gem and then write that to a grid called outa.gem with a grid name of avg.


GEMPAK-GDDIAG>l
 GDFILE   = ruc2|12+gfs003|00
 GDOUTF   = out.gem
 GFUNC    = sub(hght,hght+2^f012)
 GDATTIM  = f000
 GLEVEL   = 500
 GVCORD   = pres
 GRDNAM   = hgtsub
 GRDTYP   = S
 GPACK    =
 GRDHDR   =
 PROJ     =
 GRDAREA  = dset
 KXKY     =
 MAXGRD   = 200
 CPYFIL   = ruc2|12
 ANLYSS   =


 GEMPAK-GDDIAG>l
 GDFILE   = out.gem
 GDOUTF   = outa2.gem
 GFUNC    = savs(hgtsub)
 GDATTIM  = 080215/1200F000:080215/0000F012
 GLEVEL   = 500
 GVCORD   = pres
 GRDNAM   = avg
 GRDTYP   = S
 GPACK    =
 GRDHDR   =
 PROJ     =
 GRDAREA  = dset
 KXKY     =
 MAXGRD   = 200
 CPYFIL   = ruc2|12
 ANLYSS   =
 GEMPAK-GDDIAG>

Since the computed value will be the same at any grid point as seen below:

ROW  2      0.31     0.31     0.31     0.31     0.31     0.31     0.31     0.31
             0.31     0.31     0.31     0.31     0.31     0.31     0.31     0.31
             0.31     0.31     0.31     0.31     0.31     0.31     0.31     0.31
             0.31     0.31     0.31     0.31     0.31     0.31     0.31     0.31
             0.31     0.31     0.31     0.31     0.31     0.31     0.31     0.31
             0.31     0.31     0.31     0.31     0.31     0.31     0.31     0.31
     ........................
             0.31     0.31     0.31     0.31     0.31     0.31     0.31     0.31
    
             0.31     0.31     0.31     0.31     0.31     0.31     0.31
 ROW  1      0.31     0.31     0.31     0.31     0.31     0.31     0.31     0.31
             0.31     0.31     0.31     0.31     0.31     0.31     0.31     0.31
             0.31     0.31     0.31     0.31     0.31     0.31     0.31     0.31
       .......................


This means you can just use gdpoint to list one value at one grid point in the domain to get your answer..e.g.

GEMPAK-GDPOINT>l
 GDATTIM  = 080215/1200F000:080215/0000F012
 GDFILE   = outa2.gem
 GLEVEL   = 500
 GPOINT   = psn
 GVCORD   = pres
 GFUNC    = avg
 SCALE    = 0

 GEMPAK-GDPOINT>r

GDFILE: outa2.gem
GPOINT: psn
GVCORD: pres
GLEVEL: 500
GFUNC : avg
SCALE : 0
     080215/1200F000 :      0.30856
 Parameters requested: GDATTIM,GDFILE,GLEVEL,GPOINT,GVCORD,GFUNC,SCALE.
 GEMPAK-GDPOINT>e

(PSN is where we are in Palestine, Texas)..so the average difference over the whole domain is 0.30856.  You could replace dset with a lat/lon garea to split it up into regions.

Just use grep, awk, tcl, shell commands to extract the answer.

Hope this helps,

Robert Mullenax
CSBF Meteorology












-----Original Message-----
From: Mike Hardiman [mailto:Mike.Hardiman at noaa.gov]
Sent: Thu 2/14/2008 6:04 AM
To: Robert Mullenax
Subject: Re: [gembud] Grid Diagnostics Script / Model Verification?
 
Nope, not yet anyays.

-Mike

Robert Mullenax wrote:
> Mike,
> 
> Did you get a response to this?
> 
> Regards,
> Robert Mullenax
> CSBF Meteorology
> 
> 
> 
> -----Original Message-----
> From: gembud-bounces at unidata.ucar.edu on behalf of Mike Hardiman
> Sent: Wed 2/13/2008 6:15 AM
> To: a_list - Gembud List; Llyle Barker
> Subject: [gembud] Grid Diagnostics Script / Model Verification?
> 
> Hey folks,
> 
> I've been wanting to calculate some verification data on a couple local
> in-house WRF-ARW runs, so I've been thinking of writing some scripts to
> handle this using GEMPAK.  I'm a little rusty on GEMPAK, but it looks
> like it could be done.
> 
> However, why re-invent the wheel?  Perhaps someone out there has already
> written some scripts that will do exactly what I'm looking for.
> 
> Basically, I'll need to calculate difference grids between the ARW model
> and some sort of "verification" grid, presumably the NAM or GFS initial
> fields.  I think this can be done with GEMPAK programs, but there is
> also Metcal as an option.  Then I'll need to produce some sort of text
> output showing the average error calculated over the model domain, etc,
> etc.
> 
> We already run similar verification (at the NWS) using GFE, and this is
> good for determining verification stats for models and forecast grids
> within our CWA, using "sensible weather" parameters like Sfc T, etc.
> However, the GFE domain is rather small, and I'd like to see
> verification stats for MSLP, 500mb Heights, etc, over the entire ARW
> domain, so I can compare it to the NAM, GFS, etc.
> 
> Maybe someone out there already has done something like this and is
> willing to share their work? :)
> 
> Thanks,
> -Mike Hardiman
> NWS Lincoln, IL (ILX)
> _______________________________________________
> gembud mailing list
> gembud at unidata.ucar.edu
> For list information or to unsubscribe,  visit: 
> http://www.unidata.ucar.edu/mailing_lists/
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.unidata.ucar.edu/mailing_lists/archives/gembud/attachments/20080215/ef45dedd/attachment.html 


More information about the gembud mailing list