cambecc / grib2json

converts GRIB2 files to JSON
MIT License
351 stars 152 forks source link

Can't convert data from NOMADS #23

Closed Ariemul closed 7 years ago

Ariemul commented 7 years ago

I was following the instructions on earth, and downloaded the data, but when i try to convert it with grib2json, the following error appears:

Harbinger@DESKTOP-E7RODMP:~/datos$ grib2json -d -n -o current-wind-surface-level-gfs-1.0.json gfs.t00z.pgrb2.1p00.f000 java.io.IOException: java.io.IOException: Cant read gfs.t00z.pgrb2.1p00.f000: not a valid CDM file. at ucar.nc2.NetcdfFile.open(NetcdfFile.java:425) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:392) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:379) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:367) at net.nullschool.grib2json.Grib2Json.write(Grib2Json.java:114) at net.nullschool.grib2json.Launcher.main(Launcher.java:75) Caused by: java.io.IOException: Cant read gfs.t00z.pgrb2.1p00.f000: not a valid CDM file. at ucar.nc2.NetcdfFile.open(NetcdfFile.java:803) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:422) ... 5 more

how can i fix it? Thank You

cambecc commented 7 years ago

Hi! There is no workaround for this because grib2json cannot read files in NetCDF format, only GRIB format. Sorry. :(