- To: netcdf-java@xxxxxxxxxxxxxxxx
- Subject: [netcdf-java] Retrieve Init Date from Grib-File
- From: Jochen Kähler <jkaehler@xxxxxxxxxxxxxxx>
- Date: Fri, 15 Nov 2013 14:35:09 +0100
Hi all,
is there a way to retrieve the Init-Date from a Grib-File?
I thought GridCoordinateSystem.getRunTimeAxis() would be the correct method.
However, if I do about the following…
GridDataset dataset = GridDataset.open(gribFile.getAbsolutePath());
GridDatatype grid = dataset.findGridDatatype("Relative_humidity_isobaric");
LOG.info("init={}", grid.getCoordinateSystem().getRunTimeAxis());
…I get…
2013-11-15 14:25:02,324 INFO : App - init=null
…while wgrib has successfully gathered those values:
Losty-MacBook:Desktop jkaehler$ ~/wgrib/wgrib -V dpd_test.grib
rec 1:0:date 2013111300 R kpds5=157 kpds6=100 kpds7=850 levels=(3,82) grid=255
850 mb 6hr fcst:
R=Relative humidity [%]
Initdate = 2013-11-13 00Z with leadtime 6h…
We've found the...
public final CalendarDate getReferenceDate() { … }
...from the Grib1SectionProductDefinition.java which actually reads that
init-date from the Grib file, but we haven’t found where it is used despite of
some debug output.
Many thanks in advance and Kind Regards,
JochenAttachment:
smime.p7s
Description: S/MIME cryptographic signature
- Follow-Ups:
- Re: [netcdf-java] Retrieve Init Date from Grib-File
- From: John Caron
- Re: [netcdf-java] Retrieve Init Date from Grib-File
- From: Don Murray (NOAA Affiliate)
- Re: [netcdf-java] Retrieve Init Date from Grib-File