[ncl-talk] Wrong time decoding on grib2
Nicolas GASNIER
ngprod41 at gmail.com
Tue Aug 4 03:50:33 MDT 2015
Hello NCL users,
I'm facing another GRIB problem with the new Meteo France datasets.
This is the ARPEGE and AROME model outputs, freely available as GRIB2
files. Datas are stored in different grib sets for surface data and
pressure level/height data, with a set for a group of 12 and 6 hours
forecasts respectively.
NCL can read correctly the first time set (00H12H for ARPEGE for
example), but it starts to bug for further forecasts. It seems like NCL
doesn't interpret correctly the time variable, and that problem seems to
increase as the forecast time increase.
For example, for the first surface dataset for ARPEGE (SP1), if you
print ncl_filedump, the dimension of forecast_time0 variable
is 12 for the 00H12H echeances and the dimension of the TPRATE variable
is (time, lat, lon). It has only 4 for the next 13H24H, and for the
latest sets (75H84H or 85H96H) it alternates between 1 and 2. The TPRATE
variable is 2D only (lat, lon). The expected result is 12 forecast hours
for every set, and the TPRATE variable shoud be always (forecast_time,
lat, lon), as one can see with a wgrib2 ouput (see example output at end
of mail).
I can convert to netcdf, using wgrib2 or grib_to_netcdf utility : the
time dimension becomes correct. But that process crash sometimes - maybe
due to particularities of the dataset. Anyway, it is too disk and CPU
intensive to be reasonable for my application.
I hope this issue can be worked around. Any clue about that will be much
appreciated, even solutions involving source patching and compiling !
The files are too big to be included, but one can get the datasets
directly on MF web site for a test (use SP1 dataset for example) :
For ARPEGE :
https://donneespubliques.meteofrance.fr/?fond=produit&id_produit=130&id_rubrique=51
For AROME
https://donneespubliques.meteofrance.fr/?fond=produit&id_produit=131&id_rubrique=51
Thanks for any help.
Regards
Nicolas Gasnier
-------------------------------------------------
Result for the 00H12H dataset :
$ ncl_filedump ARPEGE_0.1_00H12H_SP1.grib2
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
Variable: f
Type: file
filename: ARPEGE_0.1_00H12H_SP1
path: ARPEGE_0.1_00H12H_SP1.grib2
file global attributes:
dimensions:
forecast_time0 = 13
lat_0 = 521
lon_0 = 741
forecast_time1 = 12
variables:
...
float TPRATE_P8_L1_GLL0_acc ( forecast_time1, lat_0, lon_0 )
center : French Weather Service - Toulouse
production_status : Operational products
long_name : Total precipitation rate
units : kg m-2s-1
_FillValue : 1e+20
grid_type : Latitude/longitude
parameter_discipline_and_category : Meteorological
products, Moisture
parameter_template_discipline_category_number : ( 8, 0, 1, 52 )
level_type : Ground or water surface
type_of_statistical_processing : Accumulation
statistical_process_duration : initial time to forecast time
initial_time : 08/04/2015 (00:00)
integer forecast_time1 ( forecast_time1 )
long_name : Forecast offset from initial time
units : hours
...
$ wgrib2 ARPEGE_0.1_00H12H_SP1.grib2
1:0:d=2015080400:PRES:mean sea level:anl:
...
144:36148384:d=2015080400:TPRATE:surface:0-1 hour acc fcst:
145:36345772:d=2015080400:TPRATE:surface:0-2 hour acc fcst:
146:36550429:d=2015080400:TPRATE:surface:0-3 hour acc fcst:
147:36778596:d=2015080400:TPRATE:surface:0-4 hour acc fcst:
148:36995319:d=2015080400:TPRATE:surface:0-5 hour acc fcst:
149:37226250:d=2015080400:TPRATE:surface:0-6 hour acc fcst:
150:37469285:d=2015080400:TPRATE:surface:0-7 hour acc fcst:
151:37723534:d=2015080400:TPRATE:surface:0-8 hour acc fcst:
152:37989302:d=2015080400:TPRATE:surface:0-9 hour acc fcst:
153:38266837:d=2015080400:TPRATE:surface:0-10 hour acc fcst:
154:38556419:d=2015080400:TPRATE:surface:0-11 hour acc fcst:
155:38821541:d=2015080400:TPRATE:surface:0-12 hour acc fcst:
...
-------------------------------------------------
Result for the 73H84H dataset :
$ ncl_filedump ARPEGE_0.1_73H84H_SP1.grib2
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
Variable: f
Type: file
filename: ARPEGE_0.1_73H84H_SP1
path: ARPEGE_0.1_73H84H_SP1.grib2
file global attributes:
dimensions:
forecast_time0 = 12
lat_0 = 521
lon_0 = 741
variables:
...
float TPRATE_P8_L1_GLL0_acc ( lat_0, lon_0 )
center : French Weather Service - Toulouse
production_status : Operational products
long_name : Total precipitation rate
units : kg m-2 s-1
_FillValue : 1e+20
grid_type : Latitude/longitude
parameter_discipline_and_category : Meteorological
products, Moisture
parameter_template_discipline_category_number : ( 8, 0, 1, 52 )
level_type : Ground or water surface
type_of_statistical_processing : Accumulation
statistical_process_duration : initial time to forecast time
forecast_time : 72
forecast_time_units : hours
initial_time : 08/04/2015 (00:00)
...
$ wgrib2 ARPEGE_0.1_73H84H_SP1.grib2
...
133:34691684:d=2015080400:TPRATE:surface:0-73 hour acc fcst:
134:35059823:d=2015080400:TPRATE:surface:0-74 hour acc fcst:
135:35429187:d=2015080400:TPRATE:surface:0-75 hour acc fcst:
136:35799682:d=2015080400:TPRATE:surface:0-76 hour acc fcst:
137:36171501:d=2015080400:TPRATE:surface:0-77 hour acc fcst:
138:36544719:d=2015080400:TPRATE:surface:0-78 hour acc fcst:
139:36919171:d=2015080400:TPRATE:surface:0-79 hour acc fcst:
140:37294798:d=2015080400:TPRATE:surface:0-80 hour acc fcst:
141:37671824:d=2015080400:TPRATE:surface:0-81 hour acc fcst:
142:38049918:d=2015080400:TPRATE:surface:0-82 hour acc fcst:
143:38429238:d=2015080400:TPRATE:surface:0-83 hour acc fcst:
144:38809833:d=2015080400:TPRATE:surface:0-84 hour acc fcst:
...
-------------------------------------------------
Result for the 85H96H dataset :
$ ncl_filedump ARPEGE_0.1_85H96H_SP1.grib2
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
Variable: f
Type: file
filename: ARPEGE_0.1_85H96H_SP1
path: ARPEGE_0.1_85H96H_SP1.grib2
file global attributes:
dimensions:
forecast_time0 = 12
lat_0 = 521
lon_0 = 741
forecast_time1 = 2
variables:
...
float TPRATE_P8_L1_GLL0_acc ( forecast_time1, lat_0, lon_0 )
center : French Weather Service - Toulouse
production_status : Operational products
long_name : Total precipitation rate
units : kg m-2 s-1
_FillValue : 1e+20
grid_type : Latitude/longitude
parameter_discipline_and_category : Meteorological
products, Moisture
parameter_template_discipline_category_number : ( 8, 0, 1, 52 )
level_type : Ground or water surface
type_of_statistical_processing : Accumulation
statistical_process_duration : initial time to forecast time
initial_time : 08/04/2015 (00:00)
$ wgrib2 ARPEGE_0.1_85H96H_SP1.grib2
...
133:33228276:d=2015080400:TPRATE:surface:0-85 hour acc fcst:
134:33612201:d=2015080400:TPRATE:surface:0-86 hour acc fcst:
135:33997998:d=2015080400:TPRATE:surface:0-87 hour acc fcst:
136:34385885:d=2015080400:TPRATE:surface:0-88 hour acc fcst:
137:34775283:d=2015080400:TPRATE:surface:0-89 hour acc fcst:
138:35165904:d=2015080400:TPRATE:surface:0-90 hour acc fcst:
139:35557513:d=2015080400:TPRATE:surface:0-91 hour acc fcst:
140:35949966:d=2015080400:TPRATE:surface:0-92 hour acc fcst:
141:36343265:d=2015080400:TPRATE:surface:0-93 hour acc fcst:
142:36737384:d=2015080400:TPRATE:surface:0-94 hour acc fcst:
143:37132325:d=2015080400:TPRATE:surface:0-95 hour acc fcst:
144:37528229:d=2015080400:TPRATE:surface:0-4 day acc fcst:
More information about the ncl-talk
mailing list