I'm trying to work with the climate projection data that NASA released, and is hosted publicly on S3: http://aws.amazon.com/nasa/nex/. The data is available at s3://nasanex/NEX-DCP30.
The code I'm working with uses the rasterio
python library to export band information.
I worked out the pipeline on my Macbook, which had the netcdf
package installed by homebrew, GDAL
built from source (trunk branch) and configured with python bindings, and rasterio
installed with pip
.
I am able to work with the netCDF files fine on my Macbook. For instance, if I pull down the file at s3://nasanex/NEX-DCP30/BCSD/historical/mon/atmos/tasmax/r1i1p1/v1.0/CONUS/tasmax_amon_BCSD_historical_r1i1p1_CONUS_inmcm4_200501-200512.nc
, and run gdalinfo
it, the first 3 lines are this:
Driver: netCDF/Network Common Data Format
Files: tasmax_amon_BCSD_historical_r1i1p1_CONUS_inmcm4_200501-200512.nc
Size is 7025, 3105
Great.
I can do the same setup on an Ubuntu machine, using GDAL trunk or the 1.10.1 tag, and have HDF5 and netCDF enabled (as seen by this output in GDAL's ./configure
script:
HDF5 support: yes
NetCDF support: yes
However, when I do a gdalinfo
on the same file, I get a different driver being used:
Driver: HDF5/Hierarchical Data Format Release 5
Files: tasmax_amon_BCSD_historical_r1i1p1_CONUS_inmcm4_200501-200512.nc
Size is 512, 512
I've tried this on a Ubuntu VM on my Macbook, an Ubuntu AMI on EC2, and a workstation that has Ubuntu as it's native OS. All the same.
Worse, when I try to open the file with rasterio
, while on my Macbook everything runs great, on Ubuntu I get a a segmentation fault when using rasterio.open(...)
Segmentation fault (core dumped)
This only happens with the NEX dataset netCDF files. I can read another netCDF file I got from a different source just fine...gdalinfo
produces the correct Driver for that netCDF file:
Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
Driver: netCDF/Network Common Data Format
Files: BCSD_0.5deg_tas_Amon_access1-0_rcp85_r1i1p1_200601-210012.nc
Size is 720, 278
Does anyone have any insight into why these netCDF files would be readable on my Macbook and unreadable (and considered to be corrupt HDF5 datasets) on Ubuntu?