Thomas-Moore-Creative / regrid_sandbox

Sandbox for testing regridding tools and workflows
GNU General Public License v3.0
0 stars 0 forks source link

Can we build a working `xesmf` environment on Gadi ARE (`linux-64`) #1

Closed Thomas-Moore-Creative closed 1 year ago

Thomas-Moore-Creative commented 1 year ago

Can we build a working xesmf environment on Gadi ARE (linux-64)?

Steps followed:

mamba create -n pangeo_xesmf python=3.10
mamba activate pangeo_xesmf
mamba install -c conda-forge xesmf
mamba install -c conda-forge dask netCDF4
mamba install -c conda-forge jupyterlab
mamba install -c conda-forge nodejs
mamba install -c conda-forge dask-labextension
mamba install -c conda-forge matplotlib 
mamba install -c conda-forge cartopy 
Thomas-Moore-Creative commented 1 year ago

testing at command line

(pangeo_xesmf) @gadi-login-03 ~/code/regrid_sandbox (main) mamba list | grep 'esmf'
# packages in environment at /g/data/v14//miniconda3/envs/pangeo_xesmf:
esmf                      8.4.2           mpi_mpich_h8fb3fe9_102    conda-forge
xesmf                     0.7.1              pyhd8ed1ab_0    conda-forge
FAILED tests/test_frontend.py::test_regrid_dataarray[True] - ValueError: dataset must include lon/lat or be CF-compliant
=================================== 1 failed, 115 passed, 1 skipped, 301 warnings in 102.40s (0:01:42) ===================================
[WARNING] yaksa: 10 leaked handle pool objects

????? at first look this seems to be a problem with the test code?

def _construct_dataarray(self, name: Hashable) -> DataArray:
        """Construct a DataArray by indexing this dataset"""
        from xarray.core.dataarray import DataArray

        try:
>           variable = self._variables[name]
E           KeyError: 'longitude'

../../miniconda3/envs/pangeo_xesmf/lib/python3.10/site-packages/xarray/core/dataset.py:1426: KeyError

I have submitted this issue just to be sure: https://github.com/pangeo-data/xESMF/issues/291

Thomas-Moore-Creative commented 1 year ago

See working notebook - https://github.com/Thomas-Moore-Creative/regrid_sandbox/blob/main/notebooks/test_xesmf.ipynb