...
You want to use CDO, a popular tool to manipulate climate and NWP model data. What do you need to do to get the following result?
No Format $ cdo --version Climate Data Operators version X.Y.Z (https://mpimet.mpg.de/cdo) System: x86_64-pc-linux-gnu ...
Expand title Solution If you run the command without any prior action, you may get:
No Format $ cdo --version -bash: cdo: command not found
Many software packages and tools are not part of your default environment, and need to be explicitly loaded via modules.
So the following commands would be sufficient to get to the desired result:
No Format module load cdo cdo --version
Tip title ml shortcut You can also use the ml shortcut to load the module
No Format ml cdo
Note that we did not ask for any specific version. In those cases, you will get the one defined as default.
How many versions of CDO can be used at ECMWF? Can you pick the newest?
Expand title Solution There are hundreds of different packages with their corresponding different versions installed at ECMWF. You can use:
No Format module avail
To see what modules can be loaded at any time.
However, not all modules can be loaded at any time, some will only become available if a certain combination of modules is loaded.
You can also use the following command for an overview or all the packages that are installed, including those that may not be visible in module avail:
No Format module spider
In this case we are only interested in CDO so we can do either:
No Format module avail cdo
or
No Format module spider cdo
To load the newest, you can either explicitly pick up the latest version explicitly, so assuming that it was "X.Y.Z":
No Format module load cdo/X.Y.Z
But you can also use the module tag "new":
No Format module load cdo/new
or also ask for the latest with:
No Format module --latest load cdo
Tip title No swap needed If you had another version of the module loaded, the system will automatically swap it by the new one requested.
Load the
netcdf4
module. Can you see what modules do you have loaded in your environment now?Expand title Solution To load the netcdf4 module just do:
No Format module load netcdf4
Then, you can see what your software environment looks like with:
No Format module list
or with just the shortcut:
No Format ml
You should see both the CDO and netcdf4, beside the default modules loaded in your environment.
Remove the
netcdf4
module from your environment and check it is gone.Expand title Solution To unload the
netcdf4
module just do:No Format module unload netcdf4
or with just the shortcut:
No Format ml -netcdf4
Then, you can see what your software environment looks like with:
No Format module list
Can you check what is the installation directory of the default netCDF4 library?
Expand title Solution All modules at ECMWF will define a <PACKAGE_NAME>_DIR environment variable that can be useful to pass to configuration fiiles or scripts. Packages providing libraries such as netCDF4 will also typically define
<PACKAGE_NAME>_LIB
and<PACKAGE_NAME>_INCLUDE
.You can check the values of all those variables that a module would define without loading it running:
No Format module show netcdf4
or with just the shortcut:
No Format ml show netcdf4
You can then spot there the value of
NETCDF4_DIR
pointing to/usr/local/apps/netcdf4/X.Y.Z/COMPILER_FAMILY/COMPILER_VERSION
Can you restore the default environment you had when you logged in? Check that the environment is back to the desired state.
Expand title Solution If you log out of your session, next time you log in you will start with a fresh default environment. Modules are only loaded for that specific session.
However, if you don't want to log out, you can also reset your module environment with:
No Format module reset
You can then check the effects with
No Format module list
Tip title reset vs purge There is a subtile difference between module reset and module purge. While the former will go back the default environment, which typically contains some default modules, the latter will completely unload all modules and leave you with a blank environment.
You want the git module to be loaded by default on every session and job on the Atos HPCF or ECS. How would you do that? Check that it works by opening a new session
If you log out of your session, next time you log in you will start with a fresh default environment. Modules are only loaded for that specific session.However, if you don't want to log out, you can also reset your module environment with:module resetYou can then check the effects withmodule list
There is a subtile difference between module reset and module purge. While the former will go back the default environment, which typically contains some default modules, the latter will completely unload all modules and leave you with a blank environment.
ECMWF tools
Info | ||
---|---|---|
| ||
...