This document describes how to setup a module for ICONEval on Levante, JSC, or any other machine that uses the Module Environment.
-
Install
mambaorcondaif this is not already available on your system.mambais recommended. -
Create a new
mamba/condaenvironment at a location that is accessible to everyone who will use the module and install ICONEval from source and all its dependencies (e.g., ESMValTool) into it, for example:mamba env create -f iconeval/environment.yml -p $PREFIX mamba activate iconevalor
conda env create -f iconeval/environment.yml -p $PREFIX conda activate iconevalReplace
$PREFIXwith your desired target location for the environment. -
Setup the modulefile at your desired location.
-
On Levante, it could be called
$MODULEFILES/iconeval/1.0.0and look like this:#%Module1.0 module-whatis "ICON model output evaluation with ESMValTool." module-version "1.0.0" proc ModulesHelp { } { puts stderr "For more information on this tool run" puts stderr "" puts stderr "iconeval -- --help" puts stderr "" puts stderr "or visit https://github.com/EyringMLClimateGroup/ICONEval" } conflict mambaforge conflict esmvaltool module load texlive set root $PREFIX prepend-path PATH "${root}/bin" prepend-path MANPATH "${root}/man" prepend-path MANPATH "${root}/share/man" prepend-path ACLOCAL_PATH "${root}/share/aclocal" prepend-path C_INCLUDE_PATH "${root}/include" prepend-path CPLUS_INCLUDE_PATH "${root}/include" prepend-path INCLUDE "${root}/include" prepend-path PKG_CONFIG_PATH "${root}/lib/pkgconfig" prepend-path PKG_CONFIG_PATH "${root}/share/pkgconfig" setenv PROJ_LIB "${root}/share/proj" setenv ESMFMKFILE "${root}/lib/esmf.mk" -
On JSC, it could be called
$MODULEFILES/iconeval/1.0.0.luaand look like this:help([==[ For more information on this tool run iconeval -- --help or visit https://github.com/EyringMLClimateGroup/ICONEval ]==]) whatis("ICON model output evaluation with ESMValTool.") conflict("mambaforge", "esmvaltool") local root = $PREFIX local root_env = pathJoin(root, "env") prepend_path("PATH", pathJoin(root, "bin")) prepend_path("PATH", pathJoin(root_env, "bin")) prepend_path("MANPATH", pathJoin(root_env, "man")) prepend_path("MANPATH", pathJoin(root_env, "share/man")) prepend_path("ACLOCAL_PATH", pathJoin(root_env, "share/aclocal")) prepend_path("C_INCLUDE_PATH", pathJoin(root_env, "include")) prepend_path("CPLUS_INCLUDE_PATH", pathJoin(root_env, "include")) prepend_path("INCLUDE", pathJoin(root_env, "include")) prepend_path("PKG_CONFIG_PATH", pathJoin(root_env, "lib/pkgconfig")) prepend_path("PKG_CONFIG_PATH", pathJoin(root_env, "share/pkgconfig"))
This will use a containerized installation of ESMValTool available at
$PREFIX/bin.
Make sure to replace
$PREFIXwith your actual environment directory. -
-
Load the module:
module use -a $MODULEFILES module load iconevalMake sure to replace
$MODULEFILESwith your actual modulefiles directory.
This documentation can also be used to create modules for any other pip- or
mamba/conda-installable software. When this module is loaded, all binaries
in the environment can be used. Thus, arbitrary modules can be set up by
installing new packages into the environment and creating corresponding
modulefiles.