WXP
Program Reference

gribfile

Sections

NAME

gribfile - Model/GRIB data parser

SYNOPSIS

gribfile [parameters...] filename

PARAMETERS

Command Line Resource Default Description
-h help No Lists basic help information.
-df=filename default wxp.cfg Sets the name of the resource file.
-na=name name the program name Specifies the name used in resource file parsing.
-me=level message out2 Specifies level of messages to be displayed
-fp=path file_path the current directory Specifies location of database files.
-dp=path data_path the current directory Specifies the location of the input raw data files.
-cp=path con_path the current directory Specifies location of decoded/converted data files
-gp=path grid_path the current directory Specifies location of gridded output files from WXP.
-mp=path model_path the current directory Specifies location of raw model GRIB data
-nc=name_conv name_conv name.cnv or name_conv file This sets which name convention file to use.
-if=in_file in_file program specific Specifies the input file name tag.
-of=out_file out_file program specific Specifies the output file name tag.
-ou=output output program specific Specifies the output of the program.
-cu=[hour] current none This specifies to use current data files.
-ho=hour hour none Specifies the exact hour that a data file is valid for.
-mo=model model None Sets the input forecast model
-gt=grid_type grid_type all grids Specifies the specific grid type
-gn=number grid_num None Specifies the grid in the file to select
-pa=param[,param...] parameter none Specifies addition parameters to program.
filename (positional) filename none Specify input filename

DESCRIPTION

This program scans a multigrid file and displays vital information on each grid contained within the file. This is helpful in determining which grids are available to be contoured by the prog:gridplot program.

The programs needs an input grid/GRIB file to process. This is done either by specifying a file on the command line or using the resrc:model resource and the resrc:current resource. The name convention for the file will be based on the model.lup file. If another name convention is desired, the resrc:in_file resource can be used.

The default output gives general information:

Reading from grid file: /data/nwstg/model/13121600_nam.grb
   0: NAM analysis for 00Z 16 DEC 13-120-150 mb AG V wind component
   1: NAM analysis for 00Z 16 DEC 13-10 m AG U wind component
   2: NAM analysis for 00Z 16 DEC 13-450 mb U wind component
   3: NAM analysis for 00Z 16 DEC 13-450 mb Vertical velocity
   4: NAM analysis for 00Z 16 DEC 13-450 mb V wind component
   5: NAM analysis for 00Z 16 DEC 13-Surface Geopotential Height
...
1935: NAM 60 hour ending 12Z WED 18 DEC 13-12 hour acc Surface Precipitation amount
1936: NAM 60 hour valid 12Z WED 18 DEC 13-100 mb Relative humidity
1937: NAM 60 hour valid 12Z WED 18 DEC 13-100 mb U wind component
1938: NAM 60 hour valid 12Z WED 18 DEC 13-400 mb V wind component
1939: NAM 60 hour valid 12Z WED 18 DEC 13-Sea level Sea Level Pressure

To help in specifying time, level and variable parameters to gridplot, toggle message level out4:

   0: NAM analysis for 00Z 16 DEC 13-120-150 mb AG V wind component
      Model: NAM Grid: 211 Time: 0 anal Level: 116 150120 120-150mb_ag Variable: 34 vwnd []
      lamb:40.606998:-95.000000:25.000000:25.000000:,40.606998,-100.553001,93,65,0.812700,0.812700
   1: NAM analysis for 00Z 16 DEC 13-10 m AG U wind component
      Model: NAM Grid: 211 Time: 0 anal Level: 105 10 10m_ag Variable: 33 uwnd []
      lamb:40.606998:-95.000000:25.000000:25.000000:,40.606998,-100.553001,93,65,0.812700,0.812700

This will list internal numbers which reflect data directly from the GRIB product. This can be helpful in determining whether a grid, model or variable that is not currently supported by WXP. In the case of model files with header file, the domain information will not print since only the header file is used to query this information.

By going to debug message level, much more information from the GRIB product is available.

Querying Specific Grids

If a specific grid is needed, the grid_num resource can be specified. Once specified, only the grids that match the parameters are listed in the output. The format of the grid_num resource is as follows:

+time:level:var[:units]
or
#num[:units]

The value of num represents the sequence number of the grid in the file. Grids are numbered starting at 0 (zero).

The values of time, level, and var make it possible to specify the grid based on typical grid information. Any valid forecast time, level and variable can be specified. For more information, use the full listing with the out3 message level. Possible values for each are:

A value of miss can be used in any of the 3 categories if all grids matching the other parameters is needed. For example, if all the 24 hour products are needed, specify the time and leave the other two as miss.

If the grid file contains multiple grid types such as 207 and 211 in the case of the ETA model, then the grid_type resource can be specified to obtain the correct grid.

Output Files

By default, gribfile does not create any output other than the listings. If an output file is desired, the out_file resource can be specified to create a file to dump the requested grids. It should be noted that this should be used only if a subset of the total grids is needed. The value of the out_file resource is the name convention to be used for the output file.

Header Files

This program can generate header files if needed. By specifying "-ou=hdrfile", the program will search through the model file and generate an appropriate header file. If the header file exists, the program will ask the user to overwrite or append. If the user selects append, the program will start the header search after the last header in the header file. This can significantly reduce runtime.

EXAMPLES

FILES

SEE ALSO


Last updated October 2013