Table of contents Frames User Manual GEMPAK Online Tutorial

3.2.2| GEMPAK Listing Programs: SFLIST

SFLIST lists any parameters which can be derived from the data in a GEMPAK surface data file, and can print the undecoded text information for standard and special observations if that information was stored by the decoding program.

Start SFLIST and restore your sf.nts file, and run the program:

$ sflist
 GEMPAK-SFLIST>restore sf.nts
 GEMPAK-SFLIST>d
 SFFILE    Surface data file                 metar
 AREA      Data area                         co
 DATTIM    Date/time                         12
 SFPARM    Surface parameter list            skyc;tmpf;wsym;rmsl;ptnd;dwpf;p03i;brbk:.7:2
 OUTPUT    Output device/filename            T
 IDNTYP    STNM or STID                      STID
 GEMPAK-SFLIST>r  run the program
 PARM = SKYC;TMPF;WSYM;RMSL;PTND;DWPF;P03I;BRBK                               
 ...
    TOR    101025/1200      0.00    37.94 -9999.00    80.00  3002.00    37.04
                        -9999.00  3300.00
    VEL    101025/1200      0.00    39.02 -9999.00   148.00  6005.00    37.94
                        -9999.00  3270.00
    VTN    101025/1200      8.00    48.92 -9999.00    67.00  3001.00    46.94
                        -9999.00  8300.00
    WRL    101025/1200      0.00    33.98 -9999.00    75.00  6006.00    28.04
                        -9999.00  5100.00
    WWR    101025/1200      0.00    49.64 -9999.00 -9999.00 -9999.00    47.66
                        -9999.00  6240.00

 Parameters requested: SFFILE,AREA,DATTIM,SFPARM,OUTPUT,IDNTYP.
 GEMPAK-SFLIST> 
tip: -9999.0 is the GEMPAK missing data value and indicates that no data was recorded.

For help, type phelp sflist at the GEMPAK-SFLIST> prompt, or consult the on-line help file for SFLIST.

Additionally, you can see the GEMPAK help documentation for individual variables by typing phelp var (where var is the name of a variable, such as DATTIM).




3.2.2| SNLIST

SNLIST is the sounding (or upper air) listing program, and is analogous to the SFLIST program, with a few differences.

Start SNLIST:

 GEMPAK-SNLIST>restore sn.nts
 GEMPAK-SNLIST>d Redisplay settings
 SNFILE    Sounding data file                uair
 AREA      Data area                         us
 DATTIM    Date/time                         12
 SNPARM    Sounding parameter list           brbk;tmpc;;hgtd;;dwpc
 STNDEX    Stability indices                 SHOW
 LEVELS    Vertical levels                   500
 VCOORD    Vertical coordinate type          pres
 OUTPUT    Output device/filename            T
 MRGDAT    Merge data file flag/part type    YES
 GEMPAK-SNLIST>r run the program

MRGDAT is the merged data flag


When MRGDAT = NO sounding data is listed in its raw parts form.

When MRGDAT = YES all the available data is merged into a single list ordered from the surface on up.

Un-merged data is ordered in the following parts: TTAA, TTBB, PPBB, TTCC, TTDD, PPDD. If you choose to display the data in its un-merged form, the format is fixed according to the standard WMO format. You have no control over which parameters, vertical coordinates or levels are displayed.

If you choose to merge the data, you may specify which parameters are listed on which levels in which vertical coordinate system. When necessary, data that are measured in alternate coordinate systems are interpolated to the requested vertical coordinate.

Regardless of how your upper air data are stored, both merged and un-merged listing formats are available. The difference between these forms will be more clear when we do some examples.

Exercise: List merged sounding data for the Key West (EYW) area for the last at 00 UTC last night (hint: use list). You will want to list all parameters stored in data set dset, and list the lifted index and k-index (LIFT , KINX) as well:

GEMPAK-SNLIST>area = eyw
GEMPAK-SNLIST>dattim = list
GEMPAK-SNLIST>stndex = lift;kinx
GEMPAK-SNLIST>levels = all
GEMPAK-SNLIST>snparm = dset
GEMPAK-SNLIST>d Redisplay settings
 SNFILE    Sounding data file                uair
 AREA      Data area                         eyw
 DATTIM    Date/time                         list
 SNPARM    Sounding parameter list           dset
 STNDEX    Stability indices                 SHOW
 LEVELS    Vertical levels                   all
 VCOORD    Vertical coordinate type          pres
 OUTPUT    Output device/filename            T
 MRGDAT    Merge data file flag/part type    YES
GEMPAK-SNLIST>r run the program
 List of times: 

 101024/1200       101024/1500       101024/1800       101024/2100   
 101025/0000  

Enter a time or type EXIT:00  note the abbreviation
 
 SNPARM = PRES;TEMP;DWPT;DRCT;SPED;HGHT                                         
 STNPRM = LIFT;KINX                                                             
 
 
  STID = EYW           STNM =    72201    TIME = 101024/0000         
 SLAT =  24.55     SLON =   -81.75   SELV =     6.0
 STIM =     0

 LIFT =    -5.12    KINX =    36.60


      PRES     TEMP     DWPT     DRCT     SPED     HGHT
   1015.00    27.20    22.20    90.00     4.12     6.00
   1000.00    25.80    23.30    85.00    10.30   148.00
    982.37    24.23    22.91    80.00    10.81   305.00
    982.00    24.20    22.90    80.11    10.82   308.29
    948.70    22.30    20.05    90.00    11.84   610.00
    930.00    21.20    18.40    93.93    12.25   784.17
    925.00    20.80    18.00    95.00    12.36   831.00
    916.16    20.26    17.60    95.00    12.36   914.00
    886.00    18.40    16.20    95.00    10.89  1203.31
    884.38    18.31    16.15    95.00    10.81  1219.00
    857.00    16.80    15.30    95.00    10.81  1488.86
    850.00    16.60    14.90    95.00    10.81  1559.00
    823.48    15.45    12.66    95.00     8.75  1829.00
    809.00    14.80    11.40    92.53     7.99  1980.03
    796.00    14.80    10.20    90.27     7.29  2117.46
    794.44    14.69    10.12    90.00     7.21  2134.00
    766.32    12.75     8.63    90.00     5.66  2438.00
    753.00    11.80     7.90    97.24     5.16  2585.87
    739.00    10.98     6.17   105.00     4.63  2743.00
    736.00    10.80     5.80   105.37     4.48  2777.03
    704.00     8.40     5.40   109.47     2.79  3146.81
    700.00     8.40     4.60   110.00     2.57  3194.00
    661.60     5.60    -2.13   145.00     2.06  3658.00
    659.00     5.40    -2.60   143.95     2.06  3690.42
    640.00     3.80     1.00   136.14     2.06  3928.97
...
     10.00   -42.10   -74.10   330.00     5.15 31060.00
      9.52   -41.69   -73.01   345.00     6.69 31394.00
      9.30   -41.50   -72.50 -9999.00 -9999.00 31551.50

 STID = MFL           STNM =    72202    TIME = 101024/0000         
 SLAT =  25.75     SLON =   -80.38   SELV =     5.0
 STIM =     0

 LIFT =    -5.43    KINX =    34.60

      PRES     TEMP     DWPT     DRCT     SPED     HGHT
   1018.00    27.20    22.20    65.00     4.12     5.00
   1000.00    25.60    21.90    75.00     9.78   164.00
    984.03    24.26    21.59    70.00     9.27   305.00
...
      8.32   -39.83   -71.09     5.00     9.78 32309.00
      7.61   -38.51   -70.28   100.00     1.03 32918.00
      7.30   -37.90   -69.90 -9999.00 -9999.00 33201.91

 STID = TBW           STNM =    72210    TIME = 101024/0000         
 SLAT =  27.70     SLON =   -82.40   SELV =    13.0
 STIM =     0

 LIFT =     3.85    KINX =     4.60

      PRES     TEMP     DWPT     DRCT     SPED     HGHT
   1018.00    27.00    16.00    60.00     2.57    13.00
   1000.00    26.00    14.00    80.00     9.27   169.00
    984.63    24.93    13.75    80.00     9.78   305.00
...
     10.00   -44.50   -62.50   355.00     1.54 31070.00
      9.10   -44.66   -62.66   315.00     5.15 31699.00
      8.90   -44.70   -62.70 -9999.00 -9999.00 31850.03
 Parameters requested: SNFILE,AREA,DATTIM,SNPARM,STNDEX,LEVELS,VCOORD,OUTPUT,
 MRGDAT.
 GEMPAK-SNLIST>e
Why does it display three stations and not just EYW? How do you list ONLY data from Key West? What if you want to list ONLY unmerged data from Key West?
3.2.3| GDLIST
So far we've used SFLIST and SNLIST to list surface and sounding (upper air) data. Now we'd like to look at gridded data. GDLIST is analogous to SFLIST and SNLIST.

GDLIST lists diagnostic grids computed from fields stored in GEMPAK grid files. The data may be processed over a subgrid.

Let's start up the program and read in the defaults file:

> gdlist
 GEMPAK-GDLIST>restore $GEMPAK/nts/defaults/gdlist.nts
 GEMPAK-GDLIST>d
 GDATTIM   Grid date/time                     
 GLEVEL    Grid level                        500
 GVCORD    Grid vertical coordinate          pres
 GFUNC     Scalar grid                        
 GDFILE    Grid file                          
 GAREA     Graphics area                      
 PROJ      Map projection/angles/margins|dr  mer
 SCALE     Scalar scale / vector scale       999
 OUTPUT    Output device/filename            t
 GEMPAK-GDLIST>

These variable names are virtually the same as the surface and sounding program variables. Note, however, that most start with "G". This is because GEMPAK distinquishes between gridded data variables and non-gridded data variables. As a result, GEMPAK stores the settings separately in the gemglb.nts and last.nts files. This may not make sense now, but later when you aren't using the defaults files as often, you will appreciate the separation.

New variables:

GDATTIM          analogous to DATTIM
                        (with new features for model data)
                        
GLEVEL           analogous to LEVELS

GVCORD           analogous to VCOORD 

GFUNC            analogous to SFPARM and SNPARM

GDFILE           analogous to SFFILE, and SNFILE
Exercises:Exercise: Print the grid point values of the 500mb heights (HGHT) from the latest 00 UTC GFS over the Denver area for the 12 hour forecast (this morning).

Set date/time, gfunc, garea and point GDFILE to the alias gfs:

 GEMPAK-GDLIST>gdattim = 0000f012
 GEMPAK-GDLIST>gfunc = hght
 GEMPAK-GDLIST>gdfile = gfs
 GEMPAK-GDLIST>garea = den
 GEMPAK-GDLIST>l  Redisplay settings
 GDATTIM  = 0000f012
 GLEVEL   = 500
 GVCORD   = pres
 GFUNC    = hght
 GDFILE   = gfs
 GAREA    = den
 PROJ     = mer
 SCALE    = 999
 OUTPUT   = t
 GEMPAK-GDLIST>r run the program
 
 GDLIST PARAMETERS: 

 Grid file: gfs

 GRID IDENTIFIER:
    TIME1             TIME2         LEVL1 LEVL2   VCORD PARM
101025/0000F012                       500          PRES HGHT        

 GAREA:    DEN                                             
 SCALE FACTOR : 10** 0
 OUTPUT:    TERM/


 MINIMUM AND MAXIMUM VALUES  5589.55  5761.00
Enter  <cr> to accept parameters or type EXIT:
Hit enter:

 Grid file: gfs
 GRID IDENTIFIER: 
    TIME1             TIME2         LEVL1 LEVL2   VCORD PARM
101025/0000F012                       500          PRES HGHT        
 AREA: DEN                                                 GRID SIZE:   360  181
 COLUMNS:   249  264     ROWS:   126  135

 Scale factor: 10** 0

 COLUMN:    249      250      251      252      253      254      255      256  
            257      258      259      260      261      262      263      264  
 ROW135   5602.75  5602.20  5600.73  5603.32  5596.86  5602.88  5604.67  5606.47
          5608.65  5604.70  5600.85  5598.98  5598.02  5595.62  5592.83  5590.68
 ROW134   5623.40  5622.59  5618.36  5615.66  5608.30  5610.90  5612.10  5615.09
          5615.20  5612.10  5608.38  5605.79  5603.73  5598.42  5592.43  5592.09
 ROW133   5642.80  5641.08  5636.12  5631.79  5625.52  5620.76  5622.01  5624.86
          5624.43  5622.90  5617.82  5613.43  5606.91  5596.93  5589.55  5589.58
 ROW132   5664.08  5661.34  5655.46  5647.17  5643.01  5635.59  5632.80  5641.78
          5635.44  5632.50  5627.91  5622.34  5615.18  5605.97  5594.10  5592.38
 ROW131   5680.06  5675.28  5671.80  5664.33  5659.00  5650.52  5644.86  5652.70
          5646.07  5642.84  5639.95  5634.40  5628.08  5621.75  5616.83  5615.69
 ROW130   5698.96  5695.12  5689.17  5681.67  5672.02  5665.04  5658.45  5663.04
          5655.70  5653.37  5650.27  5647.12  5643.45  5640.49  5639.03  5639.41
 ROW129   5715.18  5713.13  5705.38  5693.77  5685.29  5674.83  5671.04  5668.41
          5665.14  5662.25  5660.28  5659.18  5658.33  5657.35  5656.13  5657.54
 ROW128   5733.83  5727.60  5718.76  5707.98  5698.31  5688.92  5682.94  5676.48
          5673.61  5670.00  5668.97  5669.56  5670.40  5670.89  5670.89  5671.93
 ROW127   5748.87  5741.44  5731.23  5722.92  5711.52  5704.51  5693.71  5684.26
          5679.05  5678.68  5679.25  5679.54  5681.65  5684.71  5687.60  5691.35
 ROW126   5761.00  5754.76  5746.89  5738.48  5728.06  5717.48  5702.71  5695.42
          5687.79  5689.31  5689.00  5692.32  5696.66  5700.29  5706.01  5713.68
Parameters requested: GDATTIM,GLEVEL,GVCORD,GFUNC,GDFILE,GAREA,PROJ,SCALE,
OUTPUT.  
GEMPAK-GDLIST>
Looking at individual grid point values may be a little tedious. Usually, contours, streamlines, or vector displays are used to view gridded data.

Occasionally you might find this program useful in looking for suspect grid point values, or if you want to modify the grid point values in some way. In that case you may want to write out the grid, modify it, and then read it back in to GEMPAK format. You can write out a grid to a file, rather than the screen, by setting:

        OUTPUT=f/file.name

where file.name is the name of the file that the grid will be written to. After making your changes (for example changing a suspect point to the missing data value, or changing some values to test their affect on the subsequent analyses), you can read the grid back into a GEMPAK data file using the program GDEDIT

Even with this in mind, you probably won't be using this program as often as many of the others.

However, there is a useful listing program for gridded data files. It is called GDINFO, and we'll discuss it next.

At this point let's save the grid setting to another NTS config file:

 save gd.nts

so you can easily load them at any time with the command

 restore gd.nts

3.2.4| GDINFO

GDINFO lists information about the navigation and fields stored within a GEMPAK grid file.

> gdinfo
 GDFILE    Grid file                         gfs
 LSTALL    Full list flag                    YES
 OUTPUT    Output device/filename            t
 GDATTIM   Grid date/time                    0000f012
 GLEVEL    Grid level                        500
 GVCORD    Grid vertical coordinate          pres
 GFUNC     Scalar grid                       hght

When running GDLIST before, we already set GDFILE to point to the 00 UTC GFS (12 hr forecast). If we want to view all grids in this file, we need to set GDATTIM, GLEVEL, GVCORD and GFUNC to all:

 GEMPAK-GDINFO>gdattim = all
 GEMPAK-GDINFO>glevel = all
 GEMPAK-GDINFO>gvcord = all
 GEMPAK-GDINFO>gfunc = all
 GEMPAK-GDINFO>l
 GDFILE   = gfs
 LSTALL   = yes
 OUTPUT   = t
 GDATTIM  = all
 GLEVEL   = all
 GVCORD   = all
 GFUNC    = all
 GEMPAK-GDINFO>

The GDATTIM, GLEVEL, GVCORD and GFUNC parameters can be used to restrict the output to certain types of grids in the file, but for this example we first want to know what exactly is contained in the file.

Because we are using an alias gdfile = gfs and set the date/time as GDATTIM = all, GEMPAK assumes that the file to use is the latest gfs003.gem file available:
 GEMPAK-GDINFO>r

 GRID FILE: /data/ldm/gempak/model/gfs/2010102500_gfs003.gem

 GRID NAVIGATION: 
     PROJECTION:          CED                 
     ANGLES:                 0.0     0.0     0.0
     GRID SIZE:          360 181
     LL CORNER:             -90.00      0.00
     UR CORNER:              90.00     -1.00
  
 GRID ANALYSIS BLOCK: 
      UNKNOWN ANALYSIS TYPE 

 Number of grids in file:   9809

 Maximum number of grids in file:  29000
 
  NUM       TIME1              TIME2           LEVL1 LEVL2  VCORD PARM
    1     101025/000F000                          0         TROP HGHT        
    2     101025/000F000                          0         TROP VWSH        
    3     101025/000F000                          0         TROP TMPK        
    4     101025/000F000                          0         TROP UREL        
    5     101025/000F000                          0         TROP VREL        
    6     101025/000F000                          0         TROP PRES        
    7     101025/000F000                          0         FRZL RELH        
    8     101025/000F000                          0         FRZH HGHT        
    9     101025/000F000                          0         FRZH RELH        
   10     101025/000F000                          0         FRZL HGHT        
   11     101025/000F000                          0  10     DPTH SOIM        
...     
Enter <cr> to page or type EXIT:

Use the scroll bar on your terminal to scroll back up so you can see the start of the output.

The first block of information is about the grid file, including filename, grid navigation, grid analysis block, number of grids in the file and the maximum number of grids allowed in the file. This is the header information, and tells you common information that applies to all the grids contained in the file.

The second section contains a numbered list of all the grids stored in the file. We know from the header section that there are 9809 grids in this file, but only 35 grids are listed on the first page. If you hit enter (return), you'll get another page of grids. For now type EXIT to return to the GDLIST prompt.

Note that the date/time specification for these grids is slightly different that what we've seen in the surface and upper air data. The HHMM (hour-minute) field is followed by an F00. The F means "forecast", and the 00 is the forecast hour. So, the grids we've been looking at in the GDINFO list are all the "zero hour forecast". These are also know as the initialization grids, or the grids that are used as input to the model.

Restrict grids shown to 500 mb at 12-hours out:

 GEMPAK-GDINFO>gdattim = 0000f012
 GEMPAK-GDINFO>gvcord = pres
 GEMPAK-GDINFO>glevel = 500
 GEMPAK-GDINFO>l
 GDFILE   = gfs
 LSTALL   = YES
 OUTPUT   = t
 GDATTIM  = f012
 GLEVEL   = 500
 GVCORD   = pres
 GFUNC    = all
 GEMPAK-GDINFO>r
 ...
  NUM       TIME1              TIME2           LEVL1 LEVL2  VCORD PARM
 1463     101025/0000F012                        500         PRES OMEG        
 1464     101025/0000F012                        500         PRES UREL        
 1465     101025/0000F012                        500         PRES VREL        
 1466     101025/0000F012                        500         PRES TMPK        
 1467     101025/0000F012                        500         PRES CWTR        
 1468     101025/0000F012                        500         PRES HGHTA       
 1469     101025/0000F012                        500         PRES HGHT        
 1470     101025/0000F012                        500         PRES HGHT5       
 1471     101025/0000F012                        500         PRES WAVA5       
 1472     101025/0000F012                        500         PRES RELH        
 1473     101025/0000F012                        500         PRES AVOR  
Let's take a closer look at grid number 1469:
  NUM       TIME1              TIME2           LEVL1 LEVL2  VCORD PARM
 1469     101025/0000F012                        500         PRES HGHT 

Each grid has a unique grid number, which you can use in most grid programs to refer to this particular grid. This tends to become inconvenient because there is no easy way to remember which number corresponds to which grid based on parameters and levels. By specifying the time, level, vertical coordinate, and parameter name you will be able to nail down exactly the type of grid you wish to view.

As you can see in the grid description, there is room for two times and two levels. This is useful if you have a grid that is an accumulation or average (two times) or a layer difference or average (two levels). Most grids, however, use only one time and one level to describe them. The vertical coordinate and parameter name are given in the last two columns.

GDINFO is one of the most useful grid programs you'll encounter. If, for example, you know there is a surface pressure grid in whatever grid file you're using, and you don't remember exactly how to ask for it (perhaps due to a non-standard parameter name), simply run GDINFO and look at the list of grids.

The GEMPAK listing programs aren't as visually appealing as the graphics oriented programs, but working through the listing programs is an important first step in learning about GEMPAK. As we start working with programs that use more complicated variable sets, you will appreciate the things you've learned about the GEMPAK user interface and GEMPAK data structures.




3.2.5| Listing Program Exercises

Exercises: This exercise uses a listing program we haven't heard about yet: SFL604


  1. What does this program do, and how is it different than SFLIST?
  2. Use SFL604 to display all data for Massachusetts at 1800 UTC, August 19th, 1991 using the Hurricane Bob data set.
    Use sffile = $GEMPAK/data/hrcbob.sfc
    Use dattim = 910819/1800
    Use the + qualifier until the area is small enough so the data fits on one screen.
  3. Notice anything interesting?


  4. Now list all the stations that report mean sea level pressures less than 1000 mb at 12 UTC.
  5. Set skpmis = YES (Why?)

    How do we specify pressure below 1000 mb? We set a condition on the mean sea level pressure on the SFPARM line: sfparm = pmsl<1000

    Only stations that conform to this condition will be TRUE. So what about SKPMIS? When skpmis = yes (or TRUE), only stations which meet the SFPARM condition are listed. If skpmis = no (or FALSE), then we wouldn't be skipping those stations that didn't conform to our filtering.

  6. Using SFLIST, list the surface temperature (in degrees C), the relative humidity, the mean sea level pressure, the present weather symbol, and the visibility for the Boston, MA (BOS) area at 18Z on August 19, 1991.
  7. Use sfparm = tmpc;relh;pmsl;wsym;vsby

  8. Now list this data for just the Boston station, at each hour in the file:
  9. If you'd rather not specify dattim = all, remember you can list all available times:

     GEMPAK-SFLIST>dattim=list  
     GEMPAK-SFLIST>r
    
     List of times: 
    
     910819/0600       910819/0700       910819/0800       910819/0900    
     910819/1000       910819/1100       910819/1200       910819/1300    
     910819/1400       910819/1500       910819/1600       910819/1700    
     910819/1800       910819/1900       910819/2000       910819/2100    
     910819/2200       910819/2300       910820/0000       910820/0100    
     910820/0200       910820/0300       910820/0400       910820/0500    
     910820/0600    
    

    or specify a range:

     GEMPAK-SFLIST>dattim=910819/0600-910820/0600
    

    or, using abbreviations:

    GEMPAK-SFLIST>dattim=19/06-20/06
    
  10. Choose a a sounding station and list the unmerged 0 Z data on August 20, 1991 from that station. Now display wind speed and direction, height and temperature in Kelvin for all pressure levels. Display your favorite stability indices (For example, the showalter index.) Display these data again for just the mandatory pressure levels. Now display the data on isentropic (theta) surfaces.

    Answer:

 


Table of contents Frames User Manual GEMPAK Online Tutorial