Skip to content

Commit

Permalink
use conda instead of mamba for xesmf because the package breaks using…
Browse files Browse the repository at this point in the history
… mamba
  • Loading branch information
georgemccabe committed Nov 8, 2023
1 parent 560d417 commit 8af52bc
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion internal/scripts/docker_env/scripts/xesmf_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,29 @@ BASE_ENV=metplus_base.${METPLUS_VERSION}
mamba create -y --clone ${BASE_ENV} --name ${ENV_NAME}
mamba install -y --name ${ENV_NAME} -c conda-forge netcdf4==1.6.2
mamba install -y --name ${ENV_NAME} -c conda-forge xarray==2022.3.0
mamba install -y --name ${ENV_NAME} -c conda-forge xesmf==0.3.0
conda install -y --name ${ENV_NAME} -c conda-forge xesmf==0.3.0

# had to use conda to install xesmf==0.3.0 because conda and mamba obtain
# different versions of dependencies and a use case fails trying
# to import from xesmf:
#
# ERROR:
# File "/usr/local/conda/envs/xesmf.v6.0/lib/python3.10/site-packages/xesmf/backend.py", line 19, in <module>
# import ESMF
#ModuleNotFoundError: No module named 'ESMF'
#
# Conda dependencies obtained:
#
# esmf-8.2.0 | nompi_h61edca3_0 27.4 MB conda-forge
# esmpy-8.2.0 |nompi_py310ha0140b2_1 175 KB conda-forge
# netcdf-fortran-4.5.4 |nompi_h2b6e579_100 1.3 MB conda-forge
# scipy-1.11.3 | py310hb13e2d6_1 14.3 MB conda-forge
# xesmf-0.3.0 | py_0 19 KB conda-forge
#
# Mamba dependencies obtained:
#
# esmf 8.4.1 nompi_he2e5181_0 conda-forge/linux-64 24MB
# esmpy 8.4.1 pyhc1e730c_0 conda-forge/noarch 48MB
# netcdf-fortran 4.6.0 nompi_heb5813c_103 conda-forge/linux-64 417kB
# scipy 1.11.3 py310hb13e2d6_1 conda-forge/linux-64 15MB
# xesmf 0.3.0 py_0 conda-forge/noarch 20kB

0 comments on commit 8af52bc

Please sign in to comment.