GEMPAK Manual | Programs

GDDIAG computes a scalar/vector diagnostic grid and adds it to the
grid file.

INPUT PARAMETERS
 
    GDFILE    Grid file
    GDOUTF    Output grid file
    GFUNC     Scalar grid
    GDATTIM   Grid date/time
    GLEVEL    Grid level
    GVCORD    Grid vertical coordinate
    GRDNAM    Grid parameter name
    GRDTYP    Diagnostic grid type (Scalar/Vector)
    GPACK     Packing type/number of bits
    GRDHDR    Grid Header Flags
    PROJ      Map projection/angles/margins|drop flag
    GRDAREA   Area covered by grid
    KXKY      Number of grid points in x;y
    MAXGRD    Maximum number of grids
    CPYFIL    Grid file whose navigation is to be used in new grid file | subare
    ANLYSS    Grid analysis block
 
 

PROGRAM DESCRIPTION
 
    GDDIAG computes a scalar/vector diagnostic grid and saves the
    result in a GEMPAK grid file.

    The input grids for the computation must be in GDFILE. The
    resulting grid is added to the output file, GDOUTF. The
    input and output files may be the same. If the output file
    does not exist, GDDIAG will use PROJ, GRDAREA, KXKY, MAXGRD,
    CPYFIL and ANLYSS to create the output file on-fly.

    The name of the output grid is given in GRDNAM.  If this
    value is blank, the name generated by the grid diagnostic
    package will be used.  The time, level, and vertical
    coordinate associated with the grid may also be set in
    GRDNAM using the inline parameter specifications:  ^time,
    @level, %coordinate name.  These specifications follow the
    grid name. For vector grid, 'U' is prefixed to GRDNAM for
    the grid U-component, and 'V' for the V-component.

    GPACK defines grid packing.  If GPACK is blank, no packing
    will be done.  Grid packing details are documented in the
    GPACK variable documentation.


EXAMPLES
 
    1.  Compute the divergence of the gridded wind at 850 mb
        from the 48-h forecast for the last model run and
        save the result in MYFILE.GRD.  Use the default name
        for the grid.  Do not pack the grid.


        GDFILE   =  ngm.grd
        GDOUTF   =  myfile.grd
        GFUNC    =  div [wnd]
        GDATTIM  =  f48
        GLEVEL   =  850
        GVCORD   =  pres
        GRDNAM   =
	GRDTYP   =  S
        GPACK    =  none
        PROJ     =
        GRDAREA  =
        KXKY     =
        MAXGRD   =
        CPYFIL   = ngm.grd
        ANLYSS   =


    2.  Compute the magnitude of the gradient of the dewpoint
        depression at 500 mb for the last time in the grid
        file and store the result in the input file.  Name
        the output grid DEWGRAD.  Use GRIB packing with
        16 bits per grid point.

        GDFILE   =  ngm.grd
        GDOUTF   =  ngm.grd
        GFUNC    =  mag ( grad ( sub ( tmpc, dwpt ) ) )
        GDATTIM  =  last
        GLEVEL   =  500
        GVCORD   =  pres
        GRDNAM   =  dewgrad
	GRDTYP   =  S
        GPACK    =  grib/16
        PROJ     =
        GRDAREA  =
        KXKY     =
        MAXGRD   =
        CPYFIL   =
        ANLYSS   =


    3.  Compute the 12-h time change of the layer difference
        of potential temperature between 700 and 500 mb.
        Assign the difference to 600 mb at a time between
        the two difference times.  Name the grid DTHTDP.

        GDFILE   =  ngm.grd
        GDOUTF   =  ngm.grd
        GFUNC    =  sub ( ldf ( thta ), ldf ( thta^F06 ) )
        GDATTIM  =  f18
        GLEVEL   =  500:700
        GVCORD   =  pres
        GRDNAM   =  dthtdp^f12@600
	GRDTYP   =  S
        GPACK    =  grib/16
        PROJ     =
        GRDAREA  =
        KXKY     =
        MAXGRD   =
        CPYFIL   =
        ANLYSS   =

ERROR MESSAGES
 
    [GDDIAG  -1]    Fatal error initializing TAE.
    [GDDIAG  -2]    Fatal error reading TAE parameters.
    [GDDIAG  -3]    Error initializing GEMPLT.
    [GDDIAG  -4]    There is no input file specified.
    [GDDIAG  -5]    Error creating output grid
    [GDDIAG  -6]    Error opening input files.
    [GDDIAG  -7]    Error writing output grid.
    [GDDIAG  -8]    Only one output file is permitted.
    [GDDIAG  -9]    Output file open failure.
    [GDDIAG -10]    Grid files have different navigations.
    [GDDIAG -11]    Output level is invalid.
    [GDDIAG -12]    Output time is invalid.
    [GDDIAG -13]    Output vertical coordinate is invalid.
    [GDDIAG -14]    Invalid grid type.

    [GDDIAG  -1]    Fatal error initializing TAE.
    [GDDIAG  -2]    Fatal error reading TAE parameters.
    [GDDIAG  -3]    Error initializing GEMPLT.
    [GDDIAG  -4]    There is no input file specified.
    [GDDIAG  -5]    Error creating output grid.
    [GDDIAG  -6]    Error opening input files.
    [GDDIAG  -7]    Error writing output grid.
    [GDDIAG  -8]    Only one output file is permitted.
    [GDDIAG  -9]    Output file open failure.
    [GDDIAG -10]    Grid files have different navigations.
    [GDDIAG -11]    Output level is invalid.
    [GDDIAG -12]    Output time is invalid.
    [GDDIAG -13]    Output vertical coordinate is invalid.
    [GDDIAG -14]    Invalid grid type.