Changeset 3943 for BOL


Ignore:
Timestamp:
Jun 15, 2021, 4:00:54 PM (4 years ago)
Author:
idelkadi
Message:

Adaptation of install_lmdz.sh to be able to run LMDZ simulations with the radiative code ECRAD (./install_lmdz.sh -rad ecrad).
Note that the 3D simulation still crashes with ECRAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r3922 r3943  
    106106opt_makelmdz_xios=""
    107107
     108## compile with old/rrtm/ecrad radiatif code (Default=rrtm)
     109rad=rrtm
     110
    108111## compile_with_fcm=1 : use makelmdz_fcm (1) or makelmdz (0)
    109112compile_with_fcm=1
     
    132135    $0 [ -v version ] [ -r svn_release ]
    133136           [ -parallel PARA ] [ -d GRID_RESOLUTION ] [ -bench 0/1 ]
    134            [-name LOCAL_MODEL_NAME] [-gprof] [-opt_makelmdz]
     137           [-name LOCAL_MODEL_NAME] [-gprof] [-opt_makelmdz] [-rad RADIATIF]
    135138
    136139    -v       "version" like 20150828.trunk
     
    166169
    167170    -cospv2      to compile with cosp(v2)
     171
     172    -rad RADIATIF : can be old, rrtm or ecrad radiatif code
    168173
    169174    -nofcm     to compile without fcm
     
    198203     "-SCM") SCM=1 ; shift ;;
    199204     "-opt_makelmdz") OPT_MAKELMDZ="$2" ; shift ; shift ;;
     205     "-rad") rad=$2
     206             case $rad in
     207                "old"|"rrtm"|"ecrad") rad=$2 ; shift ; shift ;;
     208                *) echo Only old rrtm ecrad for rad option ; exit
     209             esac ;;
    200210     "-parallel") parallel=$2
    201211                  case $parallel in
     
    214224   esac
    215225done
     226
     227#Option de compilation en fonction du code radiatif (-rad rrtm/ecrad)
     228if [ $rad = rrtm ] ; then
     229   opt_rad="-rad rrtm"
     230elif [ $rad = ecrad ] ; then
     231   opt_rad="-rad ecrad"
     232else
     233   opt_rad=""
     234fi
    216235
    217236# Check on veget version
     
    922941# sequential compilation and bench
    923942if [ "$sequential" = 1 ] ; then
    924 echo "./$makelmdz $optim $OPT_MAKELMDZ $optim -rrtm true $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
     943echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
    925944chmod +x ./compile.sh
    926945if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi
     
    9911010  echo resol=${grid_resolution} >> compile.sh
    9921011  if [ ${hostname:0:5} = jean- -a "$cospv2" = 1 ] ; then
    993      echo ./$makelmdz -dev $optim $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
    994      echo ./$makelmdz -dev $optim $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm
     1012     echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
     1013     echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm
    9951014  else   
    996     echo ./$makelmdz $optim $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
    997     echo ./$makelmdz $optim $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm
     1015    echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
     1016    echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm
    9981017  fi
    9991018  chmod +x ./compile.sh
     
    11141133  fi
    11151134
     1135  cd ..
     1136fi
     1137
     1138# Cas Bensh avec ecrad
     1139if [ "$rad" = "ecrad" ] ; then
     1140  cd BENCH${grid_resolution}
     1141  cp  ../DefLists/namelist_ecrad .
     1142  cp -r ../libf/phylmd/ecrad/data .
     1143# Attention au cas ou ne 1
     1144  sed -e 's@iflag_rrtm=1@iflag_rrtm=2@' physiq.def > tmp
     1145   \mv -f tmp physiq.def
    11161146  cd ..
    11171147fi
     
    12071237tar xvf 1D.tar.gz
    12081238cd 1D
    1209 ./run.sh
     1239./run.sh -rad $rad
    12101240fi
    12111241set -vx
Note: See TracChangeset for help on using the changeset viewer.