source: BOL/LMDZ_Setup_amaury/main.sh @ 5445

Last change on this file since 5445 was 5376, checked in by abarral, 3 weeks ago

bump default modipsl version
fix forwarding svn rev between main.sh and setup.sh

File size: 5.1 KB
Line 
1#!/bin/bash
2
3set -eu
4
5#####################################################################
6# Authors :
7# F. Hourdin, frederic.hourdin@lmd.ipsl.fr
8# Modified A. Sima, adriana.sima@lmd.ipsl.fr
9# Rewritten 2024 A. Barral
10#
11# This is the main user script of LMDZ_Setup. It defines basic options for the simulations, and runs setup.sh.
12# Settings such as model and simulation paths are set in lmdz_env.sh. You must modify it to set the current LMDZ_Setup path as <root_dir>.
13# Expert options are set directly in setup.sh via <define_expert_options>.
14#
15# Some expert options in setup.sh :
16# * Orchidee version, through the "veget" option
17# * Aerosol forcing, through the "aerosols" option
18# * Radiation code, through the "rad" option
19# * Compilation options (debug, netcdf)
20#####################################################################
21
22#===========================================================
23# 1. Model setup
24#===========================================================
25
26# Version of the tar file on https://lmdz.lmd.jussieu.fr/pub/src
27# Last "testing" version, thoroughly checked by the LMDZ team : contains LMDZ rev 4729 (2023-10-22)
28version="20241018.trunk" #!! DON'T CHANGE IT WITHOUT CHECKING WITH LMDZ TEAM !!
29svn=""                   #!! DON'T CHANGE IT WITHOUT CHECKING WITH LMDZ TEAM !!
30# CONTACT LMDZ Team :
31#       email: poihl@listes.lmd.ipsl.fr
32#       Mattermost: https://mattermost.lmd.ipsl.fr/lmdz/channels/installation-et-tutoriels
33
34# Grid number of points IMxJMxLM
35resol="144x142x79"
36
37## Using XIOS for IOs: "-xios" (enabled) / "" (disabled)
38xios=""
39
40# Using or not the Cosp simulator: "-cosp" (enabled) / "" (disabled)
41cosp=""
42
43# Choice of physics: "lmd" (phylmd) / "new" (phynew) / "lmdiso" (isotopes)
44lmd_phys="lmd"
45
46#===========================================================
47# 2. Simulation setup
48#===========================================================
49
50# Initial state and Boundary conditions
51# init=   1: to create a new start in INIT
52#         0: to read start files in INIT
53#       SIM: to read start files from previous simulation SIM0, /!\ SIM0 must be in the same folder as the new SIM
54# (limit.nc and aerosols forcing are put in ./LIMIT)
55init=1
56
57# climato=1 : Climatological SSTs with 360-day calendar
58#        =0 : interannual SSTs with true (ie gregorian) calendar
59climato=1
60
61# Nudging: Can only be activated with climato=0 and freq=mo
62# "-nudging" (enabled) / "" (disabled)
63nudging=""
64#If using nudging, then check DEF/guide.def :
65#  - ok_guide will be automatically set to "y" by setup.sh
66#  - You may want to check/customize the nudging parameters
67
68# Length of elementary simulations yr (year) or mo (month)
69freq="yr"
70
71# Initial/final month for simulation
72# If $init=1, the INIT file will be called start.200001.nc,
73# but the data correspond in fact to another day.
74# NB : the run stops in the BEGINNING of mthend (test "next=stopsim")
75mthini=200001
76mthend=200501
77
78#-----------------------------------------------------------
79# Output files, frequencies, levels
80#   If you use IOIPSL (option xios=""), you may want to choose and customize DEF/config.def.
81#     A few versions are available as DEF/config.def_*; config.def is a copy of config.def_default
82#     See phys_out_filekeys, phys_out_filelevels, phys_out_filetimesteps, and supplementary variables
83#   If you use XIOS (option xios="-xios"), check/modify DEF/XMLfiles*/file*xml
84#   In both cases, the default output is "histday".
85#-----------------------------------------------------------
86# Grid characteristics (regular, zoomed)
87#   You may want to choose and customize DEF/gcm.def
88#   A few versions are available as DEF/gcm.def_*;
89#      The default, for regular grid 144x142x79, corresponds to _iperiod7
90#      (Expert : TEMPORARILY : setup.sh forces use of gcm.def_zNAfrica_BiJe for aerosols=spla)
91
92#===========================================================
93# 3. Example of calling setup.sh in loop
94#===========================================================
95
96# By default, the series is done on one or more of the various versions of physiq.def
97# to be chosen among DEF/PHYS/physiq.def_* , and listed in "physics" :
98# NOTE : automatically choosing DEF/PHYS/physiq.def_NPiso for isotopes
99physics="NPv6.3"
100if [[ $lmd_phys = "lmdiso" ]]; then physics="NPiso"; fi
101
102if [[ $(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
103
104for phys in $physics; do
105  deffile="DEF/PHYS/physiq.def_$phys"
106  if [[ -f $deffile ]]; then
107     cp -p $deffile DEF/physiq.def
108
109    # name of simulation : can be changed to user's convenience
110    # (Default: name=$phys to loop on different physics)
111    name="$phys"
112
113    # launching setup.sh with the options defined in this main.sh.
114    # Remember: some other options are only available in lmdz_env.sh and setup.sh.
115    # shellcheck disable=SC2086
116    ./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"
117  else
118    echo "File $deffile inexistent"; exit 1
119  fi
120done
121
Note: See TracBrowser for help on using the repository browser.