Ignore:
Timestamp:
Oct 18, 2024, 2:29:12 PM (4 days ago)
Author:
Laurent Fairhead
Message:

Modifications needed so that install_lmdz can compile DYNAMICO and the icosalmdz.exe program

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install_amaury/install_lmdz.sh

    r5187 r5242  
    8787    opt_makelmdz_xios=""
    8888
     89    icolmdz=0
     90    DYNAMICO_VERS=374a3c66
     91
    8992    rad="rrtm"
    9093
     
    167170
    168171        -noclean    will only download necessary files (but no thorough check is made on the integrity of existing files), and will recompile everything (very quick if it's already been compiled before)
     172
     173        -icolmdz    to compile the icolmdz executable as well as the lonlat one
    169174
    170175........fin
     
    206211            "-jobcmd") jobcmd=$2; shift; shift;;
    207212            "-noclean") clean_install=0; shift;;
     213            "-icolmdz") icolmdz=1; shift;;
    208214            *)  bash install_lmdz.sh -h; exit 1
    209215        esac
     
    286292    fi
    287293
     294    ## if compiling icolmdz, XIOS must be set
     295    if [[ $icolmdz = 1 && $with_xios = 0 ]]; then
     296      echo "Error, you must set -xios to compile the icolmdz executable"; exit 1
     297    fi
    288298    ## if also compiling XIOS, parallel must be mpi_omp
    289299    if [[ $with_xios = 1 && $parallel != "mpi_omp" ]]; then
     
    354364
    355365        cd - &> /dev/null
     366    ## checkout DYNAMICO and icosa interface in modipsl/modeles if needed
     367       if [[ $icolmdz = 1 ]]; then
     368         TMPLOCDIR=$(pwd)
     369         cd "$MODEL/modipsl/modeles/"
     370         getlog="$(pwd)/get.log"
     371         git clone https://gitlab.in2p3.fr/ipsl/projets/dynamico/dynamico.git DYNAMICO ; cd DYNAMICO ; git checkout master; cd .. &>> get.log
     372         svn checkout https://svn.lmd.jussieu.fr/LMDZ/ICOSA_LMDZ &>> get.log
     373         cd "$TMPLOCDIR" &> /dev/null
     374       fi
    356375    fi
    357376}
     
    631650    lmdzlog="$(pwd)/lmdz.log"
    632651
     652
    633653    if [[ -n $svn_lmdz ]]; then
    634654        local curr_rev
     
    696716    else
    697717        echo "Compilation successful, the executable is $exe_name $(date)"
     718    fi
     719}
     720
     721function compile_icolmdzor {
     722    if [[ $icolmdz = 1 ]]; then
     723#      install_arch "DYNAMICO"
     724      install_arch "ICOSA_LMDZ"
     725
     726      cd "$LMDZPATH"
     727      local para_compile_opt="-parallel $parallel"; if [[ $parallel = "none" ]]; then para_compile_opt=""; fi
     728
     729      # LMDZ physics package library already available in LMDZ/config/lib directory
     730      # Compile DYNAMICO
     731      cd ../DYNAMICO
     732      cd arch
     733      wget http://lmdz.lmd.jussieu.fr/pub/src_archives/misc/arch/DYNAMICO/arch-local-gfortran-parallel.env
     734      wget http://lmdz.lmd.jussieu.fr/pub/src_archives/misc/arch/DYNAMICO/arch-local-gfortran-parallel.fcm
     735      wget http://lmdz.lmd.jussieu.fr/pub/src_archives/misc/arch/DYNAMICO/arch-local-gfortran-parallel.path
     736      cd ..
     737
     738      dynamicolog="$(pwd)/dynamico.log"
     739      echo "Compile DYNAMICO"
     740      echo "$jobcmd ./make_icosa $optim_flag -arch $arch -job $make_j $para_compile_opt -external_ioipsl -with_xios" > compile.sh
     741      chmod +x ./compile.sh
     742      if ! ./compile.sh &> "$dynamicolog"; then
     743        echo "STOP: DYNAMICO compilation failed, exiting"; exit 1
     744      fi
     745      echo "Finished DYNAMICO compilation $(date)"
     746
     747      # Compile icosa_lmdz
     748      cd ../ICOSA_LMDZ
     749      icosalog="$(pwd)/icosa.log"
     750      echo "Compile interface ICOSA_LMDZ"
     751      echo "$jobcmd ./make_icosa_lmdz -arch $arch -j $make_j -nodeps -p lmd $optim_flag $para_compile_opt -with_orchidee" > compile.sh
     752      chmod +x ./compile.sh
     753      if ! ./compile.sh &> "$icosalog"; then
     754        echo "STOP: ICOSA_LMDZ compilation failed, exiting"; exit 1
     755      fi
     756      echo "Finished DYNAMICO compilation $(date)"
    698757    fi
    699758}
     
    9561015compile_lmdz
    9571016run_bench
     1017compile_icolmdzor
Note: See TracChangeset for help on using the changeset viewer.