Ignore:
Timestamp:
Jun 3, 2024, 1:06:29 PM (4 months ago)
Author:
abarral
Message:

(WIP) continue refactoring setup.sh
fix env vars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/LMDZ_Setup_amaury/setup.sh

    r4955 r4956  
    374374
    375375function setup_simu {
     376  SIMRUNTOPDIR="$SIMRUNBASEDIR/$(basename "$local")"
    376377  SIMRUNDIR=$SIMRUNTOPDIR
    377378  mkdir -p "$SIMRUNDIR"
     
    437438  -e "s/cpus-per-task=.*.$/cpus-per-task=$omp/" \
    438439  -e "s/nthreads=.*./nthreads=$omp/" \
    439   -e "s/MAINDIR=.*.$/MAINDIR=$(basename "$SIMRUNTOPDIR")/" \
    440   -e "s:STORED=.*.*:STORED=$SIMRESDIR:" \
    441   -e "s:SCRATCHD=.*.*:SCRATCHD=$(dirname "$SIMRUNTOPDIR"):" \
     440  -e "s/MAINDIR=.*.$/MAINDIR=$(basename "$local")/" \
     441  -e "s:STORED=.*.*:STORED=$(dirname $local):" \
     442  -e "s:SCRATCHD=.*.*:SCRATCHD=$SIMRUNBASEDIR:" \
    442443  -e "s/stopsim=.*.$/stopsim=$stopsim/" \
    443444  -e "s/^veget=.*.$/veget=$veget/" \
     
    537538function run_sim_or_init {
    538539  cd "$local"
     540
    539541  if [[ $init = 1 ]]; then
    540542    #####################################################################
     
    634636
    635637# ANCIEN MULTI STEP   interp )
    636 if [ $aerosols = clim ]; then
    637 cp $local/interp_aerosols.sh .; chmod +x interp_aerosols.sh
    638 # Les aerosols de l'annee 2000 ont ete remplaces par "9999" qui pointe vers un fichier moyen sur 1995-2014
    639 #for year in 2000 1850; do  ./interp_aerosols.sh \$year; done
    640 #mv aerosols.2000.nc aerosols.clim.nc; mv aerosols.1850.nc aerosols.nat.nc
    641 for year in 9999 1850; do ./interp_aerosols.sh \$year; done
    642 mv aerosols.9999.nc aerosols.clim.nc; mv aerosols.1850.nc aerosols.nat.nc
     638if [[ $aerosols = clim ]]; then
     639  cp $local/interp_aerosols.sh .; chmod +x interp_aerosols.sh
     640  # Les aerosols de l'annee 2000 ont été remplacés par "9999" qui pointe vers un fichier moyen sur 1995-2014
     641  #for year in 2000 1850; do  ./interp_aerosols.sh \$year; done
     642  #mv aerosols.2000.nc aerosols.clim.nc; mv aerosols.1850.nc aerosols.nat.nc
     643  for year in 9999 1850; do ./interp_aerosols.sh \$year; done
     644  mv aerosols.9999.nc aerosols.clim.nc; mv aerosols.1850.nc aerosols.nat.nc
    643645fi
    644646
Note: See TracChangeset for help on using the changeset viewer.