There are several programs distributed with OpenIFS that can be useful in working with the grids used by the model. These are documented here.

All these programs except for 'gaussgr' are compiled executables, build when the OpenIFS model is compiled. By default, after compilation, they can be found in the 'make' directory in the build sub-directory pointed to by the OIFS_COMP & OIFS_BUILD environment variables. e.g. for OIFS_COMP=gnu, OIFS_BUILD=opt, the compiled executables are found in 'make/gnu-opt/oifs/bin'.


Number of latitudes in a grid: gaussgr

The command 'gaussgr' returns the number of latitudes between the pole and the equator for a given input resolution and grid type. It is a bash script and can be found in the 'bin' directory of the OpenIFS distribution.

To see command arguments...
% gaussgr -h
Usage: gaussgr  -r resol  -g gtype
     resol : spectral truncation wavenumber
     gtype should be one of:
       l_2    - linear reduced (default)
       l_full - linear regular (full)
       _2     - quadratic reduced
       _full  - quadratic regular (full)
       _3     - cubic reduced
       _4     - cubic octahedral

Show latitudes for Tco95 cubic octahedral grid...
% gaussgr -r 95 -g _4
96
Show latitudes for Tl511 linear reduced grid...
% gaussgr -r 511 -g l_2
256

Get resolution of GRIB files: getres

This command will provide all resolution information by reading OpenIFS GRIB files (both initial files and model output files).

Note getres.exe is a compiled program provided with OpenIFS and not a Bash script.

To see command arguments...
% getres.exe -h
  GETRES VERSION  1.0                                                            
  getres -s spfile -g gpfile -p path [-o out]
  delivers :
  INPUT_RESOL, INPUT_LEVELS, INPUT_GTYPE
     spfile = input spectral file (required)
     gpfile = input grid-point file (required)
     path   = dirpathname of resol-table file
     out    = output filename (default:"result"

The command expects the location of the 'resolution: res' files provided with in the 'ifsdata' directory. It helps if the OpenIFS environment variable OIFS_DATA_DIR is set (see the file oifs-config.sh in the OpenIFS distribution).

Extract resolution information from T21 test GRIB files...
% getres.exe -s ICMSHepc8INIT -g ICMGGepc8INIT -p $OIFS_DATA_DIR/rtables
  GETRES VERSION  1.0                                                            
  OUTPUT FILENAME IS "./result" 
  INPUT_RESOL=          21
  INPUT_LEVELS=          19
  INPUT_GTYPE= _full
Extract resolution information from cubic octahedral initial files...
% getres.exe -s ICMSHhah0INIT -g ICMGGhah0INIT -p $OIFS_DATA_DIR/rtables
  GETRES VERSION  1.0                                                            
  OUTPUT FILENAME IS "./result" 
  PATH openifs/ifsdata/43r3/rtables/rtable_4095                                                                          
  INPUT_RESOL=          95
  INPUT_LEVELS=          60
  INPUT_GTYPE= _4