Problem
Excerpt |
---|
|
If you have a file with both Control and Perturbed forecasts, grib_to_netcdf will only convert the pf. Normally from 51 members in the GRIB file, only 50 appear in the netCDF. |
If you have a GRIB file with both Control and Perturbed forecasts, grib_to_netcdf will only convert the Perturbed Forecast. From 51 members present in the GRIB file, only 50 appear in the netCDF file.
No Format |
---|
% grib_to_netcdf -o output.nc input.grib
...
grib_to_netcdf: Found 51 GRIB fields in 1 file.
...
grib_to_netcdf: Done.
% ncinfo output.nc
...
dimensions(sizes): longitude(26), latitude(31), number(50), time(1) |
This only occurs when 'type=pf and type=cf' fields coexist in the same file (common use case if you get real-time data).
Solution
The solution is to set the type=pf for the control forecast. Once converted the Control Forecast will appear as 'ensemble_number' = 0 in the NetCDF file.
No Format |
---|
% grib_set -s type=pf -w type=cf input.grib input2.grib
% grib_to_netcdf -o output.nc input2.grib |
Related articles
Content by Label |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | ~usa |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
excludeCurrent | true |
---|
cql | label in ("kb-troubleshooting-article","eccodes-faqs","grib","conversion","netcdf") and label in ("netcdf","grib") and label = "grib_to_netcdf" and type = "page" and space = "UDOC" |
---|
labels | kb-troubleshooting-article |
---|
|