wiki:Documentation/UserGuide/InstallLibrary

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)

Objective

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/4.3.3.1_hdf5_parallel

Check if the new module was loaded

module list

Check for the library paths in the module

module show netcdf/4.3.3.1_hdf5_parallel

for this example you will get the follow output

...
setenv		NETCDF_ROOT	/usr/local/netcdf-4.3.3.1_hdf5_parallel
setenv		NETCDF_EXEDIR	/usr/local/netcdf-4.3.3.1_hdf5_parallel/bin
setenv		NETCDF_INCDIR	/usr/local/netcdf-4.3.3.1_hdf5_parallel/include
setenv		NETCDF_LIBDIR	/usr/local/netcdf-4.3.3.1_hdf5_parallel/lib
...

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

Make sure that these paths are used in

../../modeles/IOIPSL/src/Makefile
../../modeles/ORCHIDEE/arch.path
../../modeles/LMDZ/arch.path
../../modeles/XIOS/arch/arch-X64_CURIE.path

When you change from library 4.2 to 4.3.3.1 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):

../../modeles/XIOS/arch/arch-X64_CURIE.env

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/4.3.3.1_hdf5_parallel
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
else
  . /ccc/cont003/home/dsm/p86ipsl/.atlas_env_netcdf4_curie_ksh > /dev/null 2>&1
  PCMDI_MP=/ccc/work/cont003/dsm/p86ipsl/PCMDI-MP
fi

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