WXP version 5
Program Reference

GRIBLOOK

Sections

NAME

griblook - GRIB data query program

SYNOPSIS

griblook [parameters...] filename

PARAMETERS

Command Line Resource Default Description
-h help No Lists basic help information.
-df=filename default .wxpdef Sets the name of the resource file.
-na=name name griblook Specifies the name used in resource file parsing.
-ba batch No Run program in batch mode
-me=level message out2 Specifies level of messages to be displayed
  • file information - mess
  • parameter information for grbcalc - out3
  • specific grid information - out4
  • low level GRIB information - debug
-fp=filepath file_path current directory Specifies location of database files.  
-dp=datapath data_path current directory Specifies the location (path) of the input raw data files. This may be modified in the name convention file.
-cp=conpath con_path current directory Specifies the location (path) of the input converted data files. This may be modified in the name convention file.
-gp=gridpath grid_path current directory Specifies the location of the output grid files generated by the program. These files are not generated unless the out_file resource is specified and the output is a gridded field.
-nc=name_conv name_conv name_conv The name convention file specifies how files are named in WXP. This sets which name convention file to use.
-if=in_file in_file grib Specifies the input file name tag. This value can also be specified with the model resource by looking up the naming convention in the model.lup file. The default is grib, but it can be modified to any value in the filename convention file. A full name convention can be specified as well.
-of=out_file[,out...] out_file None Specifies what type of grid file to create. By default, no output file is generated when the program is run. To produce an output file, this resource must be specified.  There are the following output file types:
  • wxp - WXP ASCII grid or raw file
  • wxpb - WXP binary grid file
  • raw - WXP ASCII raw file
  • cdf - NetCDF binary grid file

Second, the out_file resource specifies the output file name tag. The default is grd but it can be modified to any value in the filename convention file. The file name tag can be specified separately or appended to the file type: wxp:eta_grd

A full filename can be specified which can contain name convention tags.

-pf=file_param file_param User prompt
Batch: use
This specifies how to treat output files that exist:
  • Use - use the existing file, don't overwrite. The program terminates when this occurs.
  • Over - overwrite the existing file
  • App - append the information onto the end of the existing file
  • Y - same as overwrite
  • N - same as use.
-mf=mapfile[,...] map_file wxp.map or
cont.dat, country.dat for domains outside North America
Specifies the name of the map database file. Multiple maps can be specified along with attributes to describe how to draw the map.
-cu=[hour|la] current None This specifies to use current data files. The current filename is based on the name convention. An optional hour can be specified for older data. If la is specified, the program will search back to find the most recent available file.
-ho=hour hour None This resource specifies the exact hour that a data file is valid for. This locks in the start hour for a multi-file sequence.
-mo=model model ngm or first model listed in model.lup file. Specifies the model to use as input data. These are defined in the model.lup file. This file can define how model grids are pieced together. Some samples are:
  • ngm -- Nested Grid Model
  • eta -- ETA model
  • avn -- Aviation model
  • mrf -- Medium Range Forecast model
-gt=grid_type grid_type None.
Displays all grids
This specifies which type of grid type to specifically parse for. This is a single numeric value which represents the domain that the grid covers.   For example, the ETA model is on grid 211.
-gn=grid_num grid_num None.
Displays all grids
This specifies which type of grid to specifically parse for. The format 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:

  • time: init,06,12,18,24,30,36,42,48,60,72,d3,d4,d5,d6,d7,d8,d9,d10
  • level: sfc, sl (sea level), trop, mwnd, 1000, 850, 700, 500, 400, 300, 200, 100
  • var: temp, rhum, pres, vvel, uwnd, vwnd, prec, lift
-ou=output output None. This specifies any additional output to be produced by the program:
  • hdrfile - produce a header file for the input grid file
-pa=param[,param...] parameter None Specifies additional plotting parameters. See the parameter resource for more details.
  • nodhr - Don't use header file for quick lookup
  • usehdr - Use a header file for quick lookup
  • max_bad=limit - Specifies limit of bad values that causes rest of GRIB decoding to stop
filename[#seq] filename None
User Pompt
Batch: current=la
The name of the grid data file to be plotted. An optional sequence number can be added to designate the time for non-WXP files.

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 grbcalc program. 

The program will display data from many model sources. The model type is specified using the model resource. The specified string is first looked up in the model.lup file which cross-references the file to a file naming convention. If the grids are split for a particular model type, the program will use the first grid name convention in parsing.

The programs starts off by prompting the user for input grid file name. The list of available grid files is based on the file name convention which is dependent on the model type and the file name tag associated with it. The tag can be specifically changed with the in_file resource. The user may specify the input file either via the command line of through the current resource.

The default output gives general information:

  0: ETA analysis for 0000Z 29 SEP 97-100 mb Vertical velocity (Pa/s)
  1: ETA analysis for 0000Z 29 SEP 97-150 mb Vertical velocity (Pa/s)
  2: ETA analysis for 0000Z 29 SEP 97-200 mb Vertical velocity (Pa/s)
  3: ETA analysis for 0000Z 29 SEP 97-250 mb Vertical velocity (Pa/s)
  4: ETA analysis for 0000Z 29 SEP 97-300 mb Vertical velocity (Pa/s)  
...
448: 12 hour ETA valid 12Z MON 29 SEP 97-500 mb Abs vorticity (/s)
449: 12 hour ETA valid 12Z MON 29 SEP 97-250 mb Abs vorticity (/s)
450: 12 hour ETA valid 12Z MON 29 SEP 97-Whole atms Precipitable water (kg/m^2)
451: 12 hour ETA valid 12Z MON 29 SEP 97-0-180 mb AG 4 lyr lifted index (dK)
452: 12 hour ETA valid 12Z MON 29 SEP 97-2 m AG Temperature (K)
453: 12 hour ETA valid 12Z MON 29 SEP 97-2 m AG Relative humidity (%) 
...

To help in specifying time, level and variable parameters to grbcalc, toggle message level out3:

448: 12 hour ETA valid 12Z MON 29 SEP 97-500 mb Abs vorticity (/s)
     Model: ETA  Time: 12hr         Level: 500mb        Variable: avort   Units: /s
449: 12 hour ETA valid 12Z MON 29 SEP 97-250 mb Abs vorticity (/s)
     Model: ETA  Time: 12hr         Level: 250mb        Variable: avort   Units: /s
450: 12 hour ETA valid 12Z MON 29 SEP 97-Whole atms Precipitable water (kg/m^2)
     Model: ETA  Time: 12hr         Level: whole        Variable: pwat    Units: kg/m^2
451: 12 hour ETA valid 12Z MON 29 SEP 97-0-180 mb AG 4 lyr lifted index (dK)
     Model: ETA  Time: 12hr         Level: 0-180mb_ag   Variable: lift4   Units: dK
452: 12 hour ETA valid 12Z MON 29 SEP 97-2 m AG Temperature (K)
     Model: ETA  Time: 12hr         Level: 2m_ag        Variable: temp    Units: K                                                                      

To get more information on the internal data within the grid, move the message level to out4:

  0: ETA analysis for 0000Z 29 SEP 97-100 mb Vertical velocity (Pa/s)
     Model: ETA  Time: init         Level: 100mb        Variable: vvel    Units: Pa/s
     Model: 89 Ltype: 10 Level: 100 Var: 39 Hour: 0 Grid: 211
     Proj: 4 Lat: 40.62 Lon: -100.51 NX: 93 NY: 65 DX: 0.63 DY: 0.63
     lamb::-95.000:25.000:25.000:1.277,40.620,-100.510,93,65,0.6263,0.6263

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, griblook 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.

FILES

SEE ALSO


Last updated July 28, 1998