NASA-Openscapes / corn

Base image for the NASA-Openscapes Jupyterhub
MIT License
4 stars 4 forks source link

netcdf-c 4.9.2 causing Access Failure #16

Closed battistowx closed 6 months ago

battistowx commented 1 year ago

The recent environment.yml update has caused the netCDF4 and netcdf-c libraries to be updated to their most recent packages. After some troubleshooting with Xiaohua Pan, we discovered that there are issues with the netcdf-c (libnetcdf) >=4.9.1 library and Cloud OPeNDAP links, where an "access denied" error is being triggered when both https and dap4 URLs are passed. This appears to be true for multiple granules from various collections, and only works with the granule from this OPeNDAP notebook: https://github.com/OPENDAP/notebooks/blob/master/tutorials/netCDF4_tutorial.ipynb

This issue proposes a fix by setting netcdf4==1.6.2 in environment.yml, which should also install netcdf-c 4.9.0 and should fix this issue.

I have also opened an issue in the netcdf-c Github relating to this: https://github.com/Unidata/netcdf-c/issues/2704

battistowx commented 7 months ago

Restarting this thread as the same error has been reported for users who wish to access GDS servers. To fix this, netcdf4-python==1.6.5 must be installed via pip in the environment.yml, which will install libnetcdf 4.9.3-development (the working version of this library).

battistowx commented 7 months ago

Forked branch with the fix: https://github.com/NASA-Openscapes/corn/compare/main...battistowx:corn:libnetcdf-version-fix

battistowx commented 6 months ago

The new opendap kernel works perfectly! I can confirm that it has 4.9.3-development. Note that it does not have GDAL and Geopandas due to their 4.9.2 requirement: https://github.com/NASA-Openscapes/corn/commit/eb5bd68f5e24f3928f9f295d20a3950f5dde1471