Just to summarize the previous comments and answers and add a bit of first-hand installation experience:
You are looking for the module
command provided by the Environment Modules package. It is a tool for modifying the shell environment (PATH but also aliases etc.) and common to many multi-user clusters like High-Performance Computing clusters.
The instructions you got were probably from some HPC cluster, since you want to run a global climate model. Read more about Environment Modules on HPC here.
Now for something actually Ubuntu-related: It is actually not that much of a pain to set up Environment Modules under Ubuntu. I just did it in under 10 minutes for Ubuntu 14.10 and the Bash shell.
As mentioned in other posts, you can install Environment Modules from the repos (package environment-modules
).
Then you run add.modules
. It will put a few lines into your shell initalization file, in this case ~/.bashrc
:
case "$0" in
-sh|sh|*/sh) modules_shell=sh ;;
-ksh|ksh|*/ksh) modules_shell=ksh ;;
-zsh|zsh|*/zsh) modules_shell=zsh ;;
-bash|bash|*/bash) modules_shell=bash ;;
esac
module() { eval `/usr/Modules/$MODULE_VERSION/bin/modulecmd $modules_shell $*`; }
#module() { eval `/usr/bin/modulecmd $modules_shell $*`; }
You need to uncomment the last line and comment out or delete the second-last. This line defines the module
command you were looking for. It effectively runs modulecmd bash
plus the arguments you give it.
I have the feeling that this function is actually not very safe because it evaluates anything you supply it with in its arguments. Some users can perhaps comment on how to improve this.
You now just need to create some directory containing the so-called modulefiles
and add it to $MODULEPATH
, for example with module use /path/to/your/modulefiles
. There are examples for modulefiles out there on the interwebs.
I find this a very handy tool not just for multi-user clusters. I use it for switching between different Python distributions.
environment-modules
is not available in 12.04, but from 12.10 on upwards: <packages.ubuntu.com/search?keywords=environment-modules>