GDDIAG computes a scalar diagnostic grid and adds it to the grid file. INPUT PARAMETERS GDFILE *Grid file GDOUTF *Output grid file GFUNC *Grid function GDATTIM *Grid date/time GLEVEL *Grid level GVCORD *Grid vertical coordinate GRDNAM *Output parameter name GPACK *Packing type/number of bits PROGRAM DESCRIPTION GDDIAG computes a 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. 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. 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 = GPACK = none 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 GPACK = grib/16 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 GPACK = grib/16 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] Navigation in input and output files differs. [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.