Skip to content

Commit

Permalink
updated version of xesmf because <0.7.1 doesn't work with mamba
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe committed Nov 9, 2023
1 parent bb4842e commit 05abc3a
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions internal/scripts/docker_env/scripts/xesmf_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

################################################################################
# Environment: xesmf.v5.1
# Last Updated: 2023-01-27 ([email protected])
# Last Updated: 2023-11-08 ([email protected])
# Notes: Adds Python package to read Tripolar grids
# Updated xesmf version from 0.3.0 because <0.7.1 does not work with mamba
# Python Packages:
# netcdf4==1.6.2
# xarray==2022.3.0
# xesmf==0.3.0
# xesmf==0.8.2
#
# Other Content: None
################################################################################
Expand All @@ -24,29 +25,4 @@ 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
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
mamba install -y --name ${ENV_NAME} -c conda-forge xesmf==0.8.2

0 comments on commit 05abc3a

Please sign in to comment.