Changeset 4890


Ignore:
Timestamp:
Apr 3, 2024, 12:58:58 PM (5 weeks ago)
Author:
abarral
Message:

copy local arch to module arch dir
standardize none/NONE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install_amaury/install_lmdz.sh

    r4873 r4890  
    6666    # surface/vegetation scheme treatment
    6767    # controlled by the single variable veget which can have the following values
    68     # - NONE: bucket scheme (default)
     68    # - none: bucket scheme (default)
    6969    # - CMIP6: orchidee version used in CMIP exercise, rev 5661
    7070    # - number: orchidee version number
    71     veget="NONE"
     71    veget="none"
    7272    # choose the resolution for the bench runs
    7373    # grid_resolution= 32x24x11 or 48x36x19 for tests (test without ORCHIDEE)
     
    9797    compile_with_fcm=1
    9898
    99     #Compilation with Cosp (cosp=NONE/v1/v2; default=NONE)
    100     cosp="NONE"
     99    #Compilation with Cosp (cosp=none/v1/v2; default=none)
     100    cosp="none"
    101101    opt_cosp=""
    102102
     
    208208
    209209    # Check on veget version
    210     if [[ $veget != 'NONE' && $veget != "CMIP6" ]]; then
     210    if [[ $veget != 'none' && $veget != "CMIP6" ]]; then
    211211        re='^[0-9]+$'
    212212        if ! [[ $veget =~ $re ]]; then
     
    216216
    217217    #Define veget-related suffix for gcm name
    218     if [[ $veget = 'NONE' ]]; then
     218    if [[ $veget = 'none' ]]; then
    219219        suff_orc=''
    220220        #For use with tutorial, orchidee_rev is also defined (will be
     
    302302}
    303303
    304 function download_model_AMAURY {
     304function download_model_AMAURY {  # TODO
    305305    MODEL=$(readlink -f "$MODEL"); echo "$MODEL"  # absolute path
    306306
     
    313313}
    314314
    315 function check_arch {
     315function install_arch {
    316316    # TODO     if [[ $(gfortran -dumpversion | cut -d. -f1) -ge 10 ]]; then allow_arg_mismatch="-fallow-argument-mismatch"; fi
    317317
     
    334334    # check compiler
    335335    compiler=$(< "$fcm_path" grep "%COMPILER" | sed -e "s/%COMPILER\s*//")
     336
     337    # Copy arch to different components
     338    # TODO check that this doesn't error if the source and destination are the same
     339    \cp -f "$arch_dir/arch-$arch.fcm" "$MODEL/modipsl/modeles/IOIPSL/arch"
     340    \cp -f "$arch_dir/arch-$arch.path" "$MODEL/modipsl/modeles/IOIPSL/arch"
     341    \cp -f "$arch_dir/arch-$arch.fcm" "$MODEL/modipsl/modeles/ORCHIDEE/arch"
     342    \cp -f "$arch_dir/arch-$arch.path" "$MODEL/modipsl/modeles/ORCHIDEE/arch"
     343
     344    # TODO TEMP compat w/ old orch version - make a proper case later
     345    sed -i'' -e "s/-I//" -e "s/-L//" "$MODEL/modipsl/modeles/ORCHIDEE/arch/arch-$arch.path"  # /!\ we only replace first occurence on purpose
    336346}
    337347
     
    348358          ifort)  opt1="-compiler intel"; opt2="-CC icc -FC ifort -CXX icpc";;
    349359          pgf90)  opt1="-compiler pgf90"; opt2="-CC pgcc -FC pgf90 -CXX pgCC";;
    350           *)      echo "unexpected compiler $compiler" for netcdf; exit 1
     360          *)      echo "unexpected compiler $compiler for netcdf"; exit 1
    351361        esac
    352362
     
    415425    echo "Compiling IOIPSL, the interface library with Netcdf $(date) (log: $ioipsllog)"
    416426
    417     if ! ./makeioipsl_fcm -arch "$arch" -arch_path "$arch_dir" -job 8 > "$ioipsllog" 2>&1; then
    418     echo "IOIPSL compile failed, exiting"; exit 1
     427    if ! ./makeioipsl_fcm -arch "$arch" -job 8 > "$ioipsllog" 2>&1; then
     428        echo "IOIPSL compile failed, exiting"; exit 1
    419429    fi
    420430    cp lib/* ../../lib
     
    457467
    458468function get_orchidee_version {  # Set / Check ORCHIDEE version
    459   if [[ $veget = "NONE" ]]; then
     469  if [[ $veget = "none" ]]; then
    460470    veget_version="false"
    461471  elif [[ $veget = "CMIP6" ]]; then
     
    489499  get_orchidee_version
    490500
    491   if [[ $veget != "NONE" ]]; then
     501  if [[ $veget != "none" ]]; then
    492502    cd "$MODEL/modipsl/modeles/ORCHIDEE"
    493503
     
    511521    fi
    512522
    513     # TODO debug
    514     echo "./makeorchidee_fcm $xios_orchid $opt_orc -parallel none -arch $arch -arch_path $arch_dir"
    515 
    516     if ! ./makeorchidee_fcm "$xios_orchid" "$opt_orc" -parallel none -arch "$arch" -arch_path "$arch_dir" > "$orchideelog" 2>&1; then
     523    if ! ./makeorchidee_fcm "$xios_orchid" "$opt_orc" -parallel none -arch "$arch" > "$orchideelog" 2>&1; then
    517524      echo "ORCHIDEE seq compilation failed, exiting"; exit 1
    518525    fi
     
    527534#download_model
    528535download_model_AMAURY
    529 check_arch
     536install_arch
    530537check_available_software
    531538install_netcdf
     
    675682
    676683veget_version=false
    677 if [[ $veget != 'NONE' ]]; then
     684if [[ $veget != 'none' ]]; then
    678685    cd "$MODEL/modipsl/modeles/ORCHIDEE"
    679686
     
    750757    fi # of "if [[ -d tools ]]"
    751758    echo "install_lmdz.sh orchidee_compil_seq_OK $(date)"
    752 fi # of if [[ "$veget" != 'NONE' ]]
     759fi # of if [[ "$veget" != 'none' ]]
    753760
    754761
     
    951958    #
    952959    cd "$ORCHPATH"
    953     if [[ -d src_parallel && $veget != 'NONE' ]]; then
     960    if [[ -d src_parallel && $veget != 'none' ]]; then
    954961        cd arch
    955962        sed  \
     
    980987                           -arch $arch >> "$orchideelog" 2>&1
    981988        echo "End of ORCHIDEE compilation in parallel mode $(date)"
    982     elif [[ $veget != 'NONE' ]]; then
     989    elif [[ $veget != 'none' ]]; then
    983990        echo '##########################################################'
    984991        echo ' Orchidee version too old                                 '
     
    986993        echo '##########################################################'
    987994        exit 1
    988     fi #�of [ -d src_parallel && $veget != 'NONE' ]
     995    fi #�of [ -d src_parallel && $veget != 'none' ]
    989996
    990997    # LMDZ
Note: See TracChangeset for help on using the changeset viewer.