Opened 4 years ago

Closed 4 years ago

#6913 closed defect (wontfix)

SM2RAIN-ASCAT global precipitation netcdf file cannot be read

Reported by: Markus Neteler Owned by: warmerdam
Priority: normal Milestone: 2.1.4
Component: GDAL_Raster Version: 2.1.2
Severity: normal Keywords: netcdf
Cc:

Description

Unless I'm missing something, the SM2RAIN-ASCAT global daily precipitation netcdf file cannot be properly read with GDAL. It is "seen" an a single band while daily bands would be expected:

gdal-config --version
2.1.2

uname -a
Linux fedora-calc 4.9.12-200.fc25.x86_64 ...

gdalinfo SM2R_ASCAT_halfdegree_DR2015_EXT_02.nc
Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
Driver: netCDF/Network Common Data Format
Files: SM2R_ASCAT_halfdegree_DR2015_EXT_02.nc
Size is 3103, 57781
Coordinate System is `'
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,57781.0)
Upper Right ( 3103.0,    0.0)
Lower Right ( 3103.0,57781.0)
Center      ( 1551.5,28890.5)
Band 1 Block=3103x1 Type=Float64, ColorInterp=Undefined
  NoData Value=9.96920996838686905e+36
  Metadata:
    NETCDF_VARNAME=Rainfall_SM2R_ASC

This is the header:

ncdump -h SM2R_ASCAT_halfdegree_DR2015_EXT_02.nc
netcdf SM2R_ASCAT_halfdegree_DR2015_EXT_02 {
dimensions:
	ndates = 3103 ;
	npixels = 57781 ;
variables:
	double Date_Matlab(ndates) ;
	double Longitude(npixels) ;
	double Latitude(npixels) ;
	double Rainfall_SM2R_ASC(npixels, ndates) ;
}

Source: https://www.researchgate.net/publication/299371458_SM2RAIN-ASCAT_1_Jan_2007_-_30_June_2015_global_daily_rainfall_dataset

Dataset download (~ 800MB):

wget "https://www.dropbox.com/s/hoemg72osfuye5y/SM2R_ASCAT_halfdegree_DR2015_EXT_02.7z?dl=0#"

Here is the format of the file as per dataset author:

Format: netcdf4_classic

Dimensions:
 ndates=3103
 npixels=57781

Variables:

 Date_Matlab
  Size: 3103x1
  Dimensions: ndates
  Datatype: double

 Longitude
  Size: 57781x1
  Dimensions: npixels
  Datatype: double

 Latitude
  Size: 57781x1
  Dimensions: npixels
  Datatype: double

 Rainfall_SM2R_ASC
  Size: 3103x57781
  Dimensions: ndates, npixels
  Datatype: double

Change History (2)

comment:1 Changed 4 years ago by Even Rouault

Supporting such a dataset could probably be done, but would require some non trivial work, since it doesn't follow at all the CF conventions (hint to the data producer: follow them!). In particular the Rainfall_SM2R_ASC variable is spatially indexed only by a single dimension, npixels, instead of the usual (longitude,latitude) tuple, and that's the first one (so extracting per date is likely to be inefficient), whereas normally the time dimension is the first one. Given that there's only a single spatial dimension, it is not obvious that the raster is on a 2D grid. Looking at the values of the longitude and latitude values should be done to see if raster dimensions can be guessed from the values...

comment:2 Changed 4 years ago by Markus Neteler

Resolution: wontfix
Status: newclosed

Thanks for your comments, Even!

The data author answered your comments: (https://www.researchgate.net/publication/299371458_SM2RAIN-ASCAT_1_Jan_2007_-_30_June_2015_global_daily_rainfall_dataset

Since I cannot link to that, one needs to open the comments starting on Apr 15, 2016)

Citation:

"Note that the formatting we selected is tailored for users who do not want to download the data on a global scale. Indeed, by using Matlab or Python you can easily download a subset of the data, faster than by using the standard "lon,lat,time" formatting. Anyhow, we can reformat the data. But the dataset is already to be updated as we have now new data till the end of 2016.
[...]
In the near future, we will distribute the data in a standard formatting, also in real-time."

... hoping that "near future" happens soon, I close this report as "wontfix".

Note: See TracTickets for help on using tickets.