You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I understand, this repository uses the ASCII service of the OpenDAP server to download the data. To get a NetCDF instead of a CSV file (this seems to be on the roadmap), an optional dependency NetCDF4 could be added. Then the NetCDF file can also be downloaded directly from the OpenDAP server using, for instance, xarray (see an example here). However I found this to be quite unreliable, throwing this error quite frequently (even when everything seems OK):
RuntimeError: NetCDF: Malformed or inaccessible DAP2 DATADDS or DAP4 DAP response
For that reason, I would consider using the service GFS filter. This service is able to filter and download the GFS GRIB files directly. I wrote an example notebook if you want to take a look. The only problem is that you need to add the dependency cfgrib, which in turn depends on ecCodes, that cannot be installed with pip. Reading the description, avoid using ecCodes seems to be one of the main motivations of this library. However, I think you can get around ecCodes not working on Windows by installing it with conda.
In any case, I would consider adding either one of both of the previous ways with the optional dependencies NetCDF4 or cfgrib, since I think it is much easier than constructing the NetCDF file "by hand" from the ASCII response.
The text was updated successfully, but these errors were encountered:
albertotb
changed the title
Consider using the GRIB filter service
Download NetCDF/GRIB files: consider using the GRIB filter service
Nov 9, 2022
As far as I understand, this repository uses the ASCII service of the OpenDAP server to download the data. To get a NetCDF instead of a CSV file (this seems to be on the roadmap), an optional dependency
NetCDF4
could be added. Then the NetCDF file can also be downloaded directly from the OpenDAP server using, for instance,xarray
(see an example here). However I found this to be quite unreliable, throwing this error quite frequently (even when everything seems OK):For that reason, I would consider using the service GFS filter. This service is able to filter and download the GFS GRIB files directly. I wrote an example notebook if you want to take a look. The only problem is that you need to add the dependency
cfgrib
, which in turn depends onecCodes
, that cannot be installed with pip. Reading the description, avoid using ecCodes seems to be one of the main motivations of this library. However, I think you can get aroundecCodes
not working on Windows by installing it withconda
.In any case, I would consider adding either one of both of the previous ways with the optional dependencies NetCDF4 or cfgrib, since I think it is much easier than constructing the NetCDF file "by hand" from the ASCII response.
The text was updated successfully, but these errors were encountered: