Project

General

Profile

HDF5-DIAG: Error detected in HDF5 (1.10.5) for remapbil

Added by KM Florentine Weber almost 4 years ago

Hello,

I get the "HDF5-DIAG: Error detected in HDF5 (1.10.5)" when I run the this line: cdo -remapbil,gridfile1by1.txt month000001.nc outfile.nc

Does anyone have an idea why, and how to "de-error" this?

Thank you!

gridfile1by1.txt
gridtype = lonlat
gridsize = 64800
xsize = 360
ysize = 180
xname = lon
xlongname = "longitude"
xunits = "degrees_east"
yname = lat
ylongname = "latitude"
yunits = "degrees_north"
xfirst = -180
xinc = 1
yfirst = -90
yinc = 1

cdo remapbil (Abort): Unsupported generic coordinates (Variable: ndvi)!
HDF5-DIAG: Error detected in HDF5 (1.10.5) thread 0:
#000: H5T.c line 1754 in H5Tclose(): not a datatype
major: Invalid arguments to routine
minor: Inappropriate type

Error (cdf_close): NetCDF: HDF error


Replies (5)

RE: HDF5-DIAG: Error detected in HDF5 (1.10.5) for remapbil - Added by Brendan DeTracey almost 4 years ago

$ cdo sinfo month000001.nc 
   File format : NetCDF4 classic
    -1 : Institut Source   T Steptype Levels Num    Points Num Dtype : Parameter ID
     1 : unknown  unknown  v instant       1   1         1   1  I16  : -1            
     2 : unknown  unknown  v instant       1   1   9331200   2  I16  : -2            
     3 : unknown  unknown  v instant       1   1   9331200   2  I16  : -3            
   Grid coordinates :
     1 : generic                  : points=1
     2 : generic                  : points=9331200 (4320x2160)
                              lon : -179.9583 to 179.9583 by 0.08333333 
                              lat : 89.95833 to -89.95833 by -0.08333333 
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  1 step
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  0000-00-00 00:00:00
cdo    sinfo: Processed 3 variables over 1 timestep [0.05s 22MB].
It is identifying your coordinates as generic. Perhaps it you rewrite your data file from south to north (with a positive delta lat)? If you read the grid description section (https://code.mpimet.mpg.de/projects/cdo/embedded/index.html#x1-150001.3.2) all "predefined" grids are from south to north.

RE: HDF5-DIAG: Error detected in HDF5 (1.10.5) for remapbil - Added by Brendan DeTracey almost 4 years ago

If you can not get the data provider to flip the latitude(the preferred solution as I suspect this file is not CF Metadata compliant), here is another fix. It requires netcdf operators(nco) for the first step as I can't find a working cdo solution.

$ ncap2 -O -s 'ndvi=ndvi.reverse($lat);' month000001.nc flipped_month000001.nc

This flips the nvdi variable in latitude. The trick now is to reassign a proper cdo grid to the flipped data using the setgrid command and a cdo grid description that matches your original grid but is written from south to north. The final output of this can be remapped to your heart's content. You can use cdo grid descriptions instead of a grid file if your grid is regular. You should also set missing values properly before interpolating.
cdo remapbil,global_1 -delname,percentile -setctomiss,-3000 -setmissval,-32768 -setgrid,global_0.083333333333 flipped_month000001.nc out.nc

RE: HDF5-DIAG: Error detected in HDF5 (1.10.5) for remapbil - Added by Brendan DeTracey almost 4 years ago

Note. I would be careful interpolating nvdi. I am not sure it is a variable for which spatial interpolation is vary applicable. I would use nearest neighbour interpolation myself. If the area mean value of nvdi(not sure this means anything either) at lower resolution is what you want then use a conservative remapper like remapcon.

RE: HDF5-DIAG: Error detected in HDF5 (1.10.5) for remapbil - Added by Uwe Schulzweida almost 4 years ago

The units of the coordinates are missing. You can add it with

ncatted -a units,lat,c,c,"degrees_north" -a units,lon,c,c,"degrees_east" month000001.nc 

    (1-5/5)