#7104 closed defect (fixed)
GDAL not able to open certain grib files
Reported by: | rduivenvoorde | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.3.0 |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
I received some grb files
which by Panoply are shown as valid grib1 files:
File type: GRIB1 Collection netcdf file:/home/richard/z/17/rivm/20170821_grib2/harm36_v1_rivm_puff_2017082100_048_GB.grb { dimensions: lon = 300; lat = 300; time = 1; height_above_ground = 2; height_above_ground1 = 1; height_above_ground2 = 1; hybrid = 15; height_above_ground3 = 1; variables: int LatLon_Projection; :grid_mapping_name = "latitude_longitude"; :earth_radius = 6367470.0; // double :_CoordinateTransformType = "Projection"; :_CoordinateAxisTypes = "GeoX GeoY"; ... float lat(lat=300); :units = "degrees_north"; :_CoordinateAxisType = "Lat"; float lon(lon=300); :units = "degrees_east"; :_CoordinateAxisType = "Lon"; ... // global attributes: :Originating_or_generating_Center = "De Bilt"; :Originating_or_generating_Subcenter = "0"; :GRIB_table_version = "0,1"; :file_format = "GRIB-1"; :Conventions = "CF-1.6"; :history = "Read using CDM IOSP GribCollection v3"; :featureType = "GRID"; :_CoordSysBuilder = "ucar.nc2.dataset.conv.CF1Convention";
File type: GRIB1 Collection netcdf file:/home/richard/z/17/rivm/20170821_grib2/RIVM_HIRLAM_H11_2017082106_000_GB.grb { group: RotatedLatLon_550X726-56p24N-3p993W { dimensions: x = 726; y = 550; time = 1; hybrid = 14; variables: int RotatedLatLon_Projection; :grid_mapping_name = "rotated_latlon_grib"; :grid_south_pole_latitude = -30.000001907348633; // double :grid_south_pole_longitude = -15.000000953674316; // double :grid_south_pole_angle = 0.0; // double :_CoordinateTransformType = "Projection"; :_CoordinateAxisTypes = "GeoX GeoY"; ... float x(x=726); :standard_name = "projection_x_coordinate"; :units = "km"; :_CoordinateAxisType = "GeoX"; float y(y=550); :standard_name = "projection_y_coordinate"; :units = "km"; :_CoordinateAxisType = "GeoY"; ... float hybrid(hybrid=14); :units = ""; :long_name = "Hybrid level"; :positive = "down"; :Grib_level_type = 109; // int :_CoordinateAxisType = "GeoZ"; :_CoordinateZisPositive = "down"; // group attributes: :long_name = "RotatedLatLon_550X726 (Center 56.19N 4.008W)"; } // global attributes: :Originating_or_generating_Center = "De Bilt"; :Originating_or_generating_Subcenter = "0"; :GRIB_table_version = "0,1"; :file_format = "GRIB-1"; :Conventions = "CF-1.6"; :history = "Read using CDM IOSP GribCollection v3"; :featureType = "GRID"; :_CoordSysBuilder = "ucar.nc2.dataset.conv.CF1Convention";
But gdal does not see any rasters in them:
$ gdalinfo harm36_v1_rivm_puff_2017082100_048_GB.grb ERROR 4: harm36_v1_rivm_puff_2017082100_048_GB.grb is a grib file, but no raster dataset was successfully identified. gdalinfo failed - unable to open 'harm36_v1_rivm_puff_2017082100_048_GB.grb'.
$ gdalinfo RIVM_HIRLAM_H11_2017082106_000_GB.grb ERROR 4: RIVM_HIRLAM_H11_2017082106_000_GB.grb is a grib file, but no raster dataset was successfully identified. gdalinfo failed - unable to open 'RIVM_HIRLAM_H11_2017082106_000_GB.grb'.
As earliers datasets, this could be a dataformat problem, or something else.
Thanks
Attachments (1)
Change History (10)
comment:1 by , 7 years ago
by , 7 years ago
Attachment: | ticket_7104_do_not_merge_this.patch added |
---|
comment:2 by , 7 years ago
Panoply is: https://www.giss.nasa.gov/tools/panoply/download/
It can open or at least read almost every netcdf/grib file I throw at it...
As said, I'm not sure about the quality/format of these files, so IF they are not correct, we should not hack them correct...
comment:3 by , 7 years ago
I believe there are correct. It is just that the version of degrib we use doesn't support them out of the box
comment:7 by , 6 years ago
Milestone: | → 2.3.0 |
---|
Note:
See TracTickets
for help on using tickets.
I have had a early look and a preliminary patch attached, but I suspect the georeferencing in the RIVM_HIRLAM_H11_2017082106_000_GB.grb case is incomplete (not taking into account the rotated pole)
What is this Panoply software you mention ?
Reference for Grib1 Section2 format : https://rda.ucar.edu/docs/formats/grib/prev-vers/sect2.txt