Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
titleBGColorlightgrey
titleGRIB/GRIB_API related questions
Expand
titleQ. I get an error message from GRIB_API when I run the model saying 'boot.def' not found?

A. The 'boot.def' file is the GRIB definitions file. The location of the boot.def file is hardcoded into the GRIB_API library when it is compiled. Make sure that the directory where GRIB_API was installed has not moved. If it has, this hardcoded location will be wrong. You can override this location by using the environment variable: GRIB_DEFINITION_PATH and set this to the directory containing the boot.def file. e.g.
export GRIB_DEFINITION_PATH=/usr/local/apps/grib_api/1.9.18/share/definitions

This error can arise when grib_api is compiled in HPC environments where it's compiled on the front-end but the batch system has different mount points for the frontend directories causing the path to the grib_api installation to be different.

 

 

Expand
titleQ. OpenIFS fails with an error message from GRIB_API.

A. This usually indicates an error in the GRIB file or GRIB_API configuration rather than the model. Try using the 'grib_ls' or 'grib_dump' commands on the file causing the problem to try to reproduce the error. See the GRIB FAQ on this page, or email openifs-support@ecmwf.int and include the model output file (NODE_001.01) and the job log.

Expand
titleQ. OpenIFS (or grib_api) reports: Wrong size for bitmap / passed array too small

A. When you run the model (or using the grib_ls/grib_dump tools on the GRIB file), you see this error:

GRIB_API ERROR   :  Wrong size for bitmap it contains 1373624 values
GRIB_API ERROR   :  unable to get bitmap as double array (Passed array is too small)

This occurs because sometimes GRIB files are incorrectly encoded for the property 'longitudeOfLastGridPoint'. This is known to happen for the 'stl1' field (surface temperature layer 1). grib_dump shows this:

  longitudeOfLastGridPointInDegrees = 340;

To correct it, use a command similar to:

grib_set -w shortName=stl1 -s longitudeOfLastGridPoint=359824 ICMCLabcdINIT ICMCLabcdINIT.fixed

where 'stl1' is the field to be corrected, 359824 is the last longitude point of (359.824degrees) of (in this case) the correct resolution, and ICMCLabcdINIT is the file to be corrected.

Email openifs-support@ecmwf.int for additional assistance.

Expand
titleQ. What are the GRIB_API environment variables and what do they mean?

A. The environment variables for GRIB_API are described on the GRIB_API software support page.

Expand
titleQ. How can I check that GRIB_API was installed correctly / How do I find out where GRIB_API installed the definitions and sample files?

A. If grib_api installed correctly, the command grib_info will print out the location of the sample files and definitions. If you get 'grib_info not found' make sure you have added the grib_api installation bin directory to your PATH environment variable.

Expand
titleQ. How do I convert from GRIB to netCDF?

A. Please see HowTo convert convert model output to netCDF.

Expand
titleQ. When I use grib_ls on OpenIFS output, I get an error: GRIB_API_ERROR : unable to represent the step in h

A. If you see this type of error:

Code Block
% grib_ls ICMGGepc8+000004
ICMGGepc8+000004
edition  centre typeOfLevel level  dataDate  stepRange dataType  shortName packingType

GRIB_API ERROR   :  unable to represent the step in h
1       ecmf    surface     0      20041015 Decoding invalid stepRange

it is most likely because the model step isn't expressible as an integer number of hours (for example if the model output is every timestep with a timestep less than 1hr). Change the units to either minutes or seconds:

Code Block
 grib_ls -s stepUnits=m ICMGGepc8+000004
 grib_ls -s stepUnits=s ICMGGepc8+000004
Expand
titleQ. OpenIFS fails with GRIB_API_ERROR: unable to locate sample file gg_sfc_grib1.tmpl

A. This error means the model can't find the GRIB templates it needs to write out the model results. These are contained in a directory called 'ifs_samples' which is provided with the grib_api library. First check that the directory pointed to by OIFS_GRIB_API_DIR exists and is readable. Then check if the directory $OIFS_GRIB_API_DIR/share/grib_api/ifs_samples exists and is readable. If it does then it's possible that the library may have been moved (or a link to it changed) and because these paths are hardcoded into the grib_api library at compile time, it means the model can't find it. To overcome this, set the environment variable:

GRIB_SAMPLES_PATH - Set to the folder containing the set of samples you want grib_api to use instead of the default one.

e.g.

export GRIB_SAMPLES_PATH=$HOME/ecmwf/grib_api/share/grib_api/ifs_samples/grib1_mlgrib2

Anchor
macosx
macosx

Panel
titleBGColorlightgrey
titleMac OS X specific questions
Expand
titleQ. When compiling GRIB_API on Mac OS X I get an error: ld: duplicate symbol _grib_file_not_found in .libs/action_class_alias.o and .libs/action.o

A. This is a known issue with compiling on Mac OS X. See this page on the GRIB_API Installation FAQ for the workaround.

Expand
titleQ. I'm using the Intel compiler and the MKL library but get this error: dyld: Library not loaded: libmkl_intel_lp64.dylib when I run OpenIFS.

A. On Mac OS X, the MKL library is a dynamic (shared) library which is loaded at runtime and not when the model is compiled. To ensure the library is found you need to add the directory containing the library to your dynamic library path environment variable (DYLD_LIBRARY_PATH). The Intel compiler supplies a script that correctly sets the compile environment for you which should be run. This is normally found in the Intel compiler install directory: /opt/intel/Compiler/11.0/054/Frameworks/mkl/tools/environment/mklvars.sh.

...