Load and compile another netCDF library for libIGCM

Author: S. Luyssaert
Last major revision: S. Luyssaert (2016/11/20)
Last minor revision: S. Luyssaert (2020/02/28)


This item should help to: (1) remove the current netcdf library, (2) load an another pre-installed netcdf library, and (3) link libIGCM to the new netcdf library. Note that in general all is taken care of by the TCCG and the libIGCM team, most ORCHIDEE users don't need to load another netcdf library.

Remove the current netcdf library

Check which modules are loaded

module list

Unload the module you no longer want to use, i.e., netcdf/4.2_hdf5_parallel. Note that there could be dependencies between modules. If so, unload whatever needs to be unloaded.

module unload netcdf/4.2_hdf5_parallel (NetCDF)

Load an another pre-installed netcdf library

and load the new module

module load netcdf/

Check if the new module was loaded

module list

Check for the library paths in the module

module show netcdf/

for this example you will get the follow output

setenv		NETCDF_ROOT	/usr/local/netcdf-
setenv		NETCDF_EXEDIR	/usr/local/netcdf-
setenv		NETCDF_INCDIR	/usr/local/netcdf-
setenv		NETCDF_LIBDIR	/usr/local/netcdf-

Link libIGCM to the new netcdf library (last revised in 2015)

Make sure that these paths are used in


When you change from library 4.2 to you will have to change NETCDF_INC_DIR to NETCDF_INCDIR and NETCDF_LIB_DIR to NETCDF_LIBDIR in files above.

Make sure that the correct modules are loaded in XIOS .env file : (you can empty this file as you already loaded the netcdf and hdf5):


After doing so do a make clean and compile (it worked for me with fcm). If you want that these changes are permanent, remember to also change the paths in the AA_make file, that way the new path will be used when doing an ins_make.

Now the model is compiled with the new libraries but the libIGCM is not aware of that, so you will have to make some changes to libIGCM as well.

emacs ../../../libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh &

Add the module load and unload statements as follows. If this should become a lasting change you will have to change the modules in /ccc/cont003/home/dsm/p86ipsl/.atlas_env_netcdf4_curie_ks rather than in libIGCM_sys_curie.ksh

# Set environment tools (ferret, nco, cdo)
if [ X${TaskType} = Xcomputing ] ; then
  . /ccc/cont003/home/dsm/p86ipsl/.atlas_env_netcdf4_curie_ksh > /dev/null 2>&1
# to run with netcdf 3.6.3 ie compilation done before 17/2/2014
# uncomment 2 lines :
#  module unload netcdf
#  module load netcdf/3.6.3
module unload nco/4.1.0
module unload netcdf/4.2_hdf5_parallel
module load netcdf/
module list

  export PATH=${PATH}:/ccc/cont003/home/dsm/p86ipsl/AddNoise/src_X64_CURIE/bin
  export PATH=${PATH}:/ccc/cont003/home/dsm/p86ipsl/AddPerturbation/src_X64_CURIE/bin
  . /ccc/cont003/home/dsm/p86ipsl/.atlas_env_netcdf4_curie_ksh > /dev/null 2>&1

Use libIGCM to launch the model, you can check the Script-file to see whether the modules were indeed loaded.

Last modified 11 months ago Last modified on 02/28/20 15:48:43