McIDAS-X Learning Guide
Version 2020

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


Grids and Grid Files - Creating Grids and Grid Files

In this exercise, you will create a new grid dataset, copy and contour grids, create advection and divergence grids, and list the grids and grid files.
  1. Generate a local grid dataset in position 2 of the TEST-GRID dataset with a maximum of 100 grids, and the description ADVECTION AND DIVERGENCE GRIDS. Copy in the 12 hour 1000 mb forecast grids from the GRIB/GFS dataset.
    Type:  GRDCOPY GRIB/GFS TG.2 DEL=YES LEVEL=1000 FHOUR=12 TITLE='ADVECTION AND DIVERGENCE GRIDS' MAXGRD=100 NUM=ALL
    If you don't specify a maximum number of grids, the grid file is created with space for 1000 grids.

  2. List the new dataset.
    Type:  GRDLIST TG.2 NUM=ALL
    The dataset should contain five grids.

  3. Check to see that TG.2 contains the grids required to calculate divergence.
    Type:  GRDLIST TG.2 DER=DVG
    If the grid can be created, the following output will be shown:
     GRDLIST TG.2 DER=DVG  
     PAR  LEVEL      DAY          TIME     SRC  FHR  FDAY         FTIME    GRID  PRO
     ---- ---------- ------------ -------- ---- ---- ------------ -------- ----- ----
     DVG   1000 MB   03 SEP 19246 12:00:00  GFS   12 04 SEP 19247 00:00:00   N/A LAMB
     Number of grids listed = 1
     GRDLIST - done
    

    Notice the GRID number is listed as "MATH" or "N/A". This indicates that there is no actual divergence grid but that the component grids required to create it all exist within the TG.2 grid file. See the help sections of the individual commands for more information on the common meteorological parameters you can calculate from grids by using the DERIVE keyword.

    If the grid cannot be created because the component grids do not exist, an error will be produced.

  4. Create a divergence grid from from the grids in the dataset.
    Type:  GRDCOPY TG.2 TG.2 DER=DVG
  5. List the contents of the dataset to verify that a divergence grid was added.
    Type:  GRDLIST TG.2 NUM=ALL
    The new grid was filed into grid 6, which is the first available grid:
     Dataset position 2      Directory Title= ADVECTION AND DIVERGENCE GRIDS
     PAR  LEVEL      DAY          TIME     SRC  FHR  FDAY         FTIME    GRID  PRO
     ---- ---------- ------------ -------- ---- ---- ------------ -------- ----- ----
     U     1000 MB   03 SEP 19246 12:00:00  GFS   12 04 SEP 19247 00:00:00     1 LAMB
     Z     1000 MB   03 SEP 19246 12:00:00  GFS   12 04 SEP 19247 00:00:00     2 LAMB
     V     1000 MB   03 SEP 19246 12:00:00  GFS   12 04 SEP 19247 00:00:00     3 LAMB
     RH    1000 MB   03 SEP 19246 12:00:00  GFS   12 04 SEP 19247 00:00:00     4 LAMB
     T     1000 MB   03 SEP 19246 12:00:00  GFS   12 04 SEP 19247 00:00:00     5 LAMB
     DVG   1000 MB   03 SEP 19246 12:00:00  GFS   12 04 SEP 19247 00:00:00     6 LAMB
     Number of grids listed = 6
    

    Notice that the the DVG grid has now been created, has a grid number, and is listed as a PARAMETER.

  6. List information about the divergence grid:
    Type:  GRDINFO TG.2 PARAM=DVG
     GRDINFO TG.2 PARAM=DVG
     Statistics of
     Parameter: DVG
     Units: 1/S
     Level of data: 1000 MB
     Initial time of data: 120000 UTC
     Initial day of data:   2019246
     Data came from: GFS
     12-hour forecast
     
     Dataset: TG
     
     Minimum:  -0.2449790E-03 occurred at [row,col]: [   49,   72]
                                        [lat,lon]: [  28.42,  79.20]
     Maximum:   0.1370970E-03 occurred at [row,col]: [   39,   37]
                                        [lat,lon]: [  35.86, 109.19]
     Mean:  -0.2564339E-06
     SD  :   0.2353742E-04
     Number of points analyzed:   6045
     Number of points missing:       0
    
     Row range:     1 to    65
     Col range:     1 to    93
     GRDINFO Done, Number of grids statistically analyzed=1
    
  7. Create a temperature advection grid using the U, V and T grids. Use the formula TADV = -(u*DDX(T) + v*DDY(T)). Label the new grid TADV and set the units to K/sec.
    Type:  GRDCOPY TG.2 TG.2 G1='PARAM T' G2='PARAM U' G3='PARAM V' MATH='-(G2*(DDX(G1))+G3*(DDY(G1)))' NEWPAR=TADV K/S
    The G1, G2, ...., Gn keywords are used to define the grids you want to use. Since all the grids in this dataset are from the same level, model run and forecast hour, just specifying the parameter defines the grid uniquely. You can use additional search criteria (e.g. LEVEL, FHOUR) to further refine your selection. The MATH keyword defines the mathematical operation to perform on the grids specified with the Gn keywords. See the help sections of the individual commands for more information on the use of these keywords.

  8. List information about the temperature advection grid:
    Type:  GRDINFO TG.2 PARAM=TADV
  9. OR, if you would like to get statistical information on a grid created with a mathematical equation, but won't need to actually display the grid, you can run the GRDINFO command with the MATH keywords included.
    Type:  GRDINFO TG.2 G1='PARAM T' G2='PARAM U' G3='PARAM V' MATH='-(G2*(DDX(G1))+G3*(DDY(G1)))' NEWPAR=TTAD K/S
    This should list the same information as the previous GRDINFO command, except with a different parameter name.

In the next lesson, you will display the grids you created using the GRDDISP command.


[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]