[4615] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | ##################################################################### |
---|
| 4 | # This script manages the call to setup.sh |
---|
| 5 | # |
---|
| 6 | # Authors : |
---|
| 7 | # F. Hourdin, frederic.hourdin@lmd.ipsl.fr |
---|
| 8 | # Modified A. Sima, adriana.sima@lmd.ipsl.fr |
---|
| 9 | # |
---|
| 10 | # Some options can only be changed directly in lmdz_env.sh or setup.sh |
---|
| 11 | # --> In setup.sh : |
---|
| 12 | # * Orchidee version, to be defined through "veget" option |
---|
| 13 | # default : OR-CMIP6 |
---|
| 14 | # * Aerosol forcing, to be defined through "aerosols" option : |
---|
| 15 | # n (no, default) / clim (an2000)/ spla (interactive dust and sea salt) |
---|
| 16 | # !!! STRONG recommendation : experiments with DIFFERENT Orchidee or aerosol options |
---|
| 17 | # !!! should be performed in DIFFERENT TEST_PROD folders |
---|
| 18 | # !!! (especially as they may need different initial files) |
---|
| 19 | # * Use or not of the RRTM radiation code : rrtm=true/false |
---|
| 20 | # * Compiling options : debug, use or not of the fcm makefile |
---|
| 21 | # |
---|
| 22 | # --> In lmdz_env.sh : |
---|
| 23 | # * Model & configuration setup |
---|
| 24 | # If you install the present tutorial_prod package in $STORE/your_folder instead of $STORE |
---|
| 25 | # modify STORED variable accordingly |
---|
| 26 | # The model will be installed in $LMDZD directory defined in lmdz_env.sh |
---|
| 27 | # Default : LMDZD=$WORK ; can be changed in LMDZD=$WORK/Your_directory |
---|
| 28 | # To use a model already installed (and compiled), by you or someone else (check the acces!): |
---|
| 29 | # set LMDZD=path_to_model_to_use |
---|
| 30 | # You'll also need to (re)define "LMDZname" accordingly, in setup.sh |
---|
| 31 | ##################################################################### |
---|
| 32 | |
---|
| 33 | #=========================================================== |
---|
| 34 | # 1. Model setup |
---|
| 35 | #=========================================================== |
---|
| 36 | |
---|
| 37 | # Version of the tar file on https://lmdz.lmd.jussieu.fr/pub/src |
---|
[4943] | 38 | # Last "testing" version, thoroughly checked by the LMDZ team : contains LMDZ rev 4938 (2024-05-08) |
---|
| 39 | version="20240508.trunk" #!! DON'T CHANGE IT WITHOUT CHECKING WITH LMDZ TEAM !! |
---|
[4615] | 40 | svn="" #!! DON'T CHANGE IT WITHOUT CHECKING WITH LMDZ TEAM !! |
---|
| 41 | # CONTACT LMDZ Team : |
---|
| 42 | # email: poihl@listes.lmd.ipsl.fr |
---|
| 43 | # Mattermost: https://mattermost.lmd.ipsl.fr/lmdz/channels/installation-et-tutoriels |
---|
| 44 | |
---|
| 45 | #----------------------------------------------------------- |
---|
| 46 | # Grid number of points IMxJMxLM |
---|
| 47 | #----------------------------------------------------------- |
---|
| 48 | resol=144x142x79 |
---|
| 49 | |
---|
| 50 | #----------------------------------------------------------- |
---|
| 51 | # To install the model : -install |
---|
| 52 | #----------------------------------------------------------- |
---|
| 53 | install="" |
---|
| 54 | install=-install |
---|
| 55 | |
---|
| 56 | #----------------------------------------------------------- |
---|
| 57 | # Using XIOS for IOs |
---|
| 58 | #----------------------------------------------------------- |
---|
| 59 | xios="-xios" |
---|
| 60 | xios="" |
---|
| 61 | |
---|
| 62 | #----------------------------------------------------------- |
---|
| 63 | # Using or not the Cosp simulator |
---|
| 64 | #----------------------------------------------------------- |
---|
| 65 | #cosp="-cosp" |
---|
| 66 | cosp="" |
---|
| 67 | echo $xios $cosp |
---|
| 68 | |
---|
| 69 | #----------------------------------------------------------- |
---|
| 70 | # Choice of physics (default : "lmd" for "phylmd" ) |
---|
| 71 | # Examples : lmd_phys="new" to compile with phynew instead of phylmd, |
---|
| 72 | # lmd_phys="lmdiso" to run with Isotopes |
---|
| 73 | #----------------------------------------------------------- |
---|
| 74 | lmd_phys="lmd" |
---|
| 75 | |
---|
| 76 | #=========================================================== |
---|
| 77 | # 2. Simulation setup |
---|
| 78 | #=========================================================== |
---|
| 79 | |
---|
| 80 | #----------------------------------------------------------- |
---|
| 81 | # Initial state and Boundary conditions |
---|
| 82 | #----------------------------------------------------------- |
---|
| 83 | |
---|
| 84 | # init= 1: to create a new start in INT |
---|
| 85 | # 0: to read start files in INIT |
---|
| 86 | # SIM: to read start files from previous simulation SIM0 |
---|
| 87 | # limit.nc and aerosols forcing are put in ./LIMIT |
---|
| 88 | init=1 |
---|
| 89 | #init=SIM0 # SIM0 must be in the same folder as the new SIM |
---|
| 90 | |
---|
| 91 | #----------------------------------------------------------- |
---|
| 92 | # climato=1 : Climatological SSTs with 360-day calendar |
---|
| 93 | # =0 : interannual SSTs with true (ie gregorian) calendar |
---|
| 94 | #----------------------------------------------------------- |
---|
| 95 | climato=1 |
---|
| 96 | |
---|
| 97 | #----------------------------------------------------------- |
---|
| 98 | # Nudging: Can only be activated with climato=0 and freq=mo |
---|
| 99 | #----------------------------------------------------------- |
---|
| 100 | nudging="-nudging" |
---|
| 101 | nudging="" |
---|
| 102 | #If using nudging, then check DEF/guide.def : |
---|
| 103 | # - ok_guide will be automatically set to "y" by setup.sh |
---|
| 104 | # - You may want to check/customize the nudging parameters |
---|
| 105 | |
---|
| 106 | #----------------------------------------------------------- |
---|
| 107 | # Length of elementary simulations yr (year) or mo (month) |
---|
| 108 | #----------------------------------------------------------- |
---|
| 109 | freq=yr |
---|
| 110 | |
---|
| 111 | #----------------------------------------------------------- |
---|
| 112 | # Initial/final month for simulation |
---|
| 113 | #----------------------------------------------------------- |
---|
| 114 | # If $init=1, the INIT file will be called start.200001.nc, |
---|
| 115 | # but the data correspond in fact to another day. |
---|
| 116 | # NB : the run stops in the BEGINNING of mthend (test "next=stopsim") |
---|
| 117 | mthini=200001 |
---|
| 118 | mthend=200501 |
---|
| 119 | |
---|
| 120 | #----------------------------------------------------------- |
---|
| 121 | # Output files, frequencies, levels |
---|
| 122 | # If you use IOIPSL (option xios=""), you may want to choose and customize DEF/config.def. |
---|
| 123 | # A few versions are available as DEF/config.def_* ; config.def is a copy of config.def_default |
---|
| 124 | # See phys_out_filekeys, phys_out_filelevels, phys_out_filetimesteps, and supplementary variables |
---|
| 125 | # If you use XIOS (option xios="-xios"), check/modify DEF/XMLfiles*/file*xml |
---|
| 126 | # In both cases, the default output is "histday". |
---|
| 127 | #----------------------------------------------------------- |
---|
| 128 | # Grid characteristics (regular, zoomed) |
---|
| 129 | # You may want to choose and customize DEF/gcm.def |
---|
| 130 | # A few versions are available as DEF/gcm.def_* ; |
---|
| 131 | # The default, for regular grid 144x142x79, corresponds to _iperiod7 |
---|
| 132 | # (Expert : TEMPORARILY : setup.sh forces use of gcm.def_zNAfrica_BiJe for aerosols=spla) |
---|
| 133 | |
---|
| 134 | #=========================================================== |
---|
| 135 | # 3. Example of calling setup.sh in loop |
---|
| 136 | #=========================================================== |
---|
| 137 | |
---|
| 138 | # By default, the series is done on one or more of the various versions of physiq.def |
---|
| 139 | # to be chosen among DEF/PHYS/physiq.def_* , and listed in "physics" : |
---|
| 140 | # NOTE : automatically choosing DEF/PHYS/physiq.def_NPiso for isotopes |
---|
| 141 | physics="NPv6.3" |
---|
| 142 | if [ $lmd_phys = "lmdiso" ] ; then physics="NPiso" ; fi |
---|
| 143 | |
---|
| 144 | for phys in $physics ; do |
---|
| 145 | deffile=DEF/PHYS/physiq.def_${phys} |
---|
| 146 | if [ -f $deffile ] ; then |
---|
| 147 | cp -p $deffile DEF/physiq.def |
---|
| 148 | |
---|
| 149 | # name of simulation : can be changed to user's convenience |
---|
| 150 | # (Default : name=$phys to loop on different physics) |
---|
| 151 | name=${phys} |
---|
| 152 | |
---|
| 153 | # launching setup.sh with the options defined in this main.sh. |
---|
| 154 | # Remember : some other options are only available in lmdz_env.sh and setup.sh. |
---|
| 155 | ./setup.sh -v "$version" $svn -d $resol $install $cosp $xios -init $init -climato $climato $nudging -f $freq -mthini $mthini -mthend $mthend -p $lmd_phys -name $name |
---|
| 156 | |
---|
| 157 | nphys=`echo "$physics" |wc -w` ; if [ $nphys -gt 1 -a $init = 1 ] ; then echo "!=!=! TO LOOP OVER MULTIPLE "physics", YOU NEED init /= 1 AND start* + limit* files ALREADY AVAILABLE IN THIS FOLDER !=!=!" ; exit ; fi |
---|
| 158 | |
---|
| 159 | else # wrong "{phys}" name in "physics" list |
---|
| 160 | echo File $deffile inexistent |
---|
| 161 | exit |
---|
| 162 | fi |
---|
| 163 | |
---|
| 164 | done |
---|
| 165 | |
---|