source: CPL/oasis3/trunk/util/compile/frames/Create_COMP_cpl_models.ksh

Last change on this file was 1677, checked in by aclsce, 11 years ago

Imported oasis3 (tag ipslcm5a) from cvs server to svn server (igcmg project).

File size: 9.0 KB
Line 
1#! /bin/ksh
2#######################################################################
3#
4#
5#     Script to generate all component model compile scripts for
6#     a coupled PRISM constellation.
7#                                                                       
8#     File       : ~/util/compile/frames/Create_COMP_cpl_models.ksh
9#
10#     Stephanie Legutke, MPI-HH, M&D          Dec 14, 2004
11#
12#     This script calls the script for the generation of component model
13#     for  all component models of a PRISM coupled model constellation.
14#     The compile script are specifically created for the target platform
15#     specified in the third parameter ("": platform where the scripts are run;
16#     ("node": platform as specified).
17#     The node name is either detected with `uname -n` or, if the script is not
18#     created on the target machine, it must be specified by the user.
19#     The generated compile scripts are configured consistenly for the
20#     PRISM coupled model specified in the first parameter and tagged with
21#     a version/experiment ID (2nd parameter).
22#
23# Usage :
24#        Create_COMP_cpl_models.ksh 'coupled model name' [ID [node [MPI1/2]]]
25#           coupled model name (required) : see table on PRISM web site
26#           ID                 (optional) : tag/version/experiment ID
27#           node               (optional) : node name of compile server
28#           MPI1/2             (optional) : MPI message passing version
29#       
30#
31# Potential partner models for
32# mpi-om          : echam5 hamocc pisces ham
33# echam5          : hamocc ham mpi-om
34# hamocc          : echam5 ham mpi-om
35# ham             : echam5 hamocc mpi-om
36# arpege_climat4  : opa toyoce
37# lim             : opa toy4opa lmdz orchidee
38# mozart          : echam5 (not yet!)
39# opa             : lmdz arpege_climat4 lim orchidee toy4opa
40# pisces          : echam5 mpi-om
41# toy4opa         : opa lim mpi-om
42# toyatm          : toyche toyoce
43# toyche          : toyatm toyoce
44# toyoce          : toyatm toyche
45# lmdz            : orchidee opa lim
46# orchidee        : lmdz lim opa
47#
48#######################################################################
49set +x
50set -e
51
52if [ "$1" = "" ] || [ "$1" = "--" ] || [ "$1" = "-help" ] || \
53   [ "$1" = "--help" ]; then
54   echo '    Usage :'
55   echo '      Create_COMP_cpl_models.ksh  cplmod [ID [node [MPI1/2]]]'
56   echo '                cplmod (required) : coupled model name' 
57   echo '                ID     (optional) : tag/version/experiment ID'
58   echo '                node   (optional) : node name of compile server'
59   echo '                MPI1/2 (optional) : MPI message passing version'
60   exit 1
61else
62   cpl_mod=$1
63   if [ ! "$2" = "" ];then
64      ID=$2
65   else
66      ID=""
67   fi
68   if [ ! "$3" = "" ];then
69      node=$3
70   else
71      node=""
72   fi
73   if [ ! "$4" = "" ];then
74      chan=$4
75   else
76      chan=""
77   fi
78fi
79
80# MPI-OM
81# ------
82if [ "$cpl_mod" = "mpi-o" ] || [ "$cpl_mod" = "mpi-om" ]; then
83   if [ "$2" = "" ];then
84      ID=B01
85   fi
86   ./Create_COMP_models.frm mpi-om NONE - "" "$node" "$ID" ""
87
88# MPI-OB
89# ------
90elif [ "$cpl_mod" = "mpi-ob" ]; then
91   if [ "$2" = "" ];then
92      ID=B03
93   fi
94   ./Create_COMP_models.frm hamocc NONE - "" "$node" "$ID" "mpi-om hamocc"
95   ./Create_COMP_models.frm mpi-om NONE - "" "$node" "$ID" "mpi-om hamocc"
96
97# MPI-O-PISCES
98# ------------
99elif [ "$cpl_mod" = "mpi-o-pisces" ]; then
100   if [ "$2" = "" ];then
101      ID=B02
102   fi
103  ./Create_COMP_libs.frm   - "" "$node" "$chan"
104  ./Create_COMP_models.frm pisces NONE - "" "$node" "$ID" "mpi-om pisces"
105  ./Create_COMP_models.frm mpi-om NONE - "" "$node" "$ID" "mpi-om pisces"
106
107# ECHAM5
108# ------
109elif [ "$cpl_mod" = "echam5" ]; then
110   if [ "$2" = "" ];then
111      ID=A01
112   fi
113  ./Create_COMP_libs.frm   - "" "$node" "$chan"
114  ./Create_COMP_models.frm echam5 NONE - "" "$node" "$ID" ""
115
116# MPI-AO (=ECHO)
117# --------------
118elif [ "$cpl_mod" = "mpi-ao" ] || [ "$cpl_mod" = "echo" ]; then
119   if [ "$2" = "" ];then
120      ID=D10
121   fi
122  ./Create_COMP_libs.frm   - "" "$node" "$chan"
123  ./Create_COMP_models.frm oasis3  "$chan" - "" "$node" " " ""
124  ./Create_COMP_models.frm echam5  "$chan" - "" "$node" "$ID" "echam5 mpi-om"
125  ./Create_COMP_models.frm mpi-om  "$chan" - "" "$node" "$ID" "echam5 mpi-om"
126
127# MPI-AOB
128# -------
129elif [ "$cpl_mod" = "mpi-aob" ]; then
130   if [ "$2" = "" ];then
131      ID=D15
132   fi
133  ./Create_COMP_libs.frm   - "" "$node" "$chan"
134  ./Create_COMP_models.frm oasis3  "$chan" - "" "$node" " " ""
135  ./Create_COMP_models.frm echam5  "$chan" - "" "$node" "$ID" "echam5 mpi-om hamocc"
136  ./Create_COMP_models.frm hamocc  "$chan" - "" "$node" "$ID" "echam5 mpi-om hamocc"
137  ./Create_COMP_models.frm mpi-om  "$chan" - "" "$node" "$ID" "echam5 mpi-om hamocc"
138
139# MPI-AO-PISCES
140# -------------
141elif [ "$cpl_mod" = "mpi-ao-pisces" ]; then
142   if [ "$2" = "" ];then
143      ID=D17
144   fi
145  ./Create_COMP_libs.frm   - "" "$node" "$chan"
146  ./Create_COMP_models.frm oasis3  "$chan" - "" "$node" " " ""
147  ./Create_COMP_models.frm echam5  "$chan" - "" "$node" "$ID" "echam5 mpi-om pisces"
148  ./Create_COMP_models.frm mpi-om  "$chan" - "" "$node" "$ID" "echam5 mpi-om pisces"
149  ./Create_COMP_models.frm pisces  "$chan" - "" "$node" "$ID" "echam5 mpi-om pisces"
150
151# MPI-AOB-HAM
152# -----------
153elif [ "$cpl_mod" = "mpi-aob-ham" ]; then
154   if [ "$2" = "" ];then
155      ID=D16
156   fi
157  ./Create_COMP_libs.frm   - "" "$node" "$chan"
158  ./Create_COMP_models.frm oasis3  "$chan" - "" "$node" " " ""
159  ./Create_COMP_models.frm echam5  "$chan" - "" "$node" "$ID" "echam5 ham mpi-om hamocc"
160  ./Create_COMP_models.frm hamocc  "$chan" - "" "$node" "$ID" "echam5 ham mpi-om hamocc"
161  ./Create_COMP_models.frm mpi-om  "$chan" - "" "$node" "$ID" "echam5 ham mpi-om hamocc"
162
163# MOZART
164#-------
165elif [ "$cpl_mod" = "mozart" ]; then
166   if [ "$2" = "" ];then
167      ID=C01
168   fi
169  ./Create_COMP_libs.frm   - "" "$node" "$chan"
170  ./Create_COMP_models.frm mozart  "$chan" - "" "$node" "$ID" "echam5"
171
172# IPSL-CM4
173#---------
174elif [ "$cpl_mod" = "ipsl_cm4" ]; then
175   if [ "$2" = "" ];then
176      ID=I01
177   fi
178  ./Create_COMP_libs.frm   - "" "$node" "$chan"
179  ./Create_COMP_models.frm oasis3   "$chan" - "" "$node" " " ""
180  ./Create_COMP_models.frm lmdz     "$chan" - "" "$node" "$ID" "lmdz orchidee opa lim"
181  ./Create_COMP_models.frm orchidee "$chan" - "" "$node" "$ID" "lmdz orchidee opa lim"
182  ./Create_COMP_models.frm opa      "$chan" - "" "$node" "$ID" "lmdz orchidee opa lim"
183  ./Create_COMP_models.frm lim      "$chan" - "" "$node" "$ID" "lmdz orchidee opa lim"
184
185# OPATOY
186#-------
187elif [ "$cpl_mod" = "opatoy" ]; then
188   if [ "$2" = "" ];then
189      ID=I00
190   fi
191  ./Create_COMP_libs.frm   - "" "$node" "$chan"
192  ./Create_COMP_models.frm oasis3       "$chan" - "" "$node" " " ""
193  ./Create_COMP_models.frm opa          "$chan" - "" "$node" "$ID" "opa lim toy4opa"
194  ./Create_COMP_models.frm lim          "$chan" - "" "$node" "$ID" "opa lim toy4opa"
195  ./Create_COMP_models.frm toy4opa      "$chan" - "" "$node" "$ID" "opa lim toy4opa"
196
197# TOYCLIM
198#---------
199elif [ "$cpl_mod" = "toyclim" ]; then
200   if [ "$2" = "" ];then
201      ID=ID
202   fi
203  ./Create_COMP_libs.frm   - "" "$node" "$chan"
204  ./Create_COMP_models.frm oasis3 "$chan" - "" "$node" " " ""
205  ./Create_COMP_models.frm toyatm "$chan" - "" "$node" "$ID" "toyatm toyoce toyche"
206  ./Create_COMP_models.frm toyoce "$chan" - "" "$node" "$ID" "toyatm toyoce toyche"
207  ./Create_COMP_models.frm toyche "$chan" - "" "$node" "$ID" "toyatm toyoce toyche"
208
209# ARPEGETOY
210#----------
211elif [ "$cpl_mod" = "arpegetoy" ]; then
212   if [ "$2" = "" ];then
213      ID=M00
214   fi
215  ./Create_COMP_libs.frm   - "" "$node" "$chan"
216  ./Create_COMP_models.frm oasis3         "$chan" - "" "$node" " " ""
217  ./Create_COMP_models.frm toy4arpege     "$chan" - "" "$node" "$ID" "arpege_climat4 toy4arpege"
218  ./Create_COMP_models.frm arpege_climat4 "$chan" - "" "$node" "$ID" "arpege_climat4 toy4arpege"
219
220# ARPEGE-ORCA
221#------------
222elif [ "$cpl_mod" = "arpege-orca" ]; then
223   if [ "$2" = "" ];then
224      ID=M01
225   fi
226  ./Create_COMP_libs.frm   - "" "$node" "$chan"
227  ./Create_COMP_models.frm oasis3         "$chan" - "" "$node" " " ""
228  ./Create_COMP_models.frm lim            "$chan" - "" "$node" "$ID" "arpege_climat4 opa lim"
229  ./Create_COMP_models.frm opa            "$chan" - "" "$node" "$ID" "arpege_climat4 opa lim"
230  ./Create_COMP_models.frm arpege_climat4 "$chan" - "" "$node" "$ID" "arpege_climat4 opa lim"
231
232# unknown model
233# -------------
234else
235  echo "The coupled model specified is not supported"
236  echo "   Supported coupled models are:"
237  echo "      arpegetoy       : ARPEGE TOY4ARPEGE "
238  echo "      arpege-orca     : ARPEGE OPA "
239  echo "      echo (=mpi-ao)  : ECHAM5 MPI-OM " 
240  echo "      ipsl_cm4        : LMDZ ORCHIDEE OPA LIM "
241  echo "      mozart          : MOZART "
242  echo "      mpi-ao (=echo)  : ECHAM5 MPI-OM "
243  echo "      mpi-aob         : ECHAM5 MPI-OM HAMOCC "
244  echo "      mpi-ao-pisces   : ECHAM5 MPI-OM PISCES "
245  echo "      mpi-aob-ham     : ECHAM5 MPI-OM HAMOCC (HAM)"
246  echo "      mpi-om (=mpi-o) : MPI-OM "
247  echo "      mpi-ob          : MPI-OM HAMOCC "
248  echo "      mpi-o-pisces    : MPI-OM PISCES "
249  echo "      opatoy          : OPA TOY4OPA "
250  echo "      toyclim         : TOYATM TOYCHE TOYOCE "
251
252fi
Note: See TracBrowser for help on using the repository browser.