Table of Contents |
---|
How to access the data
FTP url is diss.ecmwf.int
With Linux FTP line command:
Code Block | ||
---|---|---|
| ||
> ftp diss.ecmwf.int # provide username (wmo_xx) and password # list the available folders > ls # move into the folder for a specific day > cd yyyymmdd # download all the files in the folder > mget * . |
Filenaming convention and dissemination schedule
Once you access the FTP, you will see different folders in it, corresponding to the last 4 days of data (folder names in format dd-mm-yyyy 00:00.
...
- AA can be one of the following values:
- AN (Analysis data)
- FM (Forecast model level)
- FP (Forecast pressure level)
- FS (Forecast surface level)
- D means that the data come from ECMWF HRES data
- MMDDHHII is month, day, hour and minute on which the products are based
- mmddhhii is month, day, hour and minute on which the products are valid at (ii is set to 01 for high resolution forecast time step zero, type=fc, step=0)
- E is the Experiment Version Number’ (as EXPVER in MARS, normally 1).
How to read the data - ecCodes Library
In order to open and read in your GRIB files, ECMWF has developed the ecCodes library, which is ECMWF's primary software package for decoding and encoding GRIB and BUFR messages. In ecCodes, keys are predefined names used to access specific pieces of metadata or data in a GRIB or BUFR message. Each key represents a distinct attribute or property of the data contained within a message.
grib_ls
: Quick Summary of GRIB Messages
grib_ls
allows users to quickly view key metadata from one or more GRIB messages. It prints a tabular summary that includes information such as the variable name, level, date and time.
Basic Usage
Code Block | ||
---|---|---|
| ||
grib_ls 20250421000000-0h-oper-fc.grib2 |
Where 20250421000000-0h-oper-fc.grib2
is the name of the file you would like to summarise.
Sample Output
Code Block | ||
---|---|---|
| ||
edition centre date dataType gridType stepRange typeOfLevel level shortName packingType 2 ecmf 20250421 fc regular_ll 0 surface 0 lsm grid_ccsds |
...
-p key1,key2,...
: Display selected keys only.-w key=value
: Filter messages by key values.-m
: Displays the associated MARS keys.-n namespace
: Displays all the keys belonging to the namespace.
Use Case
You have downloaded a GRIB file containing surface-level forecast data. Before using the file for plotting or further processing, you want to check what parameters (e.g. 2 metre temperature, 10 metre wind U and V values, mean sea level pressure) and forecast steps are included in the file you have.
...
Code Block | ||
---|---|---|
| ||
grib_ls -p shortName,levelType,level,stepRange,validityDate,validityTime 20250504000000-0h-oper-fc.grib2 |
grib_dump
: Detailed Inspection of GRIB Content
grib_dump
provides a full and detailed output of the contents of GRIB messages, including both metadata and data values. It is especially useful for debugging or exploring the internal structure of GRIB files.
Basic Usage
Code Block | ||
---|---|---|
| ||
grib_dump 20250421000000-0h-oper-fc.grib2 |
Where 20250421000000-0h-oper-fc.grib2
is the name of the file you would like to inspect.
Sample Output (One Message Snippet)
Code Block | ||||
---|---|---|---|---|
| ||||
#============== MESSAGE 160 ( length=723061 ) ============== GRIB { # Meteorological products (grib2/tables/34/0.0.table) discipline = 0; editionNumber = 2; # European Centre for Medium-Range Weather Forecasts (common/c-11.table) centre = 98; subCentre = 0; # Start of forecast (grib2/tables/34/1.2.table) significanceOfReferenceTime = 1; dataDate = 20250421; dataTime = 0; # Operational products (grib2/tables/34/1.3.table) productionStatusOfProcessedData = 0; # Forecast products (grib2/tables/34/1.4.table) typeOfProcessedData = 1; # MARS labelling (grib2/grib2LocalSectionNumber.98.table) grib2LocalSectionNumber = 1; # Operational archive (mars/class.table) marsClass = 1; # Forecast (mars/type.table) marsType = 9; # Atmospheric model (mars/stream.table) marsStream = 1025; experimentVersionNumber = 0001; numberOfDataPoints = 1038240; # There is no appended list (grib2/tables/34/3.11.table) interpretationOfNumberOfPoints = 0; # Latitude/longitude (Also called equidistant cylindrical, or Plate Carree) (grib2/tables/34/3.1.table) gridDefinitionTemplateNumber = 0; # Earth assumed spherical with radius of 6 371 229.0 m (grib2/tables/34/3.2.table) shapeOfTheEarth = 6; Ni = 1440; Nj = 721; iScansNegatively = 0; jScansPositively = 0; jPointsAreConsecutive = 0; alternativeRowScanning = 0; latitudeOfFirstGridPointInDegrees = 90; longitudeOfFirstGridPointInDegrees = 180; latitudeOfLastGridPointInDegrees = -90; longitudeOfLastGridPointInDegrees = 179.75; iDirectionIncrementInDegrees = 0.25; jDirectionIncrementInDegrees = 0.25; gridType = regular_ll; NV = 0; # Analysis or forecast at a horizontal level or in a horizontal layer at a point in time (grib2/tables/34/4.0.table) productDefinitionTemplateNumber = 0; # Temperature (grib2/tables/34/4.1.0.table) parameterCategory = 0; # Temperature (K) (grib2/tables/34/4.2.0.0.table) parameterNumber = 0; #-READ ONLY- parameterUnits = K; #-READ ONLY- parameterName = Temperature; # Forecast (grib2/tables/34/4.3.table) typeOfGeneratingProcess = 2; generatingProcessIdentifier = 158; # Hour (grib2/tables/34/4.4.table) indicatorOfUnitForForecastTime = 1; stepUnits = h; forecastTime = 0; stepRange = 0; # Isobaric surface (Pa) (grib2/tables/34/4.5.table) typeOfFirstFixedSurface = 100; #-READ ONLY- unitsOfFirstFixedSurface = Pa; #-READ ONLY- nameOfFirstFixedSurface = Isobaric surface; scaleFactorOfFirstFixedSurface = 0; scaledValueOfFirstFixedSurface = 15000; # Missing (grib2/tables/34/4.5.table) typeOfSecondFixedSurface = 255; #-READ ONLY- unitsOfSecondFixedSurface = unknown; #-READ ONLY- nameOfSecondFixedSurface = Missing; scaleFactorOfSecondFixedSurface = MISSING; scaledValueOfSecondFixedSurface = MISSING; level = 150; shortName = t; name = Temperature; cfName = air_temperature; #-READ ONLY- cfVarName = t; modelName = IFS; #-READ ONLY- modelVersion = cy49r1; numberOfValues = 1038240; packingType = grid_ccsds; ccsdsFlags = 14; ccsdsBlockSize = 32; ccsdsRsi = 128; # A bit map does not apply to this product (grib2/tables/34/6.0.table) bitMapIndicator = 255; bitmapPresent = 0; values(1038240) = { 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241, 226.241 ... 1038140 more values } #-READ ONLY- maximum = 230.554; #-READ ONLY- minimum = 198.749; #-READ ONLY- average = 215.112; #-READ ONLY- standardDeviation = 7.31015; #-READ ONLY- skewness = 0.149981; #-READ ONLY- kurtosis = -1.23212; #-READ ONLY- isConstant = 0; #-READ ONLY- numberOfMissing = 0; #-READ ONLY- getNumberOfValues = 1038240; } |
...
-a
: If the file contains multiple messages, it will dump all of them (this is the default behaviour, but you can use-a
for dumping aliases).-p key1,key2,...
: If you want to dump specific keys from each message.-O:
enables Octet mode, producing a WMO documentation-style dump of the GRIB messages.-d
: prints all data values in the GRIB messages.
grib_to_netcdf
: Convert GRIB to NetCDF
ecCodes also allows you to convert your GRIB data into NetCDF files using the grib_to_netcdf
command.
Basic Usage
Code Block | ||
---|---|---|
| ||
grib_to_netcdf -o 20250421000000-0h-oper-fc_converted.nc 20250421000000-0h-oper-fc.grib2 |
Where -o
specifies the name of the NetCDF output file and 20250421000000-0h-oper-fc.grib2_converted.nc
is whatever name you specify for the output file.
Sample Output
Code Block | ||
---|---|---|
| ||
grib_to_netcdf: Version 2.40.0 grib_to_netcdf: Processing input file '20250421000000-0h-oper-fc.grib2'. grib_to_netcdf: Found 160 GRIB fields in 1 file. grib_to_netcdf: Ignoring key(s): method, type, stream, refdate, hdate grib_to_netcdf: Creating netCDF file '20250421000000-0h-oper-fc_converted.nc' |
...
-I key1,key2,...
: ignores specific keys during conversion. By default:method, type, stream, refdate, expver
are ignored.-S key1,key2,...
: splits the GRIB file according to specified keys. By default it will split:param, expver
.-k kind
: specifies the type of NetCDF file to create. Possible values are:1 -> netCDF classic file format
2 -> netCDF 64 bit classic file format (Default)
3 -> netCDF-4 file format
4 -> netCDF-4 classic model file format
grib_copy:
Copy Contents of a GRIB File
grib_copy copies the content of GRIB files, printing values of some keys.
Basic Usage
Code Block | ||
---|---|---|
| ||
grib_copy 20250421000000-0h-oper-fc.grib2 output.grib2 |
...
-w key[:{s|d|i}]{=|!=}value,key[:{s|d|i}]=value,...
: a 'Where' clause. Only GRIB messages matching the key/value constraints are copied to the output file. A valid constraint is of type key=value or key!=value. For each key a string (key:s), a double (key:d) or an integer (key:i) type can be defined. Default type is string. In the value, you can also use the forward-slash character '/' to specify an OR condition (i.e. a logical disjunction). Note: only one -w clause is allowed.-p key[:{s|d|i}],key[:{s|d|i}],..:
declaration of keys to print. For each key a string (key:s), a double (key:d) or an integer (key:i) type can be requested. Default type is string.
Product description
The products are High-Resolution (HRES) forecast and analysis data with a 0.1° by 0.1° grid (a subset of ECMWF Set-I).
...