Versions Compared

Key

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

Problem

Excerpt
hiddentrue

You try to retrieve data from the ECMWF data archive in NetCDF netCDF format but the retrieval fails with this message

grib_to_netcdf: Why do I get the error "Wrong number of fields... Try using the -T option"?

Solution

You try to retrieve data from the ECMWF data archive in NetCDF netCDF format but the retrieval fails with this message:

...

  • you request forecast data in NetCDF netCDF format
  • your data request contains overlapping "time"+"step" specifications

...

In this example you get two data values at the same validity time 2016-12-01, 15:00.  The NetCDF netCDF format does not support multiple data values at a single time, hence the creation of the output NetCDF netCDF file fails, triggering the error message.

Solution

The solution is:

  • Retrieve the data in its native GRIB format, which supports multiple data values at any one validity time.
    Then convert the data from GRIB to NetCDF format using the grib_to_netcdf tool with the -T option.
  • Retrieve data for each forecast "time" separately, for example for ERA-Interim:
    • first with time = 00:00 and all required steps
    • then with time = 12:00 and all required steps


Content by Label
showLabelsfalse
max5
spaces~usa
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = in ("kb-troubleshooting-article","eccodes-faqs","grib","grib_to_netcdf","conversion","netcdf") and label in ("netcdf","grib") and type = "page" and space = "UDOC"
labelskb-troubleshooting-article

...