pyschism
pyschism copied to clipboard
replace `cf` with `xarray` to remove dependency on `udunits2`
cf requires udunits2, which adds an extra non-Python dependency (udunits-bin) to installation
cf is currently used by SfluxDataset to read from disk to a Python object:
https://github.com/schism-dev/pyschism/blob/d5ae2a0d29da85bd2a265a4b49aaacd3fa7d2263/pyschism/forcing/atmosphere/nws/nws2/sflux.py#L9
https://github.com/schism-dev/pyschism/blob/d5ae2a0d29da85bd2a265a4b49aaacd3fa7d2263/pyschism/forcing/atmosphere/nws/nws2/sflux.py#L326
To remove the reliance on udunits2, we should explore the possibility of using xarray here instead.
Update: There are several additional issues with cf-python. We are planning on switching cf-python with xarray in the near-future, but it will have to wait because of some other priorities/time constraints. The workaround for the time being is to use conda to install esmpy.
conda install -c nesii -c conda-forge esmpy
This of course means you need to install pyschism in a conda environment which is unfortunate. But for now, we'll have to bite the bullet, because making the swith to xarray is not trivial.
Update: There are several additional issues with
cf-python. We are planning on switchingcf-pythonwithxarrayin the near-future, but it will have to wait because of some other priorities/time constraints. The workaround for the time being is to use conda to installesmpy.
conda install -c nesii -c conda-forge esmpyThis of course means you need to install
pyschismin a conda environment which is unfortunate. But for now, we'll have to bite the bullet, because making the swith toxarrayis not trivial.
Hello,I have the same problem and followed your answer "conda install -c nesii -c conda-forge esmpy" and successfully installed it in the pyschism environment, but still have the same error, why?