wiki:Documentation/UserGuide/InstallLibrary

Version 5 (modified by luyssaert, 9 years ago) (diff)

--

Why would I want to install another netcdf library?

You don't want to install another netcdf library. In general all is taken care of by the TCCG and the libIGCM team. Nevertheless, there was a netcdf-related problem in March 2015 and this was the procedure to load a different netcdf library, use it for the compilation and use it for running the model. 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.

unload module netcdf/4.2_hdf5_parallel (NetCDF)

and load the new module

load module 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
...

Make sure that these paths are used in

../../modeles/IOIPSL/src/Makefile
../../modeles/ORCHIDEE/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. 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.