Tuesday, October 13, 2015

gempak command

1. user interface:
  • text-based,
  • case-insensitive, and
  • handles aliases and abbreviations.
list : l
run : r
exit : e
phelp : p    
Most used commands:
save abc # save the current setting to abc.nts
rest abc # load setting in abc.nts
l device # list device value 
p device # help page on device


2. help page:
GEMPAK-GDPLOT2>  phelp    gdinfo    # help info on command  
GEMPAK-GDPLOT2>  phelp    gdfile     # help ino on parameter


GDFILE: grid file name
   filename with path  :  GDFILE   = /export-3/gfs/gfs_2015100906f060
   file type:   GFS GFS model grid
         Remote directories are specified in the table, datatype.tbl.
         eg: GDFILE   = GFS|20151009/0600
               GDATTIM = f060
              
GDATTIM is the date/time for the grid.
The standard format for a grid time is a character string
 YYMMDD/HHMMthhhmm
where:
 YYMMDD    is the year, month, day    # eg : 151013/0600F300
 /    is the date and time separator
 HHMM    is the hour, minute
 t    is the type
                    ( F=forecast  A=analysis  G=guess  I=initial )
 hhhmm    is the forecast hour, minute
If t is blank, an analysis grid is assumed.  
The hhhmm field cannot be omitted if the type is given.  
If hhhmm has one, two, or three digits, they represent hours.  
With four or more digits, zeros will be added at the beginning of the field.


OUTPUT
OUTPUT determines the output devices.  The valid devices are the
terminal (T), a file (F) or none (N).
If N appears anywhere in the output string other than in the file name
no output will be generated.
Eg:
OUTPUT =               --     when no output device is specified, is sent to the terminal
OUTPUT =    f / data.dat    --    output will be written to data.dat
OUTPUT =    tf            --    output sent to the terminal and to the file program.fil
                       where program is the GEMPAK program being run.


DEVICE
DEVICE specifies the graphics device:
device | name | xsize ; ysize | color type

The following graphics devices are available:
XW X Windows terminal
PS PostScript
NC NTRANS Computer Graphics Metafile
GF GIF file using X-server
GIF GIF file not using X-server
UTF Universal Transmission Format (AFOS)
RBK AWIPS RedBook Graphics
VG Vector Graphics (N-AWIPS Product Generation)
XWP Combination driver
FAX Fax driver
TIFF TIFF file


Eg: 
DEVICE = gif | sref_alaska_009_precip_p06.gif | 1024 ; 768
GDPFUN


GDPFUN specifies a grid diagnostic function which yields either a
scalar or vector quantity.  For more information, see the GPARM
documentation.


TYPE


TYPE specifies the processing type for the GDPLOT2 GDPFUN parameter.
The TYPE list does not need separators, however slashes could be
used for clarity:


 type 1 / type 2 / ... / type n


Valid inputs for type are:


SCALAR TYPEs:
       C       the original GEMPAK contouring algorithm
       F       contour fill algorithm
       X       box algorithm -- same as contour fill, but draws lines
               around the polygons rather than filling in polygons.
       P       plot grid point values
       D       plot scaler as a directional arrow


       VECTOR TYPEs:
       A       wind arrows
       B       wind barbs
       S       streamlines


       OTHER TYPEs:
       M       plot grid point markers
       G       plot grid indices (row/column numbers)


     Note that contour attributes are specified in CONTUR.  The contour
     interval and line characteristics for types C, S and X are read

LINE  ( contour line )


LINE is the color, line type, line width, line label freqency,
smoothing separated by slashes, and flag to suppress small contours.  The
individual values in each group are separated by semicolons:


colr1;..;colrn / type1;..;typen / width1;..;widthn / labl1;..;labln / smth / fltr / scf


scf : suppress small contour flag


For example:
               colr   type  wid    lbl    smth  scf
   LINE = 1;2   / 7;8  / 4;5  /   2   /    2    /  T


- colr   : contour line color
- type  : contour line type
- wid    : line width
- lbl      : how often to skip contour lines
- smth  
- fltr
- scf
assigns colors 1 and 2 to alternate lines, dashing patterns 7 and 8 to
alternate lines, line widths 4 and 5 to alternate lines, and labels
every other line.  Smoothing level 2 is used on all lines. Contours with
7 points or less wil not be drawn.


If any specification is missing, a default of 1 is used.  Except for the
smoothing, which defaults to 0, or no smoothing.  If a color number of 0
is given, no plotting will be done. The suppress small contour flag will
default to F, drawing small contours.


Information on color selection can be found in the help for COLORS.


labeling:
If the label information is a single number, n, then every nth line
will be labelled.  If the label information is a single number, -n,
then every nth line will be labelled, however, there will not be a break
in the line for the label.  If a label is a sequence of numbers separated
by semicolons, lines corresponding to values other than 0 will be
labelled.  The pattern established will be repeated to accommodate all
lines.


Smoothing:
The smoothing level is an integer which specifies the amount of
smoothing to apply using a parametric curve function.  The current values
are 0, 1 and 2 which correspond to no smoothing and two levels of
increasing smoothing.


filter
The filter is a real value that specifies the amount of filtering of the
points on a line.  Smaller values allow for more points, while larger
values reduce the number of points on the line.  Valid values are in the
range of 0.0 to 1.0.  The default is 0.0 which means that no reduction
in the number of points will occur.


flag to suppress small contours. ( scf : suppress contour flag )
The suppress small contour flag allows the user to specify whether or not
to draw a contour with 7 points or less. The default is F or FALSE which
allows all contours to be drawn. Setting the flag to T or TRUE will have
the small contours not drawn.


CINT
CINT is the contour interval, minimum and maximum values and number
of digits, separated by slashes:


contour interval / minimum / maximum / ndigits


- contour interval :
- minimum : min value of data set
- maximum : max value of data set
- ndigits : contour label


The contour interval may be any real number.  If it is not specified
or if the value is 0, the program will select an interval which will
generate 5 to 10 contour levels.


The minimum and maximum values specify the range of data to use in
selecting contour levels.  If either value is not specified, the
value will be obtained from the range of values in the dataset.  If
the minimum and maximum are equal, that value will be used and only
one contour level will be selected.


A list of two or more contour levels may be entered using semicolons
to separate the individual values.  In this case, the minimum and
maximum are ignored.


A text string may be specified to replace the contour level value as
the contour label. In a list of contour values, enter a value and a
text string separated by an "=" sign. The input format is shown
below:
       value1=label1;value2=label2;...;valueN=labelN
To set the contour label when plotting a single contour level by
setting the minimum and maximum equal, enter the value and the text
string separated by an "=" sign before the first slash. For example:
          value1=label1 / value1 / value1


If the number of digits (ndigits) is specified,  the integer portion
of the contour labels is forced to contain ndigits characters, not
counting the minus sign, if present.  If the the number of characters
in the integer portion is less than ndigits, that portion is expanded
by padding to the left of the leading digit with zeroes.  For example:
if ndigits = 3 and the original label is 15 or -5, the new labels will
be plotted as 015 and -005 respectively.  If the number of characters
in the original label is greater than or equal to ndigits,  the original
label will be unchanged.  Using ndigits = 4, original labels 1260 and
43712 would be plotted as 1260 and 43712, while a label of 580
would be plotted as 0580.  If there are decimal places or scientific
notation in the original labels, everything to the right of the decimal
point will be plotted without change.  Therefore, if ndigits = 3, then
7.25, -12.4, and 6.5E+12 would be plotted as 007.25, -012.4 and
006.5E+12, respectively.


FLINE
     FLINE is the color and fill type to be used for contour fill:


       colr1;..;colrn/type1;..;typen


     The number of fill colors and types needed is one greater than the
     number of fill levels in FINT.  The number of fill colors may be
     entered as a list of color numbers separated by semicolons or a
     range of colors.  The number of fill types may be entered as a list
     of numbers separated by semicolons.  More information on color
     selection can be found in the help for COLORS.


     The fill type may be set any of the following values:


               1               Solid
               2               Slanted Dash
               3               Wide-spaced Slanted Line
               4               Medium-spaced Slanted Line
               5               Zig-Zag Line
               6               Dots
               7               Thin-spaced Slanted Line


     If fill type is set to 0, soild fill is used. If the fill type is
     set to a single negative number, negative values will use the
     absolute value of the fill type, and positive values will be solid.


FINT
FINT is the contour fill interval, minimum and maximum values
separated by slashes:


fill interval / minimum / maximum


The contour fill interval may be any real number.  If it is not
specified or if the value is 0, the program will select an interval
which will generate 5 to 10 contour fill levels.


The minimum and maximum values specify the range of data to use in
selecting the fill levels.  If either value is not specified, the
value will be obtained from the range of values in the dataset.  If
the minimum and maximum are equal, that value will be used and only
one contour fill level will be selected; however, since the number
of colors is one greater than the number of fill levels, two colors
will be needed--the first for filling regions with values less than
the input value and the second for filling regions of greater value.


A list of two or more fill levels may be entered using semicolons
to separate the individual values.  In this case, the minimum and
maximum are ignored.


     WIND

     WIND specifies the wind symbol, size, width, type, and head size
     separated by slashes:

      wind symbol / size / width / type / arrow head size

     The wind symbol contains a letter for symbol type, a letter for symbol
     units and a color number with no separators.  The character meanings
     are:

       TYPE:   B = BARB        A = ARROW               D = DIRECTIONAL ARROW

       UNITS:  K = KNOTS       M = m/s

       COLOR:  Color number    0 = no wind plotted

     The default is BM1, i.e., barbs in meters/sec plotted in color number
     1.  If a partial specification is given, the remaining characteristics
     will be taken from the default.

     The wind size is a real number which will be used as a multiplier for
     the default wind symbol size.  If this number is negative, zero, or
     missing, the current size will be used.  The sizes for barbs and
     arrows are independent.

     The width is an integer specifying the line width to use in drawing
     the arrows or barbs.

     CLRBAR

     CLRBAR specifies the characteristics of a color bar associated with
     contour fill.  The attributes are separated by slashes:

     color / orientation / anchor / x;y / length;width /  frequency | text_info

     Color is the color of the labels and the bounding box around the
     color bar.  If color is negative, the bounding box will not be drawn,
     and labels will be drawn in colors corresponding to the color bar.
     If the color is 0 or missing, no color bar is drawn.

     Orientation specifies a vertical or horizontal orientation of the
     color bar where 'V' is a vertical bar and 'H' is a horizontal bar.
     The default is 'V'.

     Anchor describes the location on the color bar corresponding to
     the location given in the next parameter.  Valid inputs are
     LL, LC, LR, CL, CC, CR, UL, UC, and UR for lower-left, lower-center,
     lower-right, center-left, centered, center-right, upper-left,
     upper-center, and upper-right, respectively.  For example, an 'LL'
     anchor point, with a x;y of .1,.1, will place the lower-left corner
     of the color bar at view coordinates .1, .1.  The default anchor
     point is 'LL'.

     IJSKIP

Syntax
                 Iskp;Istrt;Istp/Jskp;Jstrt;Jstp
     or
                 Yes
     or
                 No

     If IJSKIP = NO, then the results are the same as for IJSKIP set
     to blank or zero. 

    If IJSKIP = YES, then all the skipping values
     are computed automatically.  When IJSKIP = YES, skipping is only
     done if the number of grid points required to cover the display
     area is too large. 
The automatic number of points skipped is
     the same in each index direction, and it will be the minimum
     number required to make the internal computational grid fit in
     allocated memory.

     IJSKIP and SKIP are functionally independent.  If SKIP is also
     specified, IJSKIP operates first to create the subset grid,
     then the SKIP information is applied to that subset grid, which
     has already been thinned by IJSKIP.

Since IJSKIP and SKIP are done in series, the combined effect is multiplicative.  


      Example                            Action

     IJSKIP = YES   Skip only if necessary, skipping as few points
                    as possible; if the subset area is reduced fewer
                    points will be skipped

     IJSKIP = 5     Skip 5 points in both index directions; beginning
                    and ending indexes are automatically determined

     IJSKIP = 5/3   Skip 5 points in the I index direction; skip 3
                    points in the J index direction; beginning and
                    ending indexes are automatically determined

     IJSKIP = 5;3/2 Skip 5 points in the I index direction; skip 2
                    points in the J index direction; beginning I
                    index is 3; all other indexes are determined
                    automatically





Gempak color table


            
3. Issues encountered
1) use alias name,  not working
Wrong:
GEMPAK-GDINFO>gdfile=gfs|2015100900/f060
GEMPAK-GDINFO>r
[FL -4]  Cannot read file .... [DM -7]  Read error. [GD -2]  File /export-3/ncosrvnfs-cp/model/grid/gempak/gfs/ cannot be
Right:
GEMPAK-GDINFO>gdfile=gfs|20151009/0600
GEMPAK-GDINFO>gdfile=gfs|20151009/06


2) specify grid file directly, it works.
GEMPAK-GDINFO>l
GDFILE   = /export-3/ncosrvnfs-cp/model/grid/gempak/gfs/gfs_2015100900f060
LSTALL   = YES
OUTPUT   = tf/abc
GDATTIM  = f60
GLEVEL   = all
GVCORD   = all
GFUNC    = all
GEMPAK-GDINFO>r
GRID FILE: /export-3/ncosrvnfs-cp/model/grid/gempak/gfs/gfs_2015100900f060                             
GRID NAVIGATION:
   PROJECTION:          CED              
   ANGLES:                 0.0     0.0     0.0
   GRID SIZE:              360     181
   LL CORNER:           -90.0000    0.0000
   UR CORNER:            90.0000   -1.0000
GRID ANALYSIS BLOCK:
   ANALYSIS TYPE:        BARNES
   DELTAN:               4.000
   DELTAX:           -9999.000
   DELTAY:           -9999.000
   GRID AREA:           -90.00 -180.00   90.00  180.00
   EXTEND AREA:         -90.00 -180.00   90.00  180.00
   DATA AREA:           -90.00 -180.00   90.00  180.00
Number of grids in file:   366
Maximum number of grids in file:   4999
NUM       TIME1              TIME2           LEVL1 LEVL2  VCORD PARM
   1     151009/0000F060                          0         TROP PRES     
   2     151009/0000F060                          0         TROP ICAHT    
   3     151009/0000F060                          0         TROP HGHT     
   4     151009/0000F060                          0         TROP TMPK     
   5     151009/0000F060                          0         TROP UREL     
   6     151009/0000F060                          0         TROP VREL       



No comments:

Post a Comment