Hi there, i’m attempting to create a netcdf for a specifc data type (a digital elevation model) using a converted GeoTIFF. I’m converting this geotiff using GDAL. When I try to open the netcdf using h5py (which is the library i’m reliant on for what I need), it’s saying it can’t read it. Yet I can open the file absolutely fine using ncdump or xarray. Does anyone have any ideas as to how I can resolve this to get the file open in h5py? I can’t attach the file itself but here’s a copy of the ncdump -h output:
*ncdump -h Copernicus_DEM_test2.nc *
netcdf Copernicus_DEM_test2 {
dimensions:
- lon = 15900 ;*
- lat = 12609 ;*
variables:- char crs ;*
crs:grid_mapping_name = "latitude_longitude" ;*
crs:long_name = "CRS definition" ;*
crs:longitude_of_prime_meridian = 0. ;*
crs:semi_major_axis = 6378137. ;*
crs:inverse_flattening = 298.257223563 ;*
crs:spatial_ref = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" ;*
crs:crs_wkt = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" ;*
crs:GeoTransform = "24.17635924150868 0.0002694945852358565 0 -28.51387459087979 0 -0.0002694945852358565 " ;*
- double lat(lat) ;*
lat:standard_name = "latitude" ;*
lat:long_name = "latitude" ;*
lat:units = "degrees_north" ;*
- double lon(lon) ;*
lon:standard_name = "longitude" ;*
lon:long_name = "longitude" ;*
lon:units = "degrees_east" ;*
- float Band1(lat, lon) ;*
Band1:long_name = "GDAL Band Number 1" ;*
Band1:_FillValue = 9.96921e+36f ;*
Band1:grid_mapping = "crs" ;*
// global attributes:
:GDAL_AREA_OR_POINT = "Area" ;*
:Conventions = "CF-1.5" ;*
:GDAL = "GDAL 3.6.3, released 2023/03/07" ;*
:history = "Wed Nov 15 13:48:31 2023: GDAL CreateCopy( /home/bwright/Documents/active/insar/data/jagers_CGG_test/Copernicus_DEM_test2.nc, ... )" ;*
}
Thanks in advance!