Changeset 5539


Ignore:
Timestamp:
Feb 13, 2025, 6:58:30 PM (41 hours ago)
Author:
fhourdin
Message:

Calling save_pub from main.sh

Location:
BOL/LMDZ_Setup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • BOL/LMDZ_Setup/main.sh

    r5535 r5539  
    22
    33set -eu
     4. lmdz_env.sh
    45
    56#####################################################################
     
    7576
    7677# Expert options passed to setup.sh
    77 rad=rrtm       # Radiation oldrad/rrtm/ecrad
    78 netcdf=0       # netcddf 0 (from system) / 1 reinstall / directory containing nectdf*
    79 aerosols=clim  # n (no) / clim
    80 veget=CMIP6    # Orchidee version : CMIP6 / 7983 (orch2.2 ) / more recent svn
     78rad=rrtm        # Radiation oldrad/rrtm/ecrad
     79netcdf=0        # netcddf 0(from system)/1 reinstall/dir. containing nectdf*
     80aerosols=clim   # n (no) / clim
     81veget=CMIP6     # Orchidee version : CMIP6 / 7983 (orch2.2 ) / more recent svn
     82save_pub=$LMDZD # Will save files downloaded by wget on $LMDZD (could be 0 or 1)
    8183
    8284# For rapid tests
     
    121123    # Remember: some other options are only available in lmdz_env.sh and setup.sh.
    122124    # shellcheck disable=SC2086
    123     ./setup.sh -v "$version" -d "$resol" -mthini "$mthini" -mthend "$mthend" -init "$init" -climato "$climato" -f "$freq" -p "$lmd_phys" -name "$name" $cosp $xios $nudging -r "$svn" -rad $rad -netcdf $netcdf -aerosols $aerosols -veget $veget
     125    ./setup.sh -v "$version" -d "$resol" -mthini "$mthini" -mthend "$mthend" -init "$init" -climato "$climato" -f "$freq" -p "$lmd_phys" -name "$name" $cosp $xios $nudging -r "$svn" -rad $rad -netcdf $netcdf -aerosols $aerosols -veget $veget -save_pub $save_pub
    124126  else
    125127    echo "File $deffile inexistent"; exit 1
  • BOL/LMDZ_Setup/setup.sh

    r5535 r5539  
    5656  #     For aerosols=n, aerosol flags will automatically be set to "n".
    5757  #   With XIOS : adjust DEF/XMLfiles*/file*xml
     58
     59  save_pub=0
     60
    5861}
    5962
     
    140143             -nudging                to run with nudging. Nudging files must be created independently
    141144             -p                      the physics to use (default <$phylmd>)
     145             -save_pub               To files downlaoded with wget (default <$SIM>)
    142146             -name                   install folder name (default <$SIM>)
    143147             Other options available (see "options" section in the script)
    144148........fin
    145149        exit;;
    146       "-v") version="$2"; shift; shift;;
    147       "-r") svn=$2; shift; shift;;
    148       "-d") resol=$2; shift; shift;;
    149       "-f") freq=$2; shift; shift;;
    150       "-p") phylmd=$2; shift; shift;;
    151       "-name") SIM=$2; shift; shift;;
    152       "-rad") rad=$2; shift; shift;;
    153       "-netcdf") netcdf=$2; shift; shift;;
    154       "-aerosols") aerosols=$2; shift; shift;;
    155       "-veget") veget=$2; shift; shift;;
     150      "-v") version="$2"; shift 2;;
     151      "-r") svn=$2; shift 2;;
     152      "-d") resol=$2; shift 2;;
     153      "-f") freq=$2; shift 2;;
     154      "-p") phylmd=$2; shift 2;;
     155      "-name") SIM=$2; shift 2;;
     156      "-save_pub") save_pub=$2 ; shift 2 ;;
     157      "-rad") rad=$2; shift 2;;
     158      "-netcdf") netcdf=$2; shift 2;;
     159      "-aerosols") aerosols=$2; shift 2;;
     160      "-veget") veget=$2; shift 2;;
    156161      "-cosp") cosp=y; shift;;
    157162      "-xios") xios=y; shift;;
    158       "-init") init=$2; shift; shift;;
     163      "-init") init=$2; shift 2;;
    159164      "-nudging") ok_guide=y; shift;;
    160       "-climato") climato=$2; shift; shift;;
    161       "-mthini") mthini=$2; shift; shift;;
    162       "-mthend") mthend=$2; shift; shift;;
     165      "-climato") climato=$2; shift 2;;
     166      "-mthini") mthini=$2; shift 2;;
     167      "-mthend") mthend=$2; shift 2;;
    163168      *) echo "unexpected $1"; $0 -h; exit
    164169    esac
     
    181186  jm=$(echo "$resol" | cut -dx -f2)
    182187  lm=$(echo "$resol" | cut -dx -f3)
     188
     189  case $save_pub in
     190     0) save_pub_opt=0 ;;
     191     1) save_pub_opt="-save_pub" ;;
     192     *) save_pub_opt="-save_pub -save_pub_dir $save_pub"
     193          mkdir -p $save_pub
     194          if [ $? != 0 ] ; then echo Cannot create directory $save_pub
     195                           exit 1 ; fi
     196  esac
    183197
    184198  yearini=$(echo "$mthini" | cut -c-4)
     
    277291     jobcmd="bash"
    278292  fi
    279   echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench compile_only $parallel $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH -make_j $make_j -jobcmd $jobcmd" >> install_lmdz_options.$$.sh
     293  echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench compile_only $parallel $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH -make_j $make_j -jobcmd $jobcmd" $save_pub_opt >> install_lmdz_options.$$.sh
    280294  chmod +x install_lmdz_options.$$.sh
    281295  echo "Running install_lmdz_options.$$.sh"
Note: See TracChangeset for help on using the changeset viewer.