Changeset 4935
- Timestamp:
- May 6, 2024, 1:20:09 PM (8 months ago)
- Location:
- BOL/LMDZ_Setup_amaury
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
BOL/LMDZ_Setup_amaury/README0_HowTo.md
r4934 r4935 1 2 1 3 Last update : 2023-07-05 2 ===================================================================3 4 4 5 Complementary information and FAQ (in French) : 5 6 https://docs.google.com/document/d/1OLZG6e-86NiXuv5-aALxKIh-QPkp4BdCwWtiBFot-6c 6 7 7 ===================================================================8 8 I. What this working environment does and does not 9 ================================================== =================9 ================================================== 10 10 11 This tutorialcan only be used on jean-zay computer at idris so far.11 This setup can only be used on jean-zay computer at idris so far. 12 12 However, extension to ciclad or irene will be done soon. 13 13 … … 23 23 a calendar with 360 days. 24 24 25 Optionally 25 Optionally: the configuration includes the ability to use interannually 26 26 varying SST and to activate "nudgning" by reanalysis. 27 27 In both cases, the calendar is then a real one. … … 44 44 A configuration with isotopes is also available since 2023-04. 45 45 46 ===================================================================47 46 II. Files and scripts 48 47 =================================================================== … … 51 50 CAREFUL: these scripts MUST be run from $STORE !!!!! 52 51 53 untar the tutorial_prod.tar file in your $STORE 52 untar the tutorial_prod.tar file in your $STORE; 54 53 rename the TEST_PROD directory if you want to; 55 54 then run everything from this newly created directory … … 100 99 DEF/guide.def : nudging parameters 101 100 102 ============================================================103 101 III. Known problems 104 =================== =========================================102 =================== 105 103 106 104 Running zoomed or coarse grid simulations … … 116 114 choose the corresponding version of DEF/orchidee_6.*.def 117 115 118 ============================================================119 116 IV. Updates (reverse chronological order) 120 ============================================================ 117 ========================================= 118 121 119 2023-07 (AS-FH-LF) : mise sous svn du repertoire TEST_PROD, renommé en "LMDZ_config" 122 120 … … 137 135 24/03/2020 (FH): corrections for use with AMIP SSTs and monthly freq 138 136 139 ============================================================140 137 V. TBD 141 ====== ======================================================138 ====== 142 139 See documentation (link of the shared google doc in the beginning of this Readme) 143 140 -
BOL/LMDZ_Setup_amaury/README1_TestMode.md
r4934 r4935 2 2 3 3 For development/debug purposes : 4 List of changes in tutorial_prod scripts, in order to obtain a light&fast version : 5 ============================================= 4 5 ### List of changes in tutorial_prod scripts, in order to obtain a light&fast version : 6 6 7 7 8 -> low horizontal resolution : 48x36x39, or 32x32x39 -
BOL/LMDZ_Setup_amaury/main.sh
r4852 r4935 1 1 #!/bin/bash 2 3 set -eu 2 4 3 5 ##################################################################### … … 25 27 # modify STORED variable accordingly 26 28 # The model will be installed in $LMDZD directory defined in lmdz_env.sh 27 # Default : LMDZD=$WORK 29 # Default : LMDZD=$WORK; can be changed in LMDZD=$WORK/Your_directory 28 30 # To use a model already installed (and compiled), by you or someone else (check the acces!): 29 31 # set LMDZD=path_to_model_to_use … … 37 39 # Version of the tar file on https://lmdz.lmd.jussieu.fr/pub/src 38 40 # Last "testing" version, thoroughly checked by the LMDZ team : contains LMDZ rev 4729 (2023-10-22) 41 # TODO move to expert-level settings 39 42 version="20240308.trunk" #!! DON'T CHANGE IT WITHOUT CHECKING WITH LMDZ TEAM !! 40 43 svn="" #!! DON'T CHANGE IT WITHOUT CHECKING WITH LMDZ TEAM !! … … 43 46 # Mattermost: https://mattermost.lmd.ipsl.fr/lmdz/channels/installation-et-tutoriels 44 47 45 #-----------------------------------------------------------46 48 # Grid number of points IMxJMxLM 47 #----------------------------------------------------------- 48 resol=144x142x79 49 resol="144x142x79" 49 50 50 #----------------------------------------------------------- 51 # To install the model : -install 52 #----------------------------------------------------------- 53 install="" 54 install=-install 51 # Whether to install the model: "-install" to install the model, else "" 52 install="-install" 55 53 56 #----------------------------------------------------------- 57 # Using XIOS for IOs 58 #----------------------------------------------------------- 59 xios="-xios" 54 # Using XIOS for IOs: "-xios" for enabled, else "" 60 55 xios="" 61 56 62 #----------------------------------------------------------- 63 # Using or not the Cosp simulator 64 #----------------------------------------------------------- 65 #cosp="-cosp" 57 # Using or not the Cosp simulator: "-cosp" for enabled, else "" 66 58 cosp="" 67 echo $xios $cosp68 59 69 #-----------------------------------------------------------70 60 # Choice of physics (default : "lmd" for "phylmd" ) 71 61 # Examples : lmd_phys="new" to compile with phynew instead of phylmd, 72 62 # lmd_phys="lmdiso" to run with Isotopes 73 #-----------------------------------------------------------74 63 lmd_phys="lmd" 75 64 … … 78 67 #=========================================================== 79 68 80 #-----------------------------------------------------------81 69 # Initial state and Boundary conditions 82 #----------------------------------------------------------- 70 # init= 1: to create a new start in INIT 71 # 0: to read start files in INIT 72 # SIM: to read start files from previous simulation SIM0, /!\ SIM0 must be in the same folder as the new SIM 73 # (limit.nc and aerosols forcing are put in ./LIMIT) 74 init=1 83 75 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 76 # climato=1 : Climatological SSTs with 360-day calendar 93 77 # =0 : interannual SSTs with true (ie gregorian) calendar 94 #-----------------------------------------------------------95 78 climato=1 96 79 97 #-----------------------------------------------------------98 80 # Nudging: Can only be activated with climato=0 and freq=mo 99 #----------------------------------------------------------- 100 nudging="-nudging" 81 # ="-nudging" for enabled, else "" 101 82 nudging="" 102 83 #If using nudging, then check DEF/guide.def : … … 104 85 # - You may want to check/customize the nudging parameters 105 86 106 #-----------------------------------------------------------107 87 # Length of elementary simulations yr (year) or mo (month) 108 #----------------------------------------------------------- 109 freq=yr 88 freq="yr" 110 89 111 #-----------------------------------------------------------112 90 # Initial/final month for simulation 113 #-----------------------------------------------------------114 91 # If $init=1, the INIT file will be called start.200001.nc, 115 92 # but the data correspond in fact to another day. … … 121 98 # Output files, frequencies, levels 122 99 # 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_* 100 # A few versions are available as DEF/config.def_*; config.def is a copy of config.def_default 124 101 # See phys_out_filekeys, phys_out_filelevels, phys_out_filetimesteps, and supplementary variables 125 102 # If you use XIOS (option xios="-xios"), check/modify DEF/XMLfiles*/file*xml … … 128 105 # Grid characteristics (regular, zoomed) 129 106 # You may want to choose and customize DEF/gcm.def 130 # A few versions are available as DEF/gcm.def_* 107 # A few versions are available as DEF/gcm.def_*; 131 108 # The default, for regular grid 144x142x79, corresponds to _iperiod7 132 109 # (Expert : TEMPORARILY : setup.sh forces use of gcm.def_zNAfrica_BiJe for aerosols=spla) … … 140 117 # NOTE : automatically choosing DEF/PHYS/physiq.def_NPiso for isotopes 141 118 physics="NPv6.3" 142 if [ $lmd_phys = "lmdiso" ] ; then physics="NPiso"; fi119 if [[ $lmd_phys = "lmdiso" ]]; then physics="NPiso"; fi 143 120 144 for phys in $physics ; do 145 deffile=DEF/PHYS/physiq.def_${phys} 146 if [ -f $deffile ] ; then 121 if [[ $(echo "$physics" |wc -w) -gt 1 && $init = 1 ]]; then echo "!=!=! TO LOOP OVER MULTIPLE physics [$physics], YOU NEED init =/= 1 AND start* + limit* files ALREADY AVAILABLE IN THIS FOLDER !=!=!"; exit 1; fi 122 123 for phys in $physics; do 124 deffile="DEF/PHYS/physiq.def_$phys" 125 if [[ -f $deffile ]]; then 147 126 cp -p $deffile DEF/physiq.def 148 127 149 128 # name of simulation : can be changed to user's convenience 150 # (Default : name=$phys to loop on different physics)151 name= ${phys}129 # (Default: name=$phys to loop on different physics) 130 name="$phys" 152 131 153 132 # 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 133 # Remember: some other options are only available in lmdz_env.sh and setup.sh. 134 # TODO clarifier la diff entre $phys et $lmd_phys ? 135 ./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" 136 else 137 echo "File $deffile inexistent"; exit 1 138 fi 164 139 done 165 140 -
BOL/LMDZ_Setup_amaury/setup.sh
r4796 r4935 1 1 #!/bin/bash 2 3 #set -vx 4 5 ##################################################################### 6 # This script sets up and launches a (series of) simulation(s). 7 # 2 # This script sets up and launches a (series of) simulation(s). 8 3 # RECOMMENDATION: use main.sh to drive it (do not run it directly) 9 # 10 ##################################################################### 11 # 4 5 set -eu 6 12 7 # EXPERT-LEVEL CHOICES, only available in setup.sh, not in main.sh : 13 ##################################################################### 14 15 #NOTE : $optim is part of $LMDZname (see definition of LMDZname below), 16 # so that running with "-debug" needs to (re)install the model (install=-install in main.sh) 17 # If you have already installed the model, and only want to recompile the gcm in debug mode, 18 # add "-debug" to the compilation options in the compile.sh script created in the present folder, and run it (./compile.sh gcm) 19 # ALTERNATIVELY : you can remove $optim in the definition of "LMDZname" below 20 optim="" 21 #optim="-debug" 22 23 #NOTE : "testmode=y" is for running in test mode : 24 # the simulation job "tmp_$SIM" (created on $SCRATCHDIR) is automatically changed for a short run, 25 # and submitted to the Jean-Zay "test" queue : 26 # a/ time=00:10:00 (run time limit = 10 min ; for test queue, it must be 30 min maximum) 27 # b/ nday=1 (this line, forcing nday to 1 day, is "hidden" in script_SIMU, by default it is commented out) 28 # c/ #SBATCH --qos=qos_cpu-dev (this line is in script_SIMU, by default it is commented out) 29 #If you want to change "time", or "nday", but still run in "test" mode, modify the "if [ $debug = 1 ]...; fi" further below. 30 testmode=n 31 32 # --->>> Radiative code : run with "oldrad" or "rrtm" or "ecrad" (default : rrtm) 33 # NOTE : For LMDZ rev before 4185 included, if you change this choice and you want to recompile, 34 # modify compile.sh and run it in the present folder ($local) : ./compile.sh gcm 35 # with the appropriate compiling option (see $opt_rrtm below) 36 rad=rrtm 37 38 # --->>> AEROSOLS : n (=no) / clim (=average 1995-2014) / spla (interactive dust and sea salt) 39 # (ATTENTION : if you first run the scripts with aerosols=n, then you want to change to =clim , 40 # you'll need to remove the INIT and LIMIT folders that have been created, then run main.sh with init=1 41 # in order to re-run the initialisation job, which downloads the aerosol files and interpolates them) 42 aerosols=clim 43 44 # --->>> SURFACE/VEGETATION SCHEME (as in install_lmdz.sh ; LF) 45 # It is controlled by the single variable "veget" which can have the following values 46 # - NONE: bucket scheme (default) 47 # - CMIP6: orchidee version used in CMIP exercise, rev 5661 48 # - number: orchidee version number : only rev 7983 on branch _2_2, and 7994 on trunk, are available 49 # !!! ATTENTION : both ORCHIDEE branch 2_2 and recent TRUNK REQUIRE XIOS !!!! 50 veget=CMIP6 51 #AS : If you have installed the model with a given "veget" option, and you want to change it : 52 # --> RECOMMENDED : re-install the model from scratch, using main.sh with "-install" option in it 53 # (even better : start in a new TEST_PROD folder) 54 # --> EXPERT : If you want to keep your previous installation, and not go through the install_lmdz.sh routine, 55 # you will need to (a) install the proper version of ORCHIDEE in the modipsl/modeles directory, and 56 # (b) set the "veget" options (opt_veget, orchidee_rev, suforch) to their proper values 57 # in the file $LMDZD/modipsl/modeles/surface_env 58 # (NB : no need to initialise these vars here: 59 # surface_env is either (re)created when (re)installing the model (run with install=-install), 60 # or it already exists (install=""). 61 62 # --->>> New snow scheme INLANDSIS (y/n) 63 # (this flag activates INLANDSIS compilation ; 64 # not yet done : treatment of specific restart and def file) 65 inlandsis=n 66 67 ## --->>> Isotopes : compile and run with/without (y/n) : is now dependent on phylmd (=lmd_phys from main.sh), see below 68 ##isotopes=n 69 70 # --->>> COMPILATION options : fcm, debug 71 fcm=-nofcm 72 fcm="" 73 74 # --->>> ALSO PAY ATTENTION TO OUTPUT files, frequency, level ------------- 75 # With IOIPSL : Choose your config.def among the versions available in DEF, 76 # copy it as config.def (the copy is done automatically for "iso"), 77 # edit it and set up output files, frequencies and levels. 78 # NB : For aerosols=spla, output level minimum 4 is required to output the specific variables. 79 # For aerosols=n, the corresponding flags will automatically be set to "n". 80 # With XIOS : adjust DEF/XMLfiles*/file*xml 81 # 82 #### END EXPERT-LEVEL CHOICES ######################################### 83 84 # Set up the appropriate environment 85 #------------------------------------ 86 sed -i -e 's/hostname=.*.$/hostname='`hostname`'/' lmdz_env.sh 87 . lmdz_env.sh 88 module list 89 90 # Pour les post-traitements 91 sed -i'' -e 's/groupe@cpu/'$groupe'@cpu/' seasonal.sh 92 local=`pwd` 93 94 ############################################################## 95 96 # A function to fetch files either locally or on the internet 97 function myget { #1st and only argument should be file name 98 # Path on local computer where to look for the datafile 99 if [ -f /u/lmdz/WWW/LMDZ/pub/$1 ] ; then 100 \cp -f -p /u/lmdz/WWW/LMDZ/pub/$1 . 101 elif [ -f ~/LMDZ/pub/$1 ] ; then 102 \cp -f -p ~/LMDZ/pub/$1 . 103 else 104 wget -nv https://lmdz.lmd.jussieu.fr/pub/$1 105 #dir=~/LMDZ/pub/`dirname $1` ; mkdir -p $dir ; cp -r `basename $1` $dir 106 fi 8 #################################################################### 9 function define_expert_options { 10 #NOTE : $optim is part of $LMDZname (see definition of LMDZname below), 11 # so that running with "-debug" needs to (re)install the model (install=-install in main.sh) 12 # If you have already installed the model, and only want to recompile the gcm in debug mode, 13 # add "-debug" to the compilation options in the compile.sh script created in the present folder, and run it (./compile.sh gcm) 14 # ALTERNATIVELY : you can remove $optim in the definition of "LMDZname" below 15 optim="" 16 #optim="-debug" 17 # TODO Amaury: quelle diff avec l'option fcm="debug" ??? 18 19 #NOTE : "testmode=y" is for running in test mode : 20 # the simulation job "tmp_$SIM" (created on $SCRATCHDIR) is automatically changed for a short run, 21 # and submitted to the Jean-Zay "test" queue : 22 # a/ time=00:10:00 (run time limit = 10 min; for test queue, it must be 30 min maximum) 23 # b/ nday=1 (this line, forcing nday to 1 day, is "hidden" in script_SIMU, by default it is commented out) 24 # c/ #SBATCH --qos=qos_cpu-dev (this line is in script_SIMU, by default it is commented out) 25 #If you want to change "time", or "nday", but still run in "test" mode, modify the "if [ $debug = 1 ]...; fi" further below. 26 testmode=n 27 28 # Radiative code : "oldrad" or "rrtm" or "ecrad" 29 rad="rrtm" 30 31 # AEROSOLS : n (=no) / clim (=average 1995-2014) / spla (interactive dust and sea salt) 32 # (WARNING : if you first run the scripts with aerosols=n, then you want to change to =clim , 33 # you'll need to remove the INIT and LIMIT folders that have been created, then run main.sh with init=1 34 # in order to re-run the initialisation job, which downloads the aerosol files and interpolates them) 35 aerosols="clim" 36 37 # SURFACE/VEGETATION SCHEME 38 # It is controlled by the single variable "veget" which can have the following values 39 # - "none": bucket scheme 40 # - "CMIP6" or "orch2.0": orchidee version used in CMIP exercise, rev 5661 41 # - "orch2.2": orchidee version used in IPSLCM7 configuration 42 # - number: orchidee version number : only rev 7983 on branch _2_2, and 7994 on trunk, are available 43 veget="CMIP6" 44 #AS : If you have installed the model with a given "veget" option, and you want to change it : 45 # --> RECOMMENDED : re-install the model from scratch in a new TEST_PROD folder 46 # TODO Amaury: check w/ Adriana what the use case is for lmdz_setup here 47 # --> EXPERT : If you want to keep your previous installation, and not go through the install_lmdz.sh routine, 48 # you will need to (a) install the proper version of ORCHIDEE in the modipsl/modeles directory, and 49 # (b) set the "veget" options (opt_veget, orchidee_rev, suforch) to their proper values 50 # in the file $LMDZD/modipsl/modeles/surface_env 51 # (NB : no need to initialise these vars here: 52 # surface_env is either (re)created when (re)installing the model (run with install=-install), 53 # or it already exists (install=""). 54 55 # New snow scheme INLANDSIS (y/n) 56 # (this flag activates INLANDSIS compilation; 57 # not yet done : treatment of specific restart and def file) 58 inlandsis="n" 59 60 # COMPILATION options : "", "fcm", "debug" 61 fcm="" 62 63 # --->>> ALSO PAY ATTENTION TO OUTPUT files, frequency, level ------------- 64 # With IOIPSL : Choose your config.def among the versions available in DEF, 65 # copy it as config.def (the copy is done automatically for "iso"), 66 # edit it and set up output files, frequencies and levels. 67 # NB : For aerosols=spla, output level minimum 4 is required to output the specific variables. 68 # For aerosols=n, the corresponding flags will automatically be set to "n". 69 # With XIOS : adjust DEF/XMLfiles*/file*xml 107 70 } 108 71 109 ############################################################## 110 # Choices : name, nudging, calendar ... 111 ############################################################## 112 SIM=`basename \`pwd\``CTL 113 phylmd=lmd #option -p $phylmd for makelmdz 114 115 # COSP 116 cosp=n 117 118 #XIOS 119 xios=n 120 121 # Nudging : 122 ok_guide=n 123 # With nudging, use real calendar (climato=0) and monthly integrations 124 climato=1 125 freq=mo # frequence mensuelle mo ou annuelle yr 126 127 # NB : the run stops in the BEGINNING of mthend (test "next=stopsim") 128 mthini=200001 129 mthend=200501 130 resol=144x142x79 131 132 version=20230412.trunk 133 svn="" 134 135 install=0 136 init=1 137 138 LIMIT=LIMIT 139 140 141 ############################################################## 142 # options 143 ############################################################## 144 145 while (($# > 0)) 146 do 147 case $1 in 148 "-h") cat <<........fin 149 setup.sh can be launched/driven by main.sh; some options can only be specified in setup.sh (ex: veget, aerosols). 150 setup.sh [-v version] [-r svn_release] [-init INIT] [-d 96x95x79] [-f mo] [-nudging] 151 "version" like 20150828.trunk ; see https://lmdz.lmd.jussieu.fr/Distrib/LISMOI.trunk 152 "svn_release" either the svn release number or "last" 153 -d IMxJMxLM to run in resolution IM x JM x LM 154 -install pour installer et compiler le modele 155 -f mo/yr pour tourner en mensuel ou annuel 156 "INIT" 1: creates INIT and LIMIT 157 0: reads from INIT and LIMIT 158 SIMU: reads from preexisting simulation SIMU and LIMIT 159 -nudging to run with nudging. Nudging files must be created independently 160 Other options available (see "options" section in the script) 72 # /!\ DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU ARE DOING /!\ 73 74 function load_install_lib { 75 # Fetch and source install_lmdz.sh 76 if [[ ! -f "lib_install_lmdz.sh" ]]; then 77 wget "http://svn.lmd.jussieu.fr/LMDZ/BOL/script_install_amaury/install_lmdz.sh" # TODO change to normal branch once ready 78 mv install_lmdz.sh lib_install_lmdz.sh # rename to avoid misleading users as to which script to run 79 sed -i'' "2i# This is a library used in the installation, DO NOT RUN IT YOURSELF unless you're an expert !" lib_install_lmdz.sh 80 fi 81 source lib_install_lmdz.sh 82 } 83 load_install_lib # Do not move later, as it would overwrite some functions 84 85 function set_default_params { 86 # Default value of script parameters 87 SIM=$(basename "$local")CTL # name 88 phylmd="lmd" #option -p $phylmd for makelmdz 89 90 cosp="n" # COSP 91 xios="n" #XIOS 92 93 # Nudging : 94 ok_guide="n" 95 # With nudging, use real calendar (climato=0) and monthly integrations 96 climato=1 97 freq="mo" # frequence mensuelle mo ou annuelle yr 98 99 # NB : the run stops in the BEGINNING of mthend (test "next=stopsim") 100 mthini=200001 101 mthend=200501 102 resol="144x142x79" 103 104 version="20230412.trunk" 105 svn="" 106 107 install=0 108 init=1 109 110 LIMIT="LIMIT" 111 } 112 113 function read_cmdline_args { 114 while (($# > 0)); do 115 case $1 in 116 "-h") cat <<........fin 117 setup.sh can be launched/driven by main.sh; some options can only be specified in setup.sh (ex: veget, aerosols). 118 setup.sh [-v version] [-r svn_release] [-init INIT] [-d 96x95x79] [-f mo] [-nudging] 119 "version" like 20150828.trunk; see https://lmdz.lmd.jussieu.fr/Distrib/LISMOI.trunk (default <$version>) 120 "svn_release" either the svn release number or "last" (default <$svn>) 121 -d IMxJMxLM to run in resolution IM x JM x LM (default <$resol>) 122 -install pour installer et compiler le modele 123 -f mo/yr pour tourner en mensuel ou annuel (default <$freq>) 124 "INIT" 1: creates INIT and LIMIT 125 0: reads from INIT and LIMIT 126 SIMU: reads from preexisting simulation SIMU and LIMIT (default <$init>) 127 -nudging to run with nudging. Nudging files must be created independently 128 -p the physics to use (default <$phylmd>) 129 -name install folder name (default <$SIM>) 130 Other options available (see "options" section in the script) 161 131 ........fin 162 exit ;; 163 "-v") version="$2" ; shift ; shift ;; 164 "-r") svn=$2 ; shift ; shift ;; 165 "-d") resol=$2 ; shift ; shift ;; 166 "-f") freq=$2 ; shift ; shift ;; 167 "-p") phylmd=$2 ; shift ; shift ;; 168 "-install") install=1 ; shift ;; 169 "-name") SIM=$2 ; shift ; shift ;; 170 "-cosp") cosp=y ; shift ;; 171 "-xios") xios=y ; shift ;; 172 "-init") init=$2 ; shift ; shift ;; 173 "-nudging") ok_guide=y ; shift ;; 174 "-climato") climato=$2 ; shift ; shift ;; 175 "-mthini") mthini=$2 ; shift ; shift ;; 176 "-mthend") mthend=$2 ; shift ; shift ;; 177 *) $0 -h ; exit 178 esac 179 done 180 181 # --->>> Isotopes : ompile and run with isotopes if lmdz_phys="lmdiso" in main.sh 182 if [ $phylmd = "lmdiso" ] ; then isotopes=y ; else isotopes=n ; fi 183 184 # Three options for initialisation 185 # 1: Create INIT 186 # 0: Take from INIT 187 # DIR : Take from DIR 188 if [ $init = 1 -o $init = 0 ] ; then 189 INIT=INIT 190 else 191 INIT=$init 192 fi 193 194 yearini=`echo $mthini | cut -c-4` 195 if [ $freq = yr ] ; then stopsim=`echo $mthend | cut -c-4` ; else stopsim=$mthend ; fi 196 197 if [ "$svn" = "" ] ; then svnopt="" ; else svnopt="-r $svn" ; fi 198 199 if [ -d $SIM ] ; then 200 echo La simulation $SIM existe deja 201 echo Il est preferable d arreter et de verifier. 202 echo Si vous etes sur de vous, vous pouvez la prolonger 203 echo Voulez vous la prolonger '? (y/o)' 204 read ans 205 if [ $ans != y -a $ans != o ] ; then 206 exit 207 fi 208 fi 209 210 # AVOID COMBINATIONS OF OPTIONS THAT DON'T WORK in user choices 211 #------------------------------------------------------- 212 213 if [ $ok_guide = y -a $climato = 1 ] ; then 214 echo "================================================================" 215 echo Running nudged simulations with climatological SSTs 216 echo is not planned. Change climato to 0 or modify the setup \(experts\) 217 echo "================================================================" 218 exit 219 fi 220 221 if [ $climato = 0 -a $freq = yr ] ; then 222 echo "================================================================" 223 echo running simulations with interannual SSTs is possible only 224 echo month by month and a true calendar. 225 echo Change climato to 1 or freq to mo or modify setup.sh \(experts\) 226 echo "================================================================" 227 exit 228 fi 229 230 # STOP if trying to use ORCHIDEE_2_2 or ORCHIDEE trunk post-CMIP6 without XIOS : 231 if [ $veget != "NONE" -a $veget != "CMIP6" -a $xios = "n" ] ; then echo "STOP : For this ORCHIDEE rev you need XIOS : change "xios" option in main.sh" ; exit ; fi 232 233 # STOP if trying to use both ORCHIDEE and Isotopes : 234 if [ $isotopes = "y" -a $veget != "NONE" ] ; then echo "STOP : You cannot run LMDZ with ORCHIDEE and ISOtopes at the same time ; either change "veget" option to NONE, or isotopes to "n" in setup.sh" ; exit ; fi 235 236 # STOP if trying to use both SPLA and Isotopes : 237 if [ $isotopes = "y" -a $aerosols = "spla" ] ; then echo "STOP : You cannot run LMDZ with Isotopes and aerosols=spla at the same time ; change "aerosols" option to "n" or "clim" in setup.sh " ; exit ; fi 238 239 # (Temporary) STOP if trying to use Isotopes with XIOS : 240 if [ $isotopes = "y" -a $xios = "y" ] ; then echo "STOP : Isotopes cannont yet be run with XIOS ; change xios option in main.sh" ; exit ; fi 241 242 # (Temporary) Constraints for aerosols=spla : 243 # --> resolution 128x88x79 and rad=rrtm 244 if [ $aerosols = spla -a $resol != 128x88x79 ] ; then 245 echo 'For now, aerosols=spla requiers resol=128x88x79, and uses the zoomed grid from gcm.def_zNAfrica_BiJe, for which forcing & initial files are available' 246 echo Actual aerosols and resol is $aerosols, $resol 247 exit 248 fi 249 if [ ${aerosols} = "spla" -a ${rad} != "rrtm" ] ; then echo "STOP : For the time being, aerosols=spla requires rad=rrtm" ; exit ; fi 250 251 252 # INSTALLATION OPTIONS depending on the user choices 253 #------------------------------------------------------- 254 255 if [ $cosp = y ] ; then ins_cosp="-cosp v1" ; else ins_cosp="" ; fi 256 257 if [ $xios = y ] ; then ins_xios="-xios" ; else ins_xios="" ; fi 132 exit;; 133 "-v") version="$2"; shift; shift;; 134 "-r") svn=$2; shift; shift;; 135 "-d") resol=$2; shift; shift;; 136 "-f") freq=$2; shift; shift;; 137 "-p") phylmd=$2; shift; shift;; 138 "-install") install=1; shift;; 139 "-name") SIM=$2; shift; shift;; 140 "-cosp") cosp=y; shift;; 141 "-xios") xios=y; shift;; 142 "-init") init=$2; shift; shift;; 143 "-nudging") ok_guide=y; shift;; 144 "-climato") climato=$2; shift; shift;; 145 "-mthini") mthini=$2; shift; shift;; 146 "-mthend") mthend=$2; shift; shift;; 147 *) $0 -h; exit 148 esac 149 done 150 151 # Isotopes : Compile and run with isotopes if lmdz_phys="lmdiso" in main.sh 152 if [[ $phylmd = "lmdiso" ]]; then isotopes="y"; else isotopes="n"; fi 153 154 # Initialisation 155 if [[ $init = 1 || $init = 0 ]]; then 156 INIT="INIT" 157 else 158 INIT=$init 159 fi 160 161 yearini=$(echo "$mthini" | cut -c-4) 162 if [[ $freq = yr ]]; then stopsim=$(echo "$mthend" | cut -c-4); else stopsim=$mthend; fi 163 164 if [[ $svn = "" ]]; then svnopt=""; else svnopt="-r $svn"; fi 165 166 if [[ -d $SIM ]]; then 167 echo "La simulation $SIM existe deja. Il est conseillé d'arrêter et de vérifier." 168 echo "Si vous êtes sûr de vous, vous pouvez la prolonger. Voulez vous la prolonger ? (y/n)" 169 read -r ans 170 if [[ $ans != y ]]; then exit 1; fi 171 fi 172 173 if [[ $cosp = y ]]; then ins_cosp="-cosp v1"; else ins_cosp=""; fi 174 175 if [[ $xios = y ]]; then ins_xios="-xios"; else ins_xios=""; fi 176 } 177 178 function ensure_correct_option_combinations { 179 # AVOID COMBINATIONS OF OPTIONS THAT DON'T WORK in user choices 180 181 if [[ $ok_guide = y && $climato = 1 ]]; then 182 echo "Running nudged simulations with climatological SSTs is not planned. Change <climato> to <0> or modify the setup (experts)"; exit 1 183 fi 184 185 if [[ $climato = 0 && $freq = yr ]]; then 186 echo "Running simulations with interannual SSTs is possible only month by month and a true calendar." 187 echo "Change <climato> to <1> or <freq> to <mo> or modify setup.sh (experts)"; exit 1 188 fi 189 190 # STOP if trying to use both ORCHIDEE and Isotopes : 191 if [[ $isotopes = "y" && $veget != "NONE" ]]; then 192 echo "STOP: You cannot run LMDZ with ORCHIDEE and ISOtopes at the same time; either change <veget> option to NONE, or isotopes to <n> in setup.sh"; exit 1 193 fi 194 195 # STOP if trying to use both SPLA and Isotopes : 196 if [[ $isotopes = "y" && $aerosols = "spla" ]]; then 197 echo "STOP: You cannot run LMDZ with Isotopes and aerosols=spla at the same time; change <aerosols> option to <n> or <clim> in setup.sh"; exit 1 198 fi 199 200 # (Temporary) STOP if trying to use Isotopes with XIOS : 201 # TODO Amaury: check if still relevant 202 if [[ $isotopes = "y" && $xios = "y" ]]; then 203 echo "STOP: Isotopes cannont yet be run with XIOS; change <xios> option in main.sh"; exit 1 204 fi 205 206 # (Temporary) Constraints for aerosols=spla : 207 # --> resolution 128x88x79 and rad=rrtm 208 if [[ $aerosols = spla && $resol != 128x88x79 ]]; then 209 echo 'For now, <aerosols=spla> requires <resol=128x88x79>, and uses the zoomed grid from gcm.def_zNAfrica_BiJe, for which forcing & initial files are available' 210 echo "Right now aerosols=<$aerosols>, resol=<$resol>" 211 exit 1 212 fi 213 214 if [[ $aerosols = "spla" && $rad != "rrtm" ]]; then 215 echo "STOP: For the time being, <aerosols=spla> requires <rad=rrtm>"; exit 1 216 fi 217 } 218 219 # TODO Amaury: commented-out for now 220 ## Set up the appropriate environment 221 ##------------------------------------ 222 #sed -i -e "s/hostname=.*.$/hostname=$(hostname)/" lmdz_env.sh 223 #. lmdz_env.sh 224 #module list 225 226 # TODO Amaury: commented-out for now 227 ## Pour les post-traitements 228 #sed -i'' -e "s/groupe@cpu/$groupe@cpu/" seasonal.sh # TODO Amaury: $groupe jamais défini, à virer ? 229 local=$(pwd) 230 231 define_expert_options 232 set_default_params 233 read_cmdline_args "$@" 234 ensure_correct_option_combinations 235 236 exit 1 237 238 239 240 241 242 258 243 259 244 ######################################################################## … … 261 246 ######################################################################## 262 247 263 if [ ! -d $LMDZD ] ; then mkdir -p $LMDZD; fi248 if [ ! -d $LMDZD ]; then mkdir -p $LMDZD; fi 264 249 version_name=LMDZ`echo $version | sed -e 's/-v//g' -e 's/-unstable//' -e 's/-r/r/' -e 's/ //g'` 265 250 LMDZname=${version_name}${svn}${optim}OR${veget}${ins_xios} 266 251 MODEL=$LMDZD/$LMDZname/modipsl/modeles/LMDZ 267 252 268 if [ $install = 1 ] 269 if [ -d $MODEL ] 253 if [ $install = 1 ]; then 254 if [ -d $MODEL ]; then 270 255 echo $MODEL 271 256 echo "Vous essayez d installer une version deja presente" … … 283 268 ./install_lmdz.sh $fcm $optim -v $version $svnopt -d $resol -rad $rad -bench 0 -parallel mpi_omp $ins_cosp $ins_xios -name $LMDZname -env_file $local/lmdz_env.sh -veget $veget 284 269 mv install_lmdz.sh install_lmdz.$$ 285 if grep "Not Found" $LMDZname/get.log >/dev/null ; then echo "version=$version is NOT A TESTING VERSION, Ask LMDZ Team" ; exit; fi270 if grep "Not Found" $LMDZname/get.log >/dev/null; then echo "version=$version is NOT A TESTING VERSION, Ask LMDZ Team"; exit; fi 286 271 cd $local 287 272 fi 288 273 else 289 if [ ! -d $MODEL ] 274 if [ ! -d $MODEL ]; then 290 275 echo Le model $MODEL n est pas installe 291 276 echo relancer avec install=1 si vous voulez l installer automatiquement … … 299 284 # for which the test was introduced 300 285 mysvn=`svnversion $MODEL | egrep -o "[0-9]+" 2>/dev/null` 301 if [ "$mysvn" = "" ] ; then mysvn=`grep 'Revision: [0-9]' $LMDZD/$LMDZname/Read*.md | awk ' { print $2 } ' 2>/dev/null`; fi302 if [ "$mysvn" = "" ] ; then mysvn=4190; fi286 if [ "$mysvn" = "" ]; then mysvn=`grep 'Revision: [0-9]' $LMDZD/$LMDZname/Read*.md | awk ' { print $2 } ' 2>/dev/null`; fi 287 if [ "$mysvn" = "" ]; then mysvn=4190; fi 303 288 echo mysvn $mysvn 304 289 … … 306 291 # lmdz_env.sh must be sourced again, and copied again as $MODEL/arch/arch-X64_JEANZAY.env 307 292 # (first copy is done by install_lmdz.sh launched with option "-env lmdz_env.sh" ) 308 if [ ${hostname:0:5} = "jean-" -a $mysvn -ge 4532 -a ! "`grep netcdf95 lmdz_env.sh`" ] 293 if [ ${hostname:0:5} = "jean-" -a $mysvn -ge 4532 -a ! "`grep netcdf95 lmdz_env.sh`" ]; then 309 294 cp -p lmdz_env.sh lmdz_env.orig 310 295 sed -i'' -e 's/module load nco/module load netcdf95\n module load nco/' lmdz_env.sh … … 315 300 # COMPILATION OPTIONS depending on the user choices and LMDZ revision number $mysvn 316 301 #------------------------------------------------------- 317 if [ "$ARCH" = "" ] ; then arch= ; else arch="-arch $ARCH"; fi318 319 if [ $cosp = y ] ; then opt_cosp="-cosp true" ; else opt_cosp=""; fi302 if [ "$ARCH" = "" ]; then arch=; else arch="-arch $ARCH"; fi 303 304 if [ $cosp = y ]; then opt_cosp="-cosp true"; else opt_cosp=""; fi 320 305 # makelmdz* uses "opt_cosp", and for v1 (default) needs "-cosp true/false" 321 306 # When cosp v2 will be validated, we'll have opt_cosp=ins_cosp="-cosp v2" 322 # (option cosp2 in makelmdz* to be ignored 323 324 if [ $xios = y ] ; then opt_xios="-io xios" ; else opt_xios=""; fi307 # (option cosp2 in makelmdz* to be ignored; it is a transitory version from v1 to v2) 308 309 if [ $xios = y ]; then opt_xios="-io xios"; else opt_xios=""; fi 325 310 326 311 case $rad in 327 oldrad) iflag_rrtm=0 ; NSW=2 ; opt_rad="";;328 rrtm) iflag_rrtm=1 ; NSW=6 ; if [ $mysvn -le 4185 ] ; then opt_rad="-rrtm true" ; else opt_rad="-rad rrtm" ; fi;;329 ecrad) iflag_rrtm=2 ; NSW=6 ; opt_rad="-rad ecrad";;330 *) echo Only oldrad rrtm ecrad for rad option 312 oldrad) iflag_rrtm=0; NSW=2; opt_rad="";; 313 rrtm) iflag_rrtm=1; NSW=6; if [ $mysvn -le 4185 ]; then opt_rad="-rrtm true"; else opt_rad="-rad rrtm"; fi;; 314 ecrad) iflag_rrtm=2; NSW=6; opt_rad="-rad ecrad";; 315 *) echo Only oldrad rrtm ecrad for rad option; exit 331 316 esac 332 if [ "$rad" = "ecrad" -a ! -d ecrad_data ] 333 cd $local ; wget https://lmdz.lmd.jussieu.fr/pub/3DInputData/ecrad/ecrad_data.tar ; tar xvf ecrad_data.tar; cd -334 fi 335 if [ "$rad" = "ecrad" -a "$aerosols" != "n" -a "$mysvn" -lt 4489 ] ; then echo Les aerosols tropospheriques ne sont pas pris en charge par ecrad avant LMDZ rev 4489, ici rev est $mysvn ; exit; fi317 if [ "$rad" = "ecrad" -a ! -d ecrad_data ]; then 318 cd $local; wget https://lmdz.lmd.jussieu.fr/pub/3DInputData/ecrad/ecrad_data.tar; tar xvf ecrad_data.tar; cd - 319 fi 320 if [ "$rad" = "ecrad" -a "$aerosols" != "n" -a "$mysvn" -lt 4489 ] ; then echo Les aerosols tropospheriques ne sont pas pris en charge par ecrad avant LMDZ rev 4489, ici rev est $mysvn; exit; fi 336 321 337 322 338 323 # Aerosols : also define the associated suffix in gcm name 339 if [ $aerosols = spla ] 340 opt_aer=' -dust true ' 324 if [ $aerosols = spla ]; then 325 opt_aer=' -dust true '; sufaer='_spla' 341 326 else 342 opt_aer="" 343 fi 344 345 if [ $inlandsis = y ] 327 opt_aer="" ; sufaer='' 328 fi 329 330 if [ $inlandsis = y ]; then 346 331 opt_inlandsis="-inlandsis true" 347 332 else … … 350 335 351 336 # Isotopes : also define the associated suffix in gcm name 352 if [ $isotopes = y ] 353 opt_isotopes="-isotopes true" 337 if [ $isotopes = y ]; then 338 opt_isotopes="-isotopes true"; sufiso="_iso" 354 339 else 355 opt_isotopes="" 340 opt_isotopes="" ; sufiso="" 356 341 fi 357 342 … … 381 366 # You'll need to modify and run the compile.sh script created in the present folder, and run it (./compile.sh gcm) 382 367 383 # compile_opt_iso is used for gcm only 384 if [ $isotopes = y ] 368 # compile_opt_iso is used for gcm only; ce0l cannot be compiled with isotopes yet (phylmd instead of phylmdiso is required) 369 if [ $isotopes = y ]; then 385 370 compile_opt_iso="$optim -p $phylmd $opt_cosp $opt_xios $opt_rad $arch -d $resol $opt_veget $opt_aer $opt_inlandsis $opt_isotopes -mem -parallel mpi_omp" 386 if [ $mysvn -le 4185 ] 371 if [ $mysvn -le 4185 ]; then 387 372 suffix_iso=_${resol}_phy${phylmd}_para_mem${suforch}${sufaer}${sufiso} 388 373 else … … 395 380 compile_opt="$optim -p $phylmd $opt_cosp $opt_xios $opt_rad $arch -d $resol $opt_veget $opt_aer $opt_inlandsis -mem -parallel mpi_omp" 396 381 397 if [ $mysvn -le 4185 ] ; then suffix=_${resol}_phy${phylmd}_para_mem${suforch}${sufaer};398 else suffix=_${resol}_phy${phylmd}_${rad}_para_mem${suforch}${sufaer} 382 if [ $mysvn -le 4185 ]; then suffix=_${resol}_phy${phylmd}_para_mem${suforch}${sufaer}; 383 else suffix=_${resol}_phy${phylmd}_${rad}_para_mem${suforch}${sufaer}; fi 399 384 400 385 # use an intermediate variable to use either suffix or suffix_iso … … 405 390 echo $gcm 406 391 407 if [ ! -f $gcm ] 392 if [ ! -f $gcm ]; then 408 393 echo Le model $gcm n existe pas 409 394 echo il va se compiler automatiquement sur $MODEL 410 395 sleep 10 411 396 412 if [ "$fcm" = "-nofcm" ] 413 compile="./makelmdz $compile_opt \$1 ; mkdir -p bin; \mv -f \${prog}.e $gcm"414 compile_iso="./makelmdz $compile_opt_iso \$1 ; mkdir -p bin; \mv -f \${prog}.e $gcm"397 if [ "$fcm" = "-nofcm" ]; then 398 compile="./makelmdz $compile_opt \$1; mkdir -p bin; \mv -f \${prog}.e $gcm" 399 compile_iso="./makelmdz $compile_opt_iso \$1; mkdir -p bin; \mv -f \${prog}.e $gcm" 415 400 else 416 401 # makelmdz_fcm directly produces executable named $gcm, depending on the compilation options … … 422 407 echo $compile${sufiso} 423 408 424 #create compile.sh 409 #create compile.sh; 425 410 # if isotopes = y , it will still be used for compiling ce0l 426 cat << ...eod>| compile.sh411 cat << ...eod >| compile.sh 427 412 cd $MODEL 428 413 prog=\$1 … … 434 419 435 420 #create compile_iso.sh for compiling gcm_ _iso.e 436 if [ $isotopes = y ] 437 cat << ...eod>| compile_iso.sh421 if [ $isotopes = y ]; then 422 cat << ...eod >| compile_iso.sh 438 423 cd $MODEL 439 424 prog=\$1 … … 448 433 ./compile${sufiso}.sh gcm > lmdz.log 2>&1 449 434 450 if [ ! -f $gcm ] ; then echo la compilation a echoue ; exit; fi435 if [ ! -f $gcm ]; then echo la compilation a echoue; exit; fi 451 436 cd $local 452 437 fi … … 463 448 (( mpi = ( $jm + 1 ) / 2 )) 464 449 omp=8 465 if [ $aerosols = spla ] ; then omp=1; fi466 if [ $veget = CMIP6 -a $xios = y ] ; then omp=2; fi467 if [ $mpi -gt $nb_mpi_max ] ; then mpi=$nb_mpi_max; fi468 if [ $omp -gt $nb_omp_max ] ; then omp=$nb_omp_max; fi450 if [ $aerosols = spla ]; then omp=1; fi 451 if [ $veget = CMIP6 -a $xios = y ]; then omp=2; fi 452 if [ $mpi -gt $nb_mpi_max ]; then mpi=$nb_mpi_max; fi 453 if [ $omp -gt $nb_omp_max ]; then omp=$nb_omp_max; fi 469 454 470 455 ###################################################################### 471 456 # Utilisation des .def_iso pour LMDZ-ISOtopes 472 457 ###################################################################### 473 if [ $isotopes = y ] 458 if [ $isotopes = y ]; then 474 459 for file_iso in $( ls DEF | grep _iso) 475 460 do … … 481 466 # Choix de la grille verticale 482 467 ###################################################################### 483 if [ ! -d DEF ] ; then echo Recuperer un repertoire DEF ; exit; fi468 if [ ! -d DEF ]; then echo Recuperer un repertoire DEF; exit; fi 484 469 lm=`echo $resol | cut -dx -f3` 485 if [ ! -f DEF/L$lm.def ] 470 if [ ! -f DEF/L$lm.def ]; then echo resolution verticale non prevue 486 471 echo creer un fichier DEF/L$lm.def 487 472 exit … … 496 481 497 482 # Choix du fichier traceur.def coherent avec l'option "aerosols" 498 # NOTE : Le nouveau tracer.def_nospla par defaut n'inclut pas Rn-Pb 483 # NOTE : Le nouveau tracer.def_nospla par defaut n'inclut pas Rn-Pb; 499 484 # si on les veut, il faut utiliser ci-dessous; a la place, tracer_RN_PB.def 500 485 #--------------------------------------------------------------------- 501 486 # NB: Si on change de traceur.def (entre spla et nospla), il faut refaire l'etape "initialisation" (ce0l)? 502 # Normalement les traceurs absents de start* files sont initialises=0 dans le code 503 if [ $aerosols = spla ] 487 # Normalement les traceurs absents de start* files sont initialises=0 dans le code; verifier pour spla ! 488 if [ $aerosols = spla ]; then 504 489 # ancien traceur pour l instant 505 490 cp DEF/traceur.def_spla DEF/traceur.def 506 elif [ $isotopes = n ] 491 elif [ $isotopes = n ]; then 507 492 # nouveau traceur 508 493 # déjà copié si 'y' … … 512 497 # TEMPORAIREMENT pour spla on force l'utilisation de gcm.def_zNAfrica_BiJe (avec resolution 128x88x79) 513 498 #---------------------------------------------------------------------- 514 if [ $aerosols = spla ] ; then cp DEF/gcm.def_zNAfrica_BiJe DEF/gcm.def; fi499 if [ $aerosols = spla ]; then cp DEF/gcm.def_zNAfrica_BiJe DEF/gcm.def; fi 515 500 516 501 # Inscription du choix ok_guide dans DEF/guide.def … … 522 507 # NB Contrairement a ce qui est ecrit dans les fichiers run.def standard, 523 508 # dans ce tutorial le choix earth_365d n'est pas disponible, et earth_366d s'appelle gregorian 524 if [ $climato = 0 ] ; then calend=gregorian ; else calend=earth_360d; fi509 if [ $climato = 0 ]; then calend=gregorian; else calend=earth_360d; fi 525 510 sed -i -e 's/calend=.*.$/calend='$calend'/' DEF/run.def 526 511 … … 528 513 # cf options veget, aerosols, cosp, xios 529 514 #--------------------------------------------------------------------- 530 if [ $veget = NONE ] ; then VEGET=n ; else VEGET=y; fi515 if [ $veget = NONE ]; then VEGET=n; else VEGET=y; fi 531 516 sed -i -e 's/VEGET=.*.$/VEGET='$VEGET'/' DEF/config.def 532 517 533 if [ $aerosols = n ] 518 if [ $aerosols = n ]; then 534 519 # set flag_aerosols=0 and flags ok_ade&co=n 535 520 sed -i'' -e 's/^ok_cdnc=.*.$/ok_cdnc=n/' -e 's/^ok_ade=.*.$/ok_ade=n/' -e 's/^ok_aie=.*.$/ok_aie=n/' -e 's/^ok_alw=.*.$/ok_alw=n/' -e 's/^flag_aerosol=.*.$/flag_aerosol=0/' DEF/config.def … … 538 523 # COSP : ok_cosp desactive COSP si on a compile avec; il ne l'active pas si on a compile sans 539 524 sed -i -e 's/ok_cosp.*.$/ok_cosp='$cosp'/' DEF/config.def 540 if [ $cosp = y ] ; then \cp -f $MODEL/DefLists/cosp*.txt $local/DEF/; fi525 if [ $cosp = y ]; then \cp -f $MODEL/DefLists/cosp*.txt $local/DEF/; fi 541 526 542 527 # Sorties LMDZ en fonction de l'option "xios" … … 550 535 sed -i'' -e 's:directory_name.*$:directory_name="'$local'/ecrad_data",:' DEF/namelist_ecrad 551 536 552 if [ $isotopes = y ] ; then iflag_ice_thermo=0 ; else iflag_ice_thermo=1; fi537 if [ $isotopes = y ]; then iflag_ice_thermo=0; else iflag_ice_thermo=1; fi 553 538 sed -i -e 's/iflag_ice_thermo=.*.$/iflag_ice_thermo='$iflag_ice_thermo'/' DEF/physiq.def 554 539 555 # Choix de orchidee.def en fonction de orchidee_rev 540 # Choix de orchidee.def en fonction de orchidee_rev; modification pour xios 556 541 # NOTE separate orchidee_pft.def file for ORCHIDEE trunk post-CMIP6 557 542 #--------------------------------------------------------------------- 558 543 orchidee_def=orchidee.def_6.1 559 544 orchidee_pft_def="" 560 if [ $veget = "7983" ] 545 if [ $veget = "7983" ]; then 561 546 orchidee_def=orchidee.def_6.2work 562 elif [ $veget = "7994" ] 547 elif [ $veget = "7994" ]; then 563 548 orchidee_def=orchidee.def_6.4work 564 549 orchidee_pft_def=orchidee_pft.def_6.4work 565 if [ ! grep "INCLUDEDEF=orchidee_pft.def" DEF/run.def ]; then566 sed -i'' -e 's/INCLUDEDEF=orchidee.def/INCLUDEDEF=orchidee.def\nINCLUDEDEF=orchidee_pft.def/' DEF/run.def 550 if ! grep "INCLUDEDEF=orchidee_pft.def" DEF/run.def; then 551 sed -i'' -e 's/INCLUDEDEF=orchidee.def/INCLUDEDEF=orchidee.def\nINCLUDEDEF=orchidee_pft.def/' DEF/run.def; fi 567 552 fi 568 553 \cp -f DEF/$orchidee_def DEF/orchidee.def 569 if [ "$orchidee_pft_def" != "" ] ; then \cp -f DEF/$orchidee_pft_def DEF/orchidee_pft.def; fi570 571 # Only for veget=CMIP6 it is still possible to use IOIPSL 554 if [ "$orchidee_pft_def" != "" ]; then \cp -f DEF/$orchidee_pft_def DEF/orchidee_pft.def; fi 555 556 # Only for veget=CMIP6 it is still possible to use IOIPSL; newer versions of orchidee.def have XIOS_ORCHIDEE_OK = y 572 557 sed -i'' -e 's/XIOS_ORCHIDEE_OK =.*.$/XIOS_ORCHIDEE_OK = '$xios'/' DEF/orchidee.def 573 558 … … 577 562 # (ils vont se repercuter dans les repertoires de simulation $local/$SIM et de run $WRK) 578 563 ###################################################################### 579 if [ $xios = y ] 564 if [ $xios = y ]; then 580 565 \cp -f $MODEL/DefLists/context_lmdz.xml $local/DEF/XMLfilesLMDZ/. 581 566 \cp -f $MODEL/DefLists/field_def_lmdz.xml $local/DEF/XMLfilesLMDZ/. 582 if [ $cosp = y ] ; then \cp -f $MODEL/DefLists/field_def_cosp1.xml $local/DEF/XMLfilesLMDZ/.; fi567 if [ $cosp = y ]; then \cp -f $MODEL/DefLists/field_def_cosp1.xml $local/DEF/XMLfilesLMDZ/.; fi 583 568 fi 584 569 … … 588 573 # pour sa creation 589 574 ###################################################################### 590 if [ ! -d $INIT ] 591 if [ $init = 0 ] 592 echo Recuperer les repertoires $INIT ou lancer avec option -init 575 if [ ! -d $INIT ]; then 576 if [ $init = 0 ]; then 577 echo Recuperer les repertoires $INIT ou lancer avec option -init; exit 593 578 else 594 579 ce0l=$MODEL/bin/ce0l${suffix}.e … … 596 581 597 582 # Test if $ce0l exists (it may be the case if you use a model configuration already installed and compiled) 598 if [ ! -f $ce0l ] 583 if [ ! -f $ce0l ]; then 599 584 echo L executable $ce0l n existe pas 600 585 echo il va se compiler automatiquement sur $MODEL … … 604 589 fi 605 590 606 if [ ! -f $ce0l ] ; then echo la compilation de $ce0l a echoue ; exit; fi591 if [ ! -f $ce0l ]; then echo la compilation de $ce0l a echoue; exit; fi 607 592 608 593 cd $local 609 594 fi 610 elif [ $init = 1 ] 595 elif [ $init = 1 ]; then 611 596 echo Vous essayez d initialiser le modele mais $INIT existe deja 612 597 exit … … 617 602 # EXIT after (install and) compilation if we are on jean-zay-pp instead of jean-zay ! 618 603 hostname=`hostname` 619 if [ ${hostname:0:11} = "jean-zay-pp" ] 604 if [ ${hostname:0:11} = "jean-zay-pp" ]; then 620 605 echo "You are on jean-zay-pp, here you only can install and compile the model, not run it" 621 606 echo "If you want to run a simulation, log in to jean-zay and launch main.sh again, without install" … … 638 623 ##################################################################### 639 624 640 if [ ! -d $local/$SIM ] 625 if [ ! -d $local/$SIM ]; then 641 626 mkdir $local/$SIM 642 627 cd $local 643 sed -e 's:^rebuild=.*.$:rebuild='$LMDZD/$LMDZname/modipsl/bin/rebuild':' -e 's/groupe@cpu/'$groupe'@cpu/' reb.sh >| $local/$SIM/reb.sh 628 sed -e 's:^rebuild=.*.$:rebuild='$LMDZD/$LMDZname/modipsl/bin/rebuild':' -e 's/groupe@cpu/'$groupe'@cpu/' reb.sh >| $local/$SIM/reb.sh; chmod +x $local/$SIM/reb.sh 644 629 cp lmdz_env.sh $local/$SIM/ 645 mkdir $local/$SIM/DEF 630 mkdir $local/$SIM/DEF; cp DEF/*def DEF/namelis* $local/$SIM/DEF/ 646 631 #Pour XIOS, respectivement COSP, copier aussi les fichiers *xml / *txt 647 if [ $cosp = y ] ; then cp DEF/cosp*txt $local/$SIM/DEF/; fi648 if [ $xios = y ] 632 if [ $cosp = y ]; then cp DEF/cosp*txt $local/$SIM/DEF/; fi 633 if [ $xios = y ]; then 649 634 cp DEF/XMLfilesLMDZ/*xml $local/$SIM/DEF/ 650 if [ $veget != 'NONE' ] ; then cp DEF/XMLfilesOR$veget/*xml $local/$SIM/DEF/; fi635 if [ $veget != 'NONE' ]; then cp DEF/XMLfilesOR$veget/*xml $local/$SIM/DEF/; fi 651 636 fi 652 637 chmod u+w $local/$SIM/DEF/* … … 657 642 DEF/run.def >| $local/$SIM/DEF/run.def 658 643 cd $SIM 659 if [ "$freq" = "yr" ] ; then date=$yearini ; else date=$mthini; fi644 if [ "$freq" = "yr" ]; then date=$yearini; else date=$mthini; fi 660 645 echo $date a faire >| etat 661 646 … … 663 648 ############################################################# 664 649 echo $date 665 for f in start startphy ; do inf=../$INIT/$f.$date.nc ; if [ -f $inf -o $init = 1 ] ; then ln -s $inf ./ ; else echo $inf inexistant ; exit ; fi; done666 for f in sechiba stomate ; do if [ -f ../$INIT/start_$f.$date.nc ] ; then ln -sf ../$INIT/start_$f.$date.nc . ; fi; done650 for f in start startphy; do inf=../$INIT/$f.$date.nc; if [ -f $inf -o $init = 1 ]; then ln -s $inf ./; else echo $inf inexistant; exit; fi; done 651 for f in sechiba stomate; do if [ -f ../$INIT/start_$f.$date.nc ]; then ln -sf ../$INIT/start_$f.$date.nc .; fi; done 667 652 cp $gcm gcm.e 668 653 fi # fin de " if [ ! -d $local/$SIM ]" … … 671 656 # Choix du "time limit" pour le job 672 657 ################################### 673 if [ "$freq" = "yr" ] ; then cput=04:00:00 ; else cput=01:00:00; fi658 if [ "$freq" = "yr" ]; then cput=04:00:00; else cput=01:00:00; fi 674 659 675 660 ##################################################################### … … 678 663 sed -e 's/stopsim=.*.$/stopsim='$stopsim'/' -e 's/^veget=.*.$/veget='$veget'/' -e 's/orchidee_rev=.*.$/orchidee_rev='$orchidee_rev'/' -e 's/^aerosols=.*.$/aerosols='$aerosols'/' -e 's/^isotopes=.*.$/isotopes='$isotopes'/' -e 's/NOM_SIMU/'$SIM'/' -e 's/time=.*.$/time='$cput'/' -e 's/MAINDIR=.*.$/MAINDIR='$MAINDIR'/' -e 's:STORED=.*.*:STORED='$STORED':' -e 's:SCRATCHD=.*.*:SCRATCHD='$SCRATCHD':' -e 's/ntasks=.*.$/ntasks='$mpi'/' -e 's/cpus-per-task=.*.$/cpus-per-task='$omp'/' -e 's/nthreads=.*./nthreads='$omp'/' -e 's/^climato=.*.$/climato='$climato'/' -e 's/^ok_guide=.*.$/ok_guide='$ok_guide'/' -e 's/groupe@cpu/'$groupe'@cpu/' $local/script_SIMU >| $WRK/tmp_$SIM 679 664 680 if [ "$testmode" = "y" ] 665 if [ "$testmode" = "y" ]; then 681 666 sed -i -e 's/time=.*.$/time=00:30:00/' -e 's/#nday=1/nday=1/' -e 's/#[[:space:]]#SBATCH[[:space:]]--qos=qos_cpu-dev/#SBATCH --qos=qos_cpu-dev/' $WRK/tmp_$SIM 682 667 fi 683 668 684 if [ $climato = 0 ] 669 if [ $climato = 0 ]; then 685 670 # calend est choisi plus haut dans "Changements dans les fichiers DEF/*def" et ecrit dans $MAINDIR/DEF/run.def 686 671 yrini=`echo $mthini | cut -c-4` 687 672 yrend=`echo $mthend | cut -c-4` 688 yrs="" ; yr=$yrini ; while [ $yr -le $yrend ] ; do yrs="$yrs $yr" ; (( yr = $yr + 1 )); done673 yrs=""; yr=$yrini; while [ $yr -le $yrend ]; do yrs="$yrs $yr"; (( yr = $yr + 1 )); done 689 674 suf=360x180_ 690 675 else … … 698 683 ##################################################################### 699 684 700 if [ ! -d $LMDZ_Init ] ; then mkdir $LMDZ_Init; fi685 if [ ! -d $LMDZ_Init ]; then mkdir $LMDZ_Init; fi 701 686 702 687 #------------------------------------------------------------------- … … 707 692 liste_get+="routing.nc routing_simple.nc lai2D.nc soils_param.nc " 708 693 liste_get+="woodharvest_2000.nc PFTmap_15PFT.v1_2000.nc" 709 for file in $liste_get 710 if [ ! -f $LMDZ_Init/$file ] ; then cd $LMDZ_Init ; ${get}$file ; cd -; fi694 for file in $liste_get; do 695 if [ ! -f $LMDZ_Init/$file ]; then cd $LMDZ_Init; ${get}$file; cd -; fi 711 696 done 712 697 # Additionnal files needed for ORCHIDEE trunk post-CMIP6 713 if [ $veget = 7994 -a ! -f $LMDZ_Init/soil_bulk_and_ph.nc ] 698 if [ $veget = 7994 -a ! -f $LMDZ_Init/soil_bulk_and_ph.nc ]; then 714 699 cd $LMDZ_Init 715 ${get}soil_bulk_and_ph.nc 716 tar -xvf NITROGEN_for_ORtrunk.tar 700 ${get}soil_bulk_and_ph.nc; ${get}NITROGEN_for_ORtrunk.tar 701 tar -xvf NITROGEN_for_ORtrunk.tar; cd - 717 702 fi 718 703 #------------------------------------------------------------------- 719 704 # Fichiers aerosols/chimie 720 705 #------------------------------------------------------------------- 721 if [ $aerosols = clim ] 706 if [ $aerosols = clim ]; then 722 707 get="myget 3DInputData/AerChem/" 723 708 #liste_get="aerosols1850_from_inca.nc aerosols2000_from_inca.nc" 724 709 #aerosols9999_from_inca.nc est un lien vers aerosols1995_2014_ensavg_from_inca.nc 725 710 liste_get="aerosols1850_from_inca.nc aerosols9999_from_inca.nc" 726 for file in $liste_get 727 if [ ! -f $LMDZ_Init/$file ] ; then cd $LMDZ_Init ; ${get}$file ; cd -; fi711 for file in $liste_get; do 712 if [ ! -f $LMDZ_Init/$file ]; then cd $LMDZ_Init; ${get}$file; cd -; fi 728 713 done 729 714 fi … … 736 721 # a regrider ensuite par un script interp_fichiers_spla.sh (comme pour aerosols="clim") 737 722 # Les fichiers (regrides, sauf SOILSPEC.data utilise tel quel) seront mis dans $MAINDIR/INPUT_SPLA (equivalent de INPUT_DUST) 738 if [ $aerosols = spla ] 739 if [ ! -d ${LMDZ_Init}/SPLA_Init ] ; then mkdir ${LMDZ_Init}/SPLA_Init ; mkdir $LMDZ_Init/SPLA_Init/INITIAL; fi723 if [ $aerosols = spla ]; then 724 if [ ! -d ${LMDZ_Init}/SPLA_Init ]; then mkdir ${LMDZ_Init}/SPLA_Init; mkdir $LMDZ_Init/SPLA_Init/INITIAL; fi 740 725 get="cp -p /gpfsstore/rech/gzi/rgzi027/ergon/BIBIAERO/INPUTS_DUST/INITIAL/" 741 726 liste_get="wth.dat cly.dat donnees_lisa.nc SOILSPEC.data \ … … 743 728 sulphur_emissions_nat.nc sulphur_emissions_volc.nc" 744 729 745 for file in $liste_get 746 if [ ! -f $LMDZ_Init/SPLA_Init/INITIAL/$file ] ; then cd $LMDZ_Init/SPLA_Init/INITIAL ; ${get}$file . ; cd -; fi730 for file in $liste_get; do 731 if [ ! -f $LMDZ_Init/SPLA_Init/INITIAL/$file ]; then cd $LMDZ_Init/SPLA_Init/INITIAL; ${get}$file .; cd -; fi 747 732 done 748 733 ### … … 754 739 #ICI pour l'instant je copie les fichiers de chez Binta (repositoire==http...) dans LMDZ_Init/SPLA_Init, avec test sur mois 01 755 740 756 if [ ! -d ${LMDZ_Init}/SPLA_Init/PERIOD0001 ] ; then cp -pr /gpfsstore/rech/gzi/rgzi027/ergon/BIBIAERO/INPUTS_DUST/PERIOD* $LMDZ_Init/SPLA_Init/.; fi741 if [ ! -d ${LMDZ_Init}/SPLA_Init/PERIOD0001 ]; then cp -pr /gpfsstore/rech/gzi/rgzi027/ergon/BIBIAERO/INPUTS_DUST/PERIOD* $LMDZ_Init/SPLA_Init/.; fi 757 742 758 743 #A la fin on doit avoir dans SPLA_Init les fichiers initiaux dans INITIAL plus les repertoires PERIOD00MM contenant dust.nc … … 767 752 get="myget 3DInputData/Init/" 768 753 liste_get="alb_bg_modisopt_2D_ESA_v2.nc reftemp.nc" 769 for file in $liste_get 770 if [ ! -f $LMDZ_Init/$file ] ; then cd $LMDZ_Init ; ${get}$file ; cd -; fi754 for file in $liste_get; do 755 if [ ! -f $LMDZ_Init/$file ]; then cd $LMDZ_Init; ${get}$file; cd -; fi 771 756 done 772 757 … … 775 760 776 761 777 if [ $init = 1 ] 762 if [ $init = 1 ]; then 778 763 ##################################################################### 779 764 echo Creation de l etat initial … … 782 767 # Creation du repertoire INIT et mise en place de liens logiques vers les starts 783 768 # en anticipation de leur création : 784 mkdir $local/$INIT 785 for an in $mthini $yearini ; do for f in start startphy ; do ln -s $f.nc $f.$an.nc ; done; done769 mkdir $local/$INIT; cd $local/$INIT 770 for an in $mthini $yearini; do for f in start startphy; do ln -s $f.nc $f.$an.nc; done; done 786 771 787 772 # Creation du repertoire INIT temporaire et rapatriement des fichiers necessaires 788 if [ -d $WRK/$INIT ] ; then mv $WRK/$INIT $WRK/$INIT$$; fi789 mkdir $WRK/$INIT 790 cd $WRK/$INIT ; cp DEF/*.def .; cp $local/lmdz_env.sh .791 if [ $xios = y ] 773 if [ -d $WRK/$INIT ]; then mv $WRK/$INIT $WRK/$INIT$$; fi 774 mkdir $WRK/$INIT; cp -r $local/DEF $WRK/$INIT/ 775 cd $WRK/$INIT; cp DEF/*.def .; cp $local/lmdz_env.sh . 776 if [ $xios = y ]; then 792 777 cp DEF/XMLfilesLMDZ/*xml . 793 if [ $veget != 'NONE' ] ; then cp DEF/XMLfilesOR$veget/*xml .; fi778 if [ $veget != 'NONE' ]; then cp DEF/XMLfilesOR$veget/*xml .; fi 794 779 fi 795 780 sed -e 's/anneeref=.*.$/anneeref='$yearini'/' DEF/run.def >| run.def … … 800 785 get="myget 3DInputData/Limit/" 801 786 liste_get="Albedo.nc Relief.nc Rugos.nc landiceref.nc" 802 for yr in $yrs 803 if [ $climato = 0 ] ; then sufyr=$suf$yr ; else sufyr=$suf; fi787 for yr in $yrs; do 788 if [ $climato = 0 ]; then sufyr=$suf$yr; else sufyr=$suf; fi 804 789 liste_get="$liste_get amipbc_sic_$sufyr.nc amipbc_sst_$sufyr.nc" 805 790 done 806 791 echo LISTEGET $liste_get 807 for file in $liste_get 808 if [ ! -f $LMDZ_Init/$file ] ; then cd $LMDZ_Init ; ${get}$file ; cd -; fi792 for file in $liste_get; do 793 if [ ! -f $LMDZ_Init/$file ]; then cd $LMDZ_Init; ${get}$file; cd -; fi 809 794 ln -s $LMDZ_Init/$file 810 795 done … … 813 798 #------------------------------------------------------------------- 814 799 get="myget 3DInputData/Init/" 815 if [ ! -f $LMDZ_Init/ECDYN.nc ] ; then cd $LMDZ_Init ; ${get}ECDYN.nc ; cd -; fi800 if [ ! -f $LMDZ_Init/ECDYN.nc ]; then cd $LMDZ_Init; ${get}ECDYN.nc; cd -; fi 816 801 ln -s $LMDZ_Init/ECDYN.nc 817 802 ln -sf ECDYN.nc ECPHY.nc … … 819 804 820 805 # Creation du script d'initialisation 821 cat << ...eod>| tmp806 cat << ...eod >| tmp 822 807 #!/bin/bash 823 808 … … 832 817 #SBATCH --output=Init%j.out # Nom du fichier de sortie 833 818 #SBATCH --error=Init%j.out # Nom du fichier d'erreur (ici commun avec la sortie) 834 # To submit to dev queue 819 # To submit to dev queue; "time" (above) must be max 2h 835 820 # #SBATCH --qos=qos_cpu-dev 836 821 … … 839 824 # ANCIEN MULTI STEP init ) 840 825 841 if [ ! -f lmdz_env.sh ] ; then echo manque fichier lmdz_env.sh ; ls ; exit; fi826 if [ ! -f lmdz_env.sh ]; then echo manque fichier lmdz_env.sh; ls; exit; fi 842 827 . lmdz_env.sh 843 828 ulimit -s unlimited … … 846 831 cd $WRK/$INIT 847 832 echo Executable : $ce0l 848 for yr in $yrs 849 if [ $climato = 0 ] ; then sufyr=$suf\$yr ; else sufyr=$suf; fi833 for yr in $yrs; do 834 if [ $climato = 0 ]; then sufyr=$suf\$yr; else sufyr=$suf; fi 850 835 ln -sf amipbc_sic_\$sufyr.nc amipbc_sic_1x1.nc 851 836 ln -sf amipbc_sst_\$sufyr.nc amipbc_sst_1x1.nc … … 853 838 echo Starting initialisation 854 839 $run 1 $ce0l 855 if [ $climato = 0 ] ; then mv limit.nc limit.\$yr.nc; fi840 if [ $climato = 0 ]; then mv limit.nc limit.\$yr.nc; fi 856 841 done 857 # ANCIEN MULTI STEP 842 # ANCIEN MULTI STEP ;; 858 843 859 844 # ANCIEN MULTI STEP interp ) 860 if [ $aerosols = clim ] 861 cp $local/interp_aerosols.sh . 845 if [ $aerosols = clim ]; then 846 cp $local/interp_aerosols.sh .; chmod +x interp_aerosols.sh 862 847 # Les aerosols de l'annee 2000 ont ete remplaces par "9999" qui pointe vers un fichier moyen sur 1995-2014 863 #for year in 2000 1850 ; do ./interp_aerosols.sh \$year; done864 #mv aerosols.2000.nc aerosols.clim.nc 865 for year in 9999 1850 ; do ./interp_aerosols.sh \$year; done866 mv aerosols.9999.nc aerosols.clim.nc 848 #for year in 2000 1850; do ./interp_aerosols.sh \$year; done 849 #mv aerosols.2000.nc aerosols.clim.nc; mv aerosols.1850.nc aerosols.nat.nc 850 for year in 9999 1850; do ./interp_aerosols.sh \$year; done 851 mv aerosols.9999.nc aerosols.clim.nc; mv aerosols.1850.nc aerosols.nat.nc 867 852 fi 868 853 869 854 # AS : S'il etait possible d'automatiser l'interpolation de l'input SPLA, ce serait a lancer ici 870 855 #en attendant, on passe au paragraphe suivant où on copie les fichiers à la res ZoomNaf depuis $LMDZ_Init/SPLA_Init 871 #if [ $aerosols = spla ] 872 #cp $local/futur script interp_aerosols_SPLA.sh . 873 #for file in... ; do ./interp_aerosols_SPLA.sh \$year; done856 #if [ $aerosols = spla ]; then 857 #cp $local/futur script interp_aerosols_SPLA.sh .; chmod +x interp_aerosols_SPLA.sh 858 #for file in...; do ./interp_aerosols_SPLA.sh \$year; done 874 859 #etc etc etc ... 875 860 #fi 876 861 877 862 # Copy initial and forcing files in $local/$INIT and $local/$LIMIT; also in $local/INPUT_SPLA if $aerosols=spla 878 for f in sta* limit.nc gri*nc ; do cp \$f $local/$INIT/\$f; done863 for f in sta* limit.nc gri*nc; do cp \$f $local/$INIT/\$f; done 879 864 mkdir -p $local/$LIMIT 880 for f in limit*.nc ; do cp \$f $local/$LIMIT/\$f; done881 if [ $aerosols = clim ] ; then for f in aerosols[.0-9]*nc ; do cp \$f $local/$LIMIT/\$f ; done; fi865 for f in limit*.nc ; do cp \$f $local/$LIMIT/\$f; done 866 if [ $aerosols = clim ]; then for f in aerosols[.0-9]*nc; do cp \$f $local/$LIMIT/\$f; done; fi 882 867 # 883 if [ $aerosols = spla ] 884 #mkdir -p $local/INPUT_SPLA 885 if [ ! -d $local/INPUT_SPLA ] ; then cp -pr $LMDZ_Init/SPLA_Init $local/INPUT_SPLA; fi868 if [ $aerosols = spla ]; then 869 #mkdir -p $local/INPUT_SPLA; pour l'instant on copie $LMDZ_Init/SPLA_Init en block 870 if [ ! -d $local/INPUT_SPLA ]; then cp -pr $LMDZ_Init/SPLA_Init $local/INPUT_SPLA; fi 886 871 fi 887 872 cd $WRK 888 873 ...eod 889 if [ $ok_guide != y ] 890 cat << ...eod>> tmp874 if [ $ok_guide != y ]; then # Running first simulation automatically except for nudging 875 cat << ...eod >> tmp 891 876 $submit tmp_$SIM 892 877 ...eod 893 878 fi 894 cat << ...eod>> tmp879 cat << ...eod >> tmp 895 880 # ANCIEN MULTI STEP esac 896 881 ...eod … … 914 899 915 900 916 if [ $ok_guide = y -a $init = 1 ] 901 if [ $ok_guide = y -a $init = 1 ]; then 917 902 echo Once initialisation is finished, you have to create nudging files 918 903 echo Edit era2gcm.sh and set the desired parameters in section "User choices" 919 904 echo Make sure you have acces to the chosen ERA files, and the required modules are load 920 905 echo Then run : ./era2gcm.sh 921 if [ "$aerosols" = "spla" ] 906 if [ "$aerosols" = "spla" ]; then 922 907 echo Your aerosol choice is "spla", so you need ERA 10m-winds interpolated on LMDZ grid 923 908 echo Use script era2gcm_uv10m.sh
Note: See TracChangeset
for help on using the changeset viewer.