#!/bin/bash

  # WARNING: CDO HAS TO BE ON VERSION 1.9.4 
  # (If not, conflicts with  weekly means computation could appear)

if [[ $BSC_MACHINE == "nord3v2" ]]; then

  module use /gpfs/projects/bsc32/software/suselinux/11/modules/all
  module unuse /apps/modules/modulefiles/applications /apps/modules/modulefiles/compilers /apps/modules/modulefiles/tools /apps/modules/modulefiles/libraries /apps/modules/modulefiles/environment
  module purge 

  module load CDO/1.9.8-foss-2019b
  module load R/4.1.2-foss-2019b
  module load OpenMPI/4.0.5-GCC-8.3.0-nord3-v2
  module load GEOS/3.7.2-foss-2019b-Python-3.7.4
  module load GDAL/3.5.0-foss-2019b-Python-3.7.4
  module load PROJ/9.0.0-GCCcore-8.3.0
  module load Phantomjs/2.1.1

elif [[ $HOSTNAME == "bsceshub02.bsc.es" ]]; then

  module purge
  module load CDO/1.9.8-foss-2021b
  module load R/4.2.1-foss-2021b
  module load GEOS/3.11.0-GCC-11.2.0
  module load GDAL/3.5.2-foss-2021b-Python-3.9.6
  module load PROJ/9.1.0-foss-2021b
  module load Phantomjs/2.1.1

else

  module purge
  module load CDO/1.9.8-foss-2015a
  module load R/4.1.2-foss-2015a-bare
  module load GEOS/3.7.2-foss-2015a-Python-3.7.3
  module load GDAL/2.2.1-foss-2015a
  module load PROJ/4.8.0-foss-2015a
  module load Phantomjs/2.1.1

fi

