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
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.