[1279] | 1 | #!/bin/bash |
---|
| 2 | # $Id: makelmdz_fcm 5341 2024-11-21 18:48:45Z abarral $ |
---|
| 3 | # This is a script in Bash. |
---|
| 4 | |
---|
[2098] | 5 | # FH : on ne cr\'ee plus le fichier arch.mk qui est suppos\'e exister par |
---|
[783] | 6 | # FH : ailleurs. |
---|
[2098] | 7 | # FH : ulterieurement, ce fichier sera pr\'e-existant pour une s\'erie |
---|
| 8 | # FH : de configurations en versions optimis\'ees et debug qui seront |
---|
| 9 | # FH : li\'es (ln -s) avec arch.mk en fonction de l'architecture. |
---|
| 10 | # FH : Pour le moment, cette version est en test et on peut cr\'eer les |
---|
| 11 | # FH : arch.mk en lan\c{}cant une premi\`ere fois makegcm. |
---|
[783] | 12 | # |
---|
[1279] | 13 | ##set -x |
---|
[2202] | 14 | set -e |
---|
[783] | 15 | ######################################################################## |
---|
| 16 | # options par defaut pour la commande make |
---|
| 17 | ######################################################################## |
---|
| 18 | |
---|
[1279] | 19 | dim="96x72x19" |
---|
| 20 | physique=lmd |
---|
| 21 | filtre=filtrez |
---|
| 22 | couple=false |
---|
| 23 | veget=false |
---|
[3793] | 24 | inlandsis=false |
---|
[1990] | 25 | rrtm=false |
---|
[4195] | 26 | rad="oldrad" |
---|
[2631] | 27 | dust=false |
---|
[2690] | 28 | strataer=false |
---|
[1279] | 29 | chimie=false |
---|
| 30 | parallel=none |
---|
[3997] | 31 | paramem="mem" |
---|
[1279] | 32 | compil_mod=prod |
---|
| 33 | io=ioipsl |
---|
| 34 | LIBPREFIX="" |
---|
| 35 | cosp=false |
---|
[3358] | 36 | cosp2=false |
---|
[3491] | 37 | cospv2=false |
---|
[1802] | 38 | job=1 |
---|
| 39 | full='' |
---|
[2358] | 40 | libphy=false |
---|
[3924] | 41 | isotopes=false |
---|
| 42 | isoverif=false |
---|
| 43 | diagiso=false |
---|
| 44 | isotrac=false |
---|
[4096] | 45 | force_compile=false |
---|
[4247] | 46 | cplocninca=false |
---|
[783] | 47 | |
---|
[2743] | 48 | arch_defined="FALSE" |
---|
| 49 | arch_path="arch" |
---|
| 50 | arch_default_path="arch" |
---|
| 51 | |
---|
[1279] | 52 | LMDGCM=`/bin/pwd` |
---|
| 53 | LIBOGCM=$LMDGCM/libo |
---|
| 54 | LIBFGCM=$LMDGCM/libf |
---|
[2239] | 55 | DYN_COMMON_PATH=$LIBFGCM/dyn3d_common |
---|
[5340] | 56 | GRID_PATH=$LIBFGCM/grid |
---|
[2084] | 57 | # path for optional packages, but default set to ".void_dir" |
---|
[2239] | 58 | FILTRE_PATH=$LMDGCM/.void_dir |
---|
| 59 | DYN_PHYS_PATH=$LMDGCM/.void_dir |
---|
[2242] | 60 | DYN_PHYS_SUB_PATH=$LMDGCM/.void_dir |
---|
[2326] | 61 | PHY_COMMON_PATH=$LMDGCM/.void_dir |
---|
[3908] | 62 | RAD_PATH=$LMDGCM/.void_dir |
---|
[3901] | 63 | INLANDSIS_PATH=$LMDGCM/.void_dir |
---|
[2631] | 64 | DUST_PATH=$LMDGCM/.void_dir |
---|
[2690] | 65 | STRATAER_PATH=$LMDGCM/.void_dir |
---|
[5341] | 66 | COSP_PATH=$LMDGCM/.void_dir |
---|
[1578] | 67 | fcm_path=$LMDGCM/tools/fcm/bin |
---|
[783] | 68 | |
---|
| 69 | ######################################################################## |
---|
| 70 | # Quelques initialisations de variables du shell. |
---|
| 71 | ######################################################################## |
---|
| 72 | |
---|
[3815] | 73 | CPP_KEY="IN_LMDZ" |
---|
[1279] | 74 | INCLUDE="" |
---|
| 75 | LIB="" |
---|
| 76 | adjnt="" |
---|
| 77 | COMPIL_FFLAGS="%PROD_FFLAGS" |
---|
| 78 | PARA_FFLAGS="" |
---|
| 79 | PARA_LD="" |
---|
| 80 | EXT_SRC="" |
---|
[783] | 81 | |
---|
| 82 | ######################################################################## |
---|
| 83 | # lecture des options de mymake |
---|
| 84 | ######################################################################## |
---|
| 85 | |
---|
[1279] | 86 | while (($# > 0)) |
---|
| 87 | do |
---|
| 88 | case $1 in |
---|
| 89 | "-h") cat <<fin |
---|
[783] | 90 | Usage : |
---|
[1772] | 91 | makelmdz_fcm [options] -arch nom_arch exec |
---|
| 92 | [-h] : brief help |
---|
| 93 | [-d [[IMx]JMx]LM] : IM, JM, LM are the dimensions in x, y, z (default: $dim) |
---|
| 94 | [-p PHYS] : set of physical parametrizations (in libf/phyPHYS), (default: lmd) |
---|
| 95 | [-prod / -dev / -debug] : compilation mode production (default) / developement / debug |
---|
[1965] | 96 | [-c false/MPI1/OMCT] : coupling with ocean model : MPI1/OMCT/false (default: false) |
---|
[4283] | 97 | [-v false/orchideetrunk/orchidee2.1/orchidee2.0/orchidee1.9] : version of the vegetation model to include (default: false) |
---|
[1772] | 98 | false : no vegetation model |
---|
[4283] | 99 | orchideetrunk : compile using ORCHIDEE trunk from revision 7757 or higher |
---|
| 100 | orchidee2.1 : compile using ORCHIDEE 2.1 until 4.1 included or until revision 7757 on the trunk |
---|
[3435] | 101 | orchidee2.0 : compile using ORCHIDEE 2.0 |
---|
[1772] | 102 | orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6 |
---|
| 103 | true : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6 |
---|
| 104 | [-chimie INCA/false] : with INCA chemistry model or without (default: false) |
---|
[4247] | 105 | [-cplocninca ] : allow transfer of species from PISCES to INCA (default: false) |
---|
[2238] | 106 | [-cosp true/false] : compile with/without cosp package (default: false) |
---|
[3358] | 107 | [-cosp2 true/false] : compile with/without cosp2 package (default: false) |
---|
[3491] | 108 | [-cospv2 true/false] : compile with/without cospv2 package (default: false) |
---|
[3793] | 109 | [-inlandsis true/false] : compile with/without inlandsis package (default: false) |
---|
[2238] | 110 | [-rrtm true/false] : compile with/without rrtm package (default: false) |
---|
[4195] | 111 | [-rad oldrad/rrtm/ecrad] : compile with oldrad/rrtm/ecrad radiatif code (default: oldrad) |
---|
[2631] | 112 | [-dust true/false] : compile with/without the dust package by Boucher and co (default: false) |
---|
[2690] | 113 | [-strataer true/false] : compile with/without the strat aer package by Boucher and co (default: false) |
---|
[3924] | 114 | [-isotopes true/false] : compile with/without water isotopes in the physics |
---|
| 115 | [-isoverif true/false] : compile with/without verifications for water isotopes in the physics |
---|
| 116 | [-diagiso true/false] : compile with/without special diagnostics for water isotopes in the physics |
---|
| 117 | [-isotrac true/false] : compile with/without tracers of water isotopes in the physics |
---|
[1772] | 118 | [-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp |
---|
[2097] | 119 | [-io ioipsl/mix/xios] : Input/Output library (default: ioipsl) |
---|
[1772] | 120 | [-include INCLUDES] : extra include path to add |
---|
| 121 | [-cpp CPP_KEY] : additional preprocessing definitions |
---|
| 122 | [-adjnt] : adjoint model, not operational ... |
---|
[3997] | 123 | [-mem] : reduced memory dynamics (obsolete flag; always on in parallel mode) |
---|
[1772] | 124 | [-filtre NOMFILTRE] : use filtre from libf/NOMFILTRE (default: filtrez) |
---|
| 125 | [-link LINKS] : additional links with other libraries |
---|
[1802] | 126 | [-j n] : active parallel compiling on ntask |
---|
| 127 | [-full] : full recompiling |
---|
[2358] | 128 | [-libphy] : only compile physics package (no dynamics or main program) |
---|
[1772] | 129 | [-fcm_path path] : path to the fcm tool (default: tools/fcm/bin) |
---|
| 130 | [-ext_src path] : path to an additional set of routines to compile with the model |
---|
[2743] | 131 | [-arch_path path] : path to architecture files (default: $arch_default_path) |
---|
[4096] | 132 | [-force_compile] : recompile although there seems to be an on-going compilation |
---|
[1772] | 133 | -arch nom_arch : target architecture |
---|
| 134 | exec : executable to build |
---|
[783] | 135 | fin |
---|
[1279] | 136 | exit;; |
---|
[783] | 137 | |
---|
[1279] | 138 | "-d") |
---|
| 139 | dim=$2 ; shift ; shift ;; |
---|
| 140 | |
---|
| 141 | "-p") |
---|
| 142 | physique="$2" ; shift ; shift ;; |
---|
[783] | 143 | |
---|
[1279] | 144 | "-c") |
---|
| 145 | couple="$2" ; shift ; shift ;; |
---|
[783] | 146 | |
---|
[1279] | 147 | "-prod") |
---|
| 148 | compil_mod="prod" ; shift ;; |
---|
[1002] | 149 | |
---|
[1279] | 150 | "-dev") |
---|
| 151 | compil_mod="dev" ; shift ;; |
---|
[1002] | 152 | |
---|
[1279] | 153 | "-debug") |
---|
| 154 | compil_mod="debug" ; shift ;; |
---|
[1002] | 155 | |
---|
[1279] | 156 | "-io") |
---|
| 157 | io="$2" ; shift ; shift ;; |
---|
[783] | 158 | |
---|
[1279] | 159 | "-v") |
---|
| 160 | veget="$2" ; shift ; shift ;; |
---|
[783] | 161 | |
---|
[3793] | 162 | "-inlandsis") |
---|
[3908] | 163 | inlandsis="$2" ; shift ; shift ;; |
---|
[3793] | 164 | |
---|
[1990] | 165 | "-rrtm") |
---|
[4195] | 166 | rrtm="$2" ; if [ "$2" = "false" ] ; then rad="oldrad" ; else rad="rrtm" ; fi ; shift ; shift ;; |
---|
[1990] | 167 | |
---|
[3908] | 168 | "-rad") |
---|
| 169 | rad="$2" ; shift ; shift ;; |
---|
| 170 | |
---|
[2631] | 171 | "-dust") |
---|
| 172 | dust="$2" ; shift ; shift ;; |
---|
| 173 | |
---|
[2690] | 174 | "-strataer") |
---|
| 175 | strataer="$2" ; shift ; shift ;; |
---|
| 176 | |
---|
[1279] | 177 | "-chimie") |
---|
| 178 | chimie="$2" ; shift ; shift ;; |
---|
[783] | 179 | |
---|
[4247] | 180 | "-cplocninca") |
---|
| 181 | cplocninca=TRUE ; shift ;; |
---|
| 182 | |
---|
[3924] | 183 | "-isotopes") |
---|
| 184 | isotopes="$2" ; shift ; shift ;; |
---|
| 185 | |
---|
| 186 | "-isoverif") |
---|
| 187 | isoverif="$2" ; shift ; shift ;; |
---|
| 188 | |
---|
| 189 | "-diagiso") |
---|
| 190 | diagiso="$2" ; shift ; shift ;; |
---|
| 191 | |
---|
| 192 | "-isotrac") |
---|
| 193 | isotrac="$2" ; shift ; shift ;; |
---|
| 194 | |
---|
[1279] | 195 | "-parallel") |
---|
| 196 | parallel="$2" ; shift ; shift ;; |
---|
| 197 | |
---|
| 198 | "-include") |
---|
| 199 | INCLUDE="$INCLUDE -I$2" ; shift ; shift ;; |
---|
[783] | 200 | |
---|
[1279] | 201 | "-cpp") |
---|
| 202 | CPP_KEY="$CPP_KEY $2" ; shift ; shift ;; |
---|
[1132] | 203 | |
---|
[1279] | 204 | "-adjnt") |
---|
[1772] | 205 | echo "not operational ... work to be done here ";exit |
---|
[1279] | 206 | opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d " |
---|
| 207 | optim="$optim -Dadj" ; shift ;; |
---|
[783] | 208 | |
---|
[1279] | 209 | "-cosp") |
---|
| 210 | cosp="$2" ; shift ; shift ;; |
---|
[3358] | 211 | |
---|
| 212 | "-cosp2") |
---|
| 213 | cosp2="$2" ; shift ; shift ;; |
---|
[3491] | 214 | |
---|
| 215 | "-cospv2") |
---|
| 216 | cospv2="$2" ; shift ; shift ;; |
---|
[1680] | 217 | |
---|
| 218 | "-mem") |
---|
[3997] | 219 | echo "option -mem is obsolete (now always on in parallel)" |
---|
[1680] | 220 | paramem="mem" ; shift ;; |
---|
[783] | 221 | |
---|
[1279] | 222 | "-filtre") |
---|
| 223 | filtre=$2 ; shift ; shift ;; |
---|
[783] | 224 | |
---|
[1279] | 225 | "-link") |
---|
| 226 | LIB="$LIB $2" ; shift ; shift ;; |
---|
[1136] | 227 | |
---|
[1279] | 228 | "-fcm_path") |
---|
| 229 | fcm_path=$2 ; shift ; shift ;; |
---|
[783] | 230 | |
---|
[1279] | 231 | "-ext_src") |
---|
| 232 | EXT_SRC=$2 ; shift ; shift ;; |
---|
[2358] | 233 | |
---|
[1802] | 234 | "-j") |
---|
| 235 | job=$2 ; shift ; shift ;; |
---|
[2358] | 236 | |
---|
[1802] | 237 | "-full") |
---|
| 238 | full="-full" ; shift ;; |
---|
[783] | 239 | |
---|
[2358] | 240 | "-libphy") |
---|
| 241 | libphy="true" ; shift ;; |
---|
| 242 | |
---|
[1279] | 243 | "-arch") |
---|
[2743] | 244 | arch=$2 ; arch_defined="TRUE" ; shift ; shift ;; |
---|
[783] | 245 | |
---|
[2743] | 246 | "-arch_path") |
---|
| 247 | arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;; |
---|
| 248 | |
---|
[4096] | 249 | "-force_compile") |
---|
| 250 | force_compile=true ; shift ;; |
---|
| 251 | |
---|
[1279] | 252 | *) |
---|
| 253 | code="$1" ; shift ;; |
---|
| 254 | esac |
---|
| 255 | done |
---|
| 256 | |
---|
[1136] | 257 | ############################################################### |
---|
[1755] | 258 | # path to fcm |
---|
[1136] | 259 | ############################################################### |
---|
[1755] | 260 | # handle case when provided path to fcm was given as a relative |
---|
| 261 | # path (from makelmdz_fcm script directory) and not an absolute path |
---|
| 262 | if [[ ${fcm_path:0:1} != "/" ]] ; then |
---|
| 263 | # prepend with makelmdz_fcm location |
---|
| 264 | fcm_path=$(cd $(dirname $0) ; pwd)"/"${fcm_path} |
---|
| 265 | fi |
---|
[783] | 266 | |
---|
[1757] | 267 | # add fcm_path to PATH |
---|
| 268 | export PATH=${fcm_path}:${PATH} |
---|
| 269 | |
---|
[1755] | 270 | echo "Path to fcm:" |
---|
| 271 | echo ${fcm_path} |
---|
[1136] | 272 | |
---|
[783] | 273 | ############################################################### |
---|
[2098] | 274 | # lecture des chemins propres \`a l'architecture de la machine # |
---|
[783] | 275 | ############################################################### |
---|
[1279] | 276 | rm -f .void_file |
---|
| 277 | echo > .void_file |
---|
[1327] | 278 | rm -rf .void_dir |
---|
| 279 | mkdir .void_dir |
---|
[783] | 280 | |
---|
[2743] | 281 | if [[ "$arch_defined" == "TRUE" ]] |
---|
| 282 | then |
---|
| 283 | rm -f arch.path |
---|
| 284 | rm -f arch.fcm |
---|
| 285 | rm -f arch.env |
---|
| 286 | |
---|
| 287 | if test -f $arch_path/arch-${arch}.path |
---|
| 288 | then |
---|
| 289 | ln -s $arch_path/arch-${arch}.path arch.path |
---|
| 290 | elif test -f $arch_default_path/arch-${arch}.path |
---|
| 291 | then |
---|
| 292 | ln -s $arch_default_path/arch-${arch}.path arch.path |
---|
| 293 | fi |
---|
| 294 | |
---|
| 295 | if test -f $arch_path/arch-${arch}.fcm |
---|
| 296 | then |
---|
| 297 | ln -s $arch_path/arch-${arch}.fcm arch.fcm |
---|
| 298 | elif test -f $arch_default_path/arch-${arch}.fcm |
---|
| 299 | then |
---|
| 300 | ln -s $arch_default_path/arch-${arch}.fcm arch.fcm |
---|
| 301 | fi |
---|
| 302 | |
---|
| 303 | if test -f $arch_path/arch-${arch}.env |
---|
| 304 | then |
---|
| 305 | ln -s $arch_path/arch-${arch}.env arch.env |
---|
| 306 | elif test -f $arch_default_path/arch-${arch}.env |
---|
| 307 | then |
---|
| 308 | ln -s $arch_default_path/arch-${arch}.env arch.env |
---|
| 309 | else |
---|
| 310 | ln -s .void_file arch.env |
---|
| 311 | fi |
---|
| 312 | # source architecture PATH and ENV files |
---|
| 313 | source arch.env |
---|
| 314 | source arch.path |
---|
| 315 | else |
---|
| 316 | echo "You must define a target architecture" |
---|
| 317 | exit 1 |
---|
| 318 | fi |
---|
| 319 | |
---|
[783] | 320 | ######################################################################## |
---|
| 321 | # Definition des clefs CPP, des chemins des includes et modules |
---|
| 322 | # et des libraries |
---|
| 323 | ######################################################################## |
---|
| 324 | |
---|
[1279] | 325 | if [[ "$compil_mod" == "prod" ]] |
---|
| 326 | then |
---|
| 327 | COMPIL_FFLAGS="%PROD_FFLAGS" |
---|
| 328 | elif [[ "$compil_mod" == "dev" ]] |
---|
| 329 | then |
---|
| 330 | COMPIL_FFLAGS="%DEV_FFLAGS" |
---|
| 331 | elif [[ "$compil_mod" == "debug" ]] |
---|
| 332 | then |
---|
| 333 | COMPIL_FFLAGS="%DEBUG_FFLAGS" |
---|
| 334 | fi |
---|
[783] | 335 | |
---|
[2250] | 336 | phys_root=$physique |
---|
| 337 | if [[ "${physique:0:3}" == "lmd" ]] ; then phys_root=lmd ; fi |
---|
| 338 | if [[ "${physique:0:4}" == "mars" ]] ; then phys_root=mars ; fi |
---|
| 339 | if [[ "${physique:0:3}" == "std" ]] ; then phys_root=std ; fi |
---|
| 340 | if [[ "${physique:0:5}" == "venus" ]] ; then phys_root=venus ; fi |
---|
| 341 | if [[ "${physique:0:5}" == "titan" ]] ; then phys_root=titan ; fi |
---|
| 342 | if [[ "${physique:0:3}" == "dev" ]] ; then phys_root=dev ; fi |
---|
| 343 | |
---|
[1279] | 344 | if [[ "$physique" != "nophys" ]] |
---|
| 345 | then |
---|
[1615] | 346 | #We'll use some physics |
---|
| 347 | CPP_KEY="$CPP_KEY CPP_PHYS" |
---|
[2250] | 348 | if [[ "${phys_root}" == "lmd" ]] |
---|
[1615] | 349 | then |
---|
| 350 | #For lmd physics, default planet type is Earth |
---|
[1279] | 351 | CPP_KEY="$CPP_KEY CPP_EARTH" |
---|
[1615] | 352 | fi |
---|
[2326] | 353 | # set physics common utilities path |
---|
| 354 | PHY_COMMON_PATH="${LIBFGCM}/phy_common" |
---|
[2239] | 355 | # set the dyn/phys interface path |
---|
[2417] | 356 | DYN_PHYS_PATH="${LIBFGCM}/dynphy_lonlat" |
---|
| 357 | DYN_PHYS_SUB_PATH="${LIBFGCM}/dynphy_lonlat/phy${phys_root}" |
---|
[1279] | 358 | fi |
---|
[783] | 359 | |
---|
[2239] | 360 | if [[ "$filtre" == "filtrez" ]] |
---|
| 361 | then |
---|
| 362 | FILTRE_PATH=${LIBFGCM}/$filtre |
---|
| 363 | fi |
---|
| 364 | |
---|
[1279] | 365 | if [[ "$chimie" == "INCA" ]] |
---|
| 366 | then |
---|
| 367 | CPP_KEY="$CPP_KEY INCA" |
---|
[4426] | 368 | INCLUDE="$INCLUDE ${INCA_INCDIR}" |
---|
| 369 | LIB="$LIB ${INCA_LIBDIR} ${INCA_LIB}" |
---|
[1279] | 370 | fi |
---|
[783] | 371 | |
---|
[3924] | 372 | if [[ "$isotopes" == "true" ]] |
---|
| 373 | then |
---|
| 374 | CPP_KEY="$CPP_KEY ISO" |
---|
| 375 | fi |
---|
| 376 | |
---|
| 377 | if [[ "$isoverif" == "true" ]] |
---|
| 378 | then |
---|
| 379 | CPP_KEY="$CPP_KEY ISOVERIF" |
---|
| 380 | fi |
---|
| 381 | |
---|
| 382 | if [[ "$diagiso" == "true" ]] |
---|
| 383 | then |
---|
| 384 | CPP_KEY="$CPP_KEY DIAGISO" |
---|
| 385 | fi |
---|
| 386 | |
---|
| 387 | if [[ "$isotrac" == "true" ]] |
---|
| 388 | then |
---|
| 389 | CPP_KEY="$CPP_KEY ISOTRAC" |
---|
| 390 | fi |
---|
| 391 | |
---|
[1279] | 392 | if [[ "$couple" != "false" ]] |
---|
| 393 | then |
---|
[1965] | 394 | if [[ "$couple" == "MPI1" ]] |
---|
| 395 | then |
---|
| 396 | CPP_KEY="$CPP_KEY CPP_COUPLE" |
---|
| 397 | export OASIS_INCDIR=$LMDGCM/../../prism/X64/build/lib/psmile.MPI1 |
---|
| 398 | export OASIS_LIBDIR=$LMDGCM/../../prism/X64/lib |
---|
| 399 | INCLUDE="$INCLUDE -I${OASIS_INCDIR}" |
---|
| 400 | LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.MPI1 -lmpp_io" |
---|
| 401 | else |
---|
| 402 | CPP_KEY="$CPP_KEY CPP_COUPLE CPP_OMCT" |
---|
[4426] | 403 | INCLUDE="$INCLUDE ${OASIS_INCDIR}" |
---|
| 404 | LIB="$LIB ${OASIS_LIBDIR} -lpsmile.MPI1 -lscrip -lmct -lmpeu" |
---|
[1965] | 405 | fi |
---|
[1279] | 406 | fi |
---|
[783] | 407 | |
---|
[1279] | 408 | if [[ "$parallel" == "mpi" ]] |
---|
| 409 | then |
---|
| 410 | CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI" |
---|
| 411 | PARA_FFLAGS="%MPI_FFLAGS" |
---|
| 412 | PARA_LD="%MPI_LD" |
---|
| 413 | elif [[ "$parallel" == "omp" ]] |
---|
| 414 | then |
---|
| 415 | CPP_KEY="$CPP_KEY CPP_PARA CPP_OMP" |
---|
| 416 | PARA_FFLAGS="%OMP_FFLAGS" |
---|
| 417 | PARA_LD="%OMP_LD" |
---|
| 418 | elif [[ "$parallel" == "mpi_omp" ]] |
---|
| 419 | then |
---|
| 420 | CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI CPP_OMP" |
---|
| 421 | PARA_FFLAGS="%MPI_FFLAGS %OMP_FFLAGS" |
---|
| 422 | PARA_LD="%MPI_LD %OMP_LD" |
---|
| 423 | fi |
---|
[783] | 424 | |
---|
[1279] | 425 | if [[ ( "$parallel" == "omp" || "$parallel" == "mpi_omp" ) \ |
---|
| 426 | && "$compil_mod" == "debug" ]] |
---|
| 427 | then |
---|
| 428 | echo "Usually, parallelization with OpenMP requires some optimization." |
---|
| 429 | echo "We suggest switching to \"-dev\"." |
---|
| 430 | fi |
---|
[783] | 431 | |
---|
[4283] | 432 | if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" -o "$veget" = "orchidee2.1" -o "$veget" = "orchideetrunk" ] |
---|
[1279] | 433 | then |
---|
[4426] | 434 | echo "doing orchidee" |
---|
[1811] | 435 | #NB: option 'true': for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6 |
---|
| 436 | # For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments |
---|
| 437 | # option orchidee1.9 : Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6 |
---|
[4426] | 438 | INCLUDE="${INCLUDE} ${ORCH_INCDIR}" |
---|
[1772] | 439 | CPP_KEY="$CPP_KEY CPP_VEGET" |
---|
[1811] | 440 | # temporary, for Orchidee versions 1.9.* (before openmp activation) |
---|
| 441 | if [[ "$veget" == "orchidee1.9" ]] ; then |
---|
| 442 | CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP" |
---|
| 443 | fi |
---|
| 444 | if [[ "$veget" == "orchidee2.0" ]] ; then |
---|
[4426] | 445 | orch_libs="-lsechiba -lparameters -lstomate -lparallel -lorglob -lorchidee" |
---|
[3435] | 446 | CPP_KEY="$CPP_KEY ORCHIDEE_NOUNSTRUCT" |
---|
| 447 | elif [[ "$veget" == "orchidee2.1" ]] ; then |
---|
[4283] | 448 | CPP_KEY="$CPP_KEY ORCHIDEE_NOLIC" |
---|
[4426] | 449 | orch_libs="-lsechiba -lparameters -lstomate -lparallel -lorglob -lorchidee" |
---|
[4283] | 450 | elif [[ "$veget" == "orchideetrunk" ]] ; then |
---|
[4426] | 451 | orch_libs="-lorchidee" |
---|
[1811] | 452 | else |
---|
[4426] | 453 | orch_libs="-lsechiba -lparameters -lstomate -lparallel -lorglob" |
---|
[1811] | 454 | fi |
---|
[4426] | 455 | LIB="${LIB} ${ORCH_LIBDIR} ${orch_libs}" |
---|
| 456 | # for lib in ${orch_libs} ; do |
---|
| 457 | # if [ -f ${ORCH_LIBDIR#-L}/lib${LIBPREFIX}$lib.a ] ; then |
---|
| 458 | # LIB="${LIB} -l${LIBPREFIX}$lib " |
---|
| 459 | # fi |
---|
| 460 | # done |
---|
| 461 | echo "orchidee lib" |
---|
| 462 | echo ${LIB} |
---|
[1811] | 463 | elif [[ "$veget" != "false" ]] ; then |
---|
[1772] | 464 | echo "Option -v $veget does not exist" |
---|
| 465 | echo "Use ./makelmdz_fcm -h for more information" |
---|
| 466 | exit |
---|
[1279] | 467 | fi |
---|
[783] | 468 | |
---|
[5259] | 469 | INLANDSIS_PATH="$LIBFGCM/phy${physique}/inlandsis" |
---|
| 470 | if [[ "$inlandsis" == "true" ]]; then |
---|
[3793] | 471 | CPP_KEY="$CPP_KEY CPP_INLANDSIS" |
---|
| 472 | fi |
---|
| 473 | |
---|
[3908] | 474 | if [[ "$rad" == "rrtm" ]] |
---|
[1990] | 475 | then |
---|
| 476 | CPP_KEY="$CPP_KEY CPP_RRTM" |
---|
[5036] | 477 | RAD_PATH="$LIBFGCM/phy${physique}/rrtm" |
---|
[1990] | 478 | fi |
---|
[3908] | 479 | if [[ "$rad" == "ecrad" ]] |
---|
| 480 | then |
---|
| 481 | CPP_KEY="$CPP_KEY CPP_ECRAD" |
---|
[5036] | 482 | RAD_PATH="$LIBFGCM/phy${physique}/ecrad" |
---|
[3908] | 483 | fi |
---|
[1990] | 484 | |
---|
[5253] | 485 | DUST_PATH="$LIBFGCM/phy${physique}/Dust" |
---|
| 486 | if [[ "$dust" == "true" ]]; then |
---|
[2631] | 487 | CPP_KEY="$CPP_KEY CPP_Dust" |
---|
| 488 | fi |
---|
| 489 | |
---|
[5252] | 490 | STRATAER_PATH="$LIBFGCM/phy${physique}/StratAer" |
---|
| 491 | if [[ "$strataer" == "true" ]]; then |
---|
[2690] | 492 | CPP_KEY="$CPP_KEY CPP_StratAer" |
---|
| 493 | fi |
---|
| 494 | |
---|
[4489] | 495 | INCLUDE="$INCLUDE ${NETCDF95_INCDIR}" |
---|
| 496 | LIB="$LIB ${NETCDF95_LIBDIR} ${NETCDF95_LIB}" |
---|
| 497 | |
---|
[1279] | 498 | if [[ $io == ioipsl ]] |
---|
| 499 | then |
---|
| 500 | CPP_KEY="$CPP_KEY CPP_IOIPSL" |
---|
[4426] | 501 | INCLUDE="$INCLUDE ${IOIPSL_INCDIR}" |
---|
| 502 | LIB="$LIB ${IOIPSL_LIBDIR} ${IOIPSL_LIB}" |
---|
[2097] | 503 | elif [[ $io == mix ]] |
---|
[1897] | 504 | then |
---|
| 505 | # For now, xios implies also using ioipsl |
---|
| 506 | CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS" |
---|
[4426] | 507 | INCLUDE="$INCLUDE ${IOIPSL_INCDIR} ${XIOS_INCDIR}" |
---|
| 508 | LIB="$LIB ${IOIPSL_LIBDIR} ${IOIPSL_LIB} ${XIOS_LIBDIR} ${XIOS_LIB}" |
---|
[2097] | 509 | elif [[ $io == xios ]] |
---|
| 510 | then |
---|
| 511 | # For now, xios implies also using ioipsl |
---|
| 512 | CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS CPP_IOIPSL_NO_OUTPUT" |
---|
[4426] | 513 | INCLUDE="$INCLUDE ${IOIPSL_INCDIR} ${XIOS_INCDIR}" |
---|
| 514 | LIB="$LIB ${IOIPSL_LIBDIR} ${IOIPSL_LIB} ${XIOS_LIBDIR} ${XIOS_LIB}" |
---|
[1279] | 515 | fi |
---|
[1897] | 516 | |
---|
[1279] | 517 | if [[ "$cosp" == "true" ]] |
---|
| 518 | then |
---|
| 519 | CPP_KEY="$CPP_KEY CPP_COSP" |
---|
[2239] | 520 | COSP_PATH="$LIBFGCM/phylmd/cosp" |
---|
[1279] | 521 | # LIB="${LIB} -l${LIBPREFIX}cosp" |
---|
| 522 | fi |
---|
[783] | 523 | |
---|
[3358] | 524 | if [[ "$cosp2" == "true" ]] |
---|
| 525 | then |
---|
| 526 | CPP_KEY="$CPP_KEY CPP_COSP2" |
---|
| 527 | COSP_PATH="$LIBFGCM/phylmd/cosp2" |
---|
| 528 | # LIB="${LIB} -l${LIBPREFIX}cosp2" |
---|
| 529 | fi |
---|
| 530 | |
---|
[3491] | 531 | if [[ "$cospv2" == "true" ]] |
---|
| 532 | then |
---|
| 533 | CPP_KEY="$CPP_KEY CPP_COSPV2" |
---|
| 534 | COSP_PATH="$LIBFGCM/phylmd/cospv2" |
---|
| 535 | # LIB="${LIB} -l${LIBPREFIX}cosp2" |
---|
| 536 | fi |
---|
[3358] | 537 | |
---|
[4247] | 538 | if [[ "$cplocninca" == "TRUE" ]] |
---|
| 539 | then |
---|
| 540 | CPP_KEY="${CPP_KEY} CPP_CPLOCNINCA" |
---|
| 541 | fi |
---|
[3491] | 542 | |
---|
| 543 | |
---|
[1551] | 544 | INCLUDE="$INCLUDE ${NETCDF_INCDIR}" |
---|
[4426] | 545 | LIB="$LIB ${NETCDF_LIBDIR} ${NETCDF_LIB}" |
---|
[1551] | 546 | |
---|
[783] | 547 | ######################################################################## |
---|
| 548 | # calcul du nombre de dimensions |
---|
| 549 | ######################################################################## |
---|
| 550 | |
---|
| 551 | |
---|
[1279] | 552 | dim_full=$dim |
---|
| 553 | dim=`echo $dim | sed -e 's/[^0-9]/ /g'` |
---|
| 554 | set $dim |
---|
| 555 | dimc=$# |
---|
[783] | 556 | echo calcul de la dimension |
---|
| 557 | echo dim $dim |
---|
| 558 | echo dimc $dimc |
---|
| 559 | |
---|
| 560 | |
---|
| 561 | ######################################################################## |
---|
| 562 | # Gestion des dimensions du modele. |
---|
[1114] | 563 | # on cree ou remplace le fichier des dimensions |
---|
[783] | 564 | ######################################################################## |
---|
| 565 | |
---|
[1695] | 566 | cd $LIBFGCM/grid |
---|
[5271] | 567 | if [[ -f dimensions_mod.f90 ]] |
---|
[1695] | 568 | then |
---|
[4096] | 569 | if [[ $force_compile == true ]] |
---|
| 570 | then |
---|
[5271] | 571 | \rm -f $LIBFGCM/grid/dimensions_mod.f90 |
---|
[4096] | 572 | else |
---|
[5048] | 573 | echo "WARNING: you are probably already compiling the model somewhere else." |
---|
| 574 | echo "Wait until the first compilation is finished before launching this one." |
---|
| 575 | echo "If you are sure that you are not compiling elsewhere, " |
---|
| 576 | echo "If you are sure that you are not compiling elsewhere, then" |
---|
[5271] | 577 | echo rm -f $LIBFGCM/grid/dimensions_mod.f90 |
---|
[5048] | 578 | echo "before reruning the compilation" |
---|
| 579 | echo "or run makelmdz_fcm with option -force_compile" |
---|
| 580 | exit 1 |
---|
[4096] | 581 | fi |
---|
[1695] | 582 | fi |
---|
| 583 | |
---|
| 584 | |
---|
[5048] | 585 | |
---|
[783] | 586 | cd $LIBFGCM/grid/dimension |
---|
[1114] | 587 | ./makdim $dim |
---|
[5271] | 588 | cat $LIBFGCM/grid/dimensions_mod.f90 |
---|
[783] | 589 | cd $LMDGCM |
---|
| 590 | |
---|
| 591 | |
---|
| 592 | ######################################################################## |
---|
| 593 | # Differentes dynamiques (3d, 2d, 1d) |
---|
| 594 | ######################################################################## |
---|
| 595 | |
---|
[1279] | 596 | dimension=`echo $dim | wc -w` |
---|
[783] | 597 | echo dimension $dimension |
---|
| 598 | |
---|
[2239] | 599 | if (( $dimension == 1 )) |
---|
| 600 | then |
---|
| 601 | CPP_KEY="$CPP_KEY CPP_1D" |
---|
| 602 | ## no filtre in 1d: |
---|
| 603 | FILTRE_PATH=$LMDGCM/.void_dir |
---|
| 604 | ## no need to compile all routines in dyn3d_common either: |
---|
| 605 | DYN_COMMON_PATH=$LMDGCM/.void_dir |
---|
| 606 | ## no need to compile all routines in dynlmdz_phy... ; |
---|
| 607 | ## (because key ones are included in 1D main program) |
---|
| 608 | DYN_PHYS_PATH=$LMDGCM/.void_dir |
---|
[2242] | 609 | DYN_PHYS_SUB_PATH=$LMDGCM/.void_dir |
---|
[2239] | 610 | fi |
---|
| 611 | |
---|
[783] | 612 | ###################################################################### |
---|
| 613 | # Traitement special pour le nouveau rayonnement de Laurent Li. |
---|
| 614 | # ---> YM desactive pour le traitemement en parallele |
---|
| 615 | ###################################################################### |
---|
| 616 | |
---|
[1279] | 617 | #if [[ -f $libf/phy$physique/raddim.h ]] |
---|
| 618 | #then |
---|
| 619 | # if [[ -f $libf/phy$physique/raddim.$dimh.h ]] |
---|
| 620 | #then |
---|
[783] | 621 | # \rm -f $libf/phy$physique/raddim.h |
---|
| 622 | # cp -p $libf/phy$physique/raddim.$dimh.h $libf/phy$physique/raddim.h |
---|
| 623 | # echo $libf/phy$physique/raddim.$dimh.h |
---|
| 624 | # cat $libf/phy$physique/raddim.h |
---|
| 625 | # else |
---|
| 626 | # echo On peut diminuer la taille de l executable en creant |
---|
| 627 | # echo le fichier $libf/phy$physique/raddim.$dimh.h |
---|
| 628 | # \cp -p $libf/phy$physique/raddim.defaut.h $libf/phy$physique/raddim.h |
---|
[1279] | 629 | # fi |
---|
| 630 | #fi |
---|
[783] | 631 | |
---|
| 632 | ###################################################################### |
---|
| 633 | # Gestion du filtre qui n'existe qu'en 3d. |
---|
| 634 | ###################################################################### |
---|
| 635 | |
---|
[1279] | 636 | if (( `expr $dimc \> 2` == 1 )) |
---|
| 637 | then |
---|
| 638 | filtre="FILTRE=$filtre" |
---|
[783] | 639 | else |
---|
[1279] | 640 | filtre="FILTRE= L_FILTRE= " |
---|
| 641 | fi |
---|
[783] | 642 | echo MACRO FILTRE $filtre |
---|
| 643 | |
---|
| 644 | echo $dimc |
---|
| 645 | |
---|
| 646 | |
---|
| 647 | |
---|
| 648 | ###################################################################### |
---|
| 649 | # Creation du suffixe de la configuration |
---|
| 650 | ###################################################################### |
---|
| 651 | |
---|
| 652 | |
---|
[1279] | 653 | SUFF_NAME=_${dim_full} |
---|
[4186] | 654 | SUFF_NAME=${SUFF_NAME}_phy${physique}_${rad} |
---|
[783] | 655 | |
---|
[1279] | 656 | if [[ "$parallel" != "none" ]] |
---|
| 657 | then |
---|
| 658 | SUFF_NAME=${SUFF_NAME}_para |
---|
[1680] | 659 | DYN=dyn${dimc}d${paramem} |
---|
| 660 | if [[ "$paramem" == "mem" ]] |
---|
| 661 | then |
---|
[2202] | 662 | SUFF_NAME=${SUFF_NAME}_${paramem} |
---|
| 663 | else |
---|
| 664 | echo "The version of the dynamics in dyn3dpar is no longer updated." |
---|
| 665 | echo "You should use option \"-mem\"." |
---|
| 666 | exit 1 |
---|
[1680] | 667 | fi |
---|
[783] | 668 | else |
---|
[1279] | 669 | SUFF_NAME=${SUFF_NAME}_seq |
---|
[2239] | 670 | if (( $dimension == 1 )) |
---|
| 671 | then |
---|
| 672 | # dynamics-related routines in"dyn1d" subdirectory of phy${physique} |
---|
| 673 | DYN=phy${physique}/dyn1d |
---|
| 674 | else |
---|
| 675 | DYN=dyn${dimc}d |
---|
| 676 | fi |
---|
[1279] | 677 | fi |
---|
[783] | 678 | |
---|
[1772] | 679 | if [[ $veget != "false" ]] |
---|
[1279] | 680 | then |
---|
| 681 | SUFF_NAME=${SUFF_NAME}_orch |
---|
| 682 | fi |
---|
[783] | 683 | |
---|
[3804] | 684 | if [[ $dust == "true" ]] |
---|
| 685 | then |
---|
| 686 | SUFF_NAME=${SUFF_NAME}_spla |
---|
| 687 | fi |
---|
| 688 | |
---|
[1279] | 689 | if [[ $couple != "false" ]] |
---|
| 690 | then |
---|
| 691 | SUFF_NAME=${SUFF_NAME}_couple |
---|
| 692 | fi |
---|
[783] | 693 | |
---|
[1279] | 694 | if [[ $chimie == "INCA" ]] |
---|
| 695 | then |
---|
| 696 | SUFF_NAME=${SUFF_NAME}_inca |
---|
| 697 | fi |
---|
[783] | 698 | |
---|
[3924] | 699 | if [[ "$isotopes" == "true" ]] |
---|
[2358] | 700 | then |
---|
[3924] | 701 | SUFF_NAME=${SUFF_NAME}_iso |
---|
| 702 | fi |
---|
| 703 | if [[ "$isoverif" == "true" ]] |
---|
| 704 | then |
---|
| 705 | SUFF_NAME=${SUFF_NAME}_isoverif |
---|
| 706 | fi |
---|
| 707 | if [[ "$isotrac" == "true" ]] |
---|
| 708 | then |
---|
| 709 | SUFF_NAME=${SUFF_NAME}_isotrac |
---|
| 710 | fi |
---|
| 711 | if [[ "$diagiso" == "true" ]] |
---|
| 712 | then |
---|
| 713 | SUFF_NAME=${SUFF_NAME}_diagiso |
---|
| 714 | fi |
---|
| 715 | |
---|
[3925] | 716 | if [[ $libphy == "true" ]] |
---|
[3924] | 717 | then |
---|
[2358] | 718 | # special case where we compile only the physics |
---|
| 719 | DYN=$LMDGCM/.void_dir |
---|
| 720 | DYN_COMMON_PATH=$LMDGCM/.void_dir |
---|
| 721 | FILTRE_PATH=$LMDGCM/.void_dir |
---|
| 722 | DYN_PHYS_PATH=$LMDGCM/.void_dir |
---|
| 723 | DYN_PHYS_SUB_PATH=$LMDGCM/.void_dir |
---|
[5340] | 724 | GRID_PATH=$LMDGCM/.void_dir |
---|
[2358] | 725 | #and there is no main program to generate |
---|
| 726 | code="" |
---|
| 727 | SUFF_NAME="" |
---|
| 728 | else |
---|
| 729 | SUFF_NAME=${SUFF_NAME}.e |
---|
| 730 | fi |
---|
| 731 | |
---|
[783] | 732 | cd $LMDGCM |
---|
[1279] | 733 | config_fcm="config.fcm" |
---|
[783] | 734 | rm -f $config_fcm |
---|
| 735 | touch $config_fcm |
---|
[5313] | 736 | rm -f bin/${code}${SUFF_NAME} |
---|
| 737 | rm -f bin/${code}.e |
---|
[783] | 738 | rm -f arch.fcm |
---|
[1279] | 739 | rm -f arch.opt |
---|
[783] | 740 | |
---|
| 741 | echo "%ARCH $arch" >> $config_fcm |
---|
| 742 | echo "%INCDIR $INCLUDE" >> $config_fcm |
---|
| 743 | echo "%LIB $LIB" >> $config_fcm |
---|
| 744 | echo "%ROOT_PATH $PWD" >> $config_fcm |
---|
| 745 | echo "%LIBF $LIBFGCM" >> $config_fcm |
---|
| 746 | echo "%LIBO $LIBOGCM" >> $config_fcm |
---|
| 747 | echo "%DYN $DYN" >> $config_fcm |
---|
[2239] | 748 | echo "%DYN_COMMON $DYN_COMMON_PATH" >> $config_fcm |
---|
[2326] | 749 | echo "%PHY_COMMON $PHY_COMMON_PATH" >> $config_fcm |
---|
[2239] | 750 | echo "%FILTRE $FILTRE_PATH" >> $config_fcm |
---|
[783] | 751 | echo "%PHYS phy${physique}" >> $config_fcm |
---|
[2239] | 752 | echo "%DYN_PHYS $DYN_PHYS_PATH" >> $config_fcm |
---|
[2242] | 753 | echo "%DYN_PHYS_SUB $DYN_PHYS_SUB_PATH" >> $config_fcm |
---|
[5340] | 754 | echo "%GRID $GRID_PATH" >> $config_fcm |
---|
[3908] | 755 | echo "%RAD $RAD_PATH" >> $config_fcm |
---|
[2631] | 756 | echo "%DUST $DUST_PATH" >> $config_fcm |
---|
[2690] | 757 | echo "%STRATAER $STRATAER_PATH" >> $config_fcm |
---|
[3793] | 758 | echo "%INLANDSIS $INLANDSIS_PATH" >> $config_fcm |
---|
[1327] | 759 | echo "%COSP $COSP_PATH" >> $config_fcm |
---|
[783] | 760 | echo "%CPP_KEY $CPP_KEY" >> $config_fcm |
---|
| 761 | echo "%EXEC $code" >> $config_fcm |
---|
| 762 | echo "%SUFF_NAME $SUFF_NAME" >> $config_fcm |
---|
[1002] | 763 | echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> $config_fcm |
---|
| 764 | echo "%PARA_FFLAGS $PARA_FFLAGS" >> $config_fcm |
---|
| 765 | echo "%PARA_LD $PARA_LD" >> $config_fcm |
---|
[1279] | 766 | echo "%EXT_SRC $EXT_SRC" >> $config_fcm |
---|
[783] | 767 | |
---|
[4773] | 768 | if [[ "$rad" == "ecrad" ]] |
---|
| 769 | then |
---|
| 770 | \cp bld.cfg.ecrad bld.cfg |
---|
| 771 | else |
---|
| 772 | \cp bld.cfg.rrtm bld.cfg |
---|
| 773 | fi |
---|
[1002] | 774 | |
---|
[1137] | 775 | ln -s arch/arch-${arch}.fcm arch.fcm |
---|
[1279] | 776 | if test -f arch/arch-${arch}.opt && [ $compil_mod = "prod" ] |
---|
| 777 | then |
---|
| 778 | ln -s arch/arch-${arch}.opt arch.opt |
---|
| 779 | else |
---|
| 780 | ln -s .void_file arch.opt |
---|
| 781 | fi |
---|
| 782 | |
---|
[4103] | 783 | set +e |
---|
| 784 | |
---|
[1002] | 785 | rm -f $LIBOGCM/${arch}${SUFF_NAME}/.config/fcm.bld.lock |
---|
[1802] | 786 | ./build_gcm ${fcm_path} -j $job $full |
---|
[4103] | 787 | build_status=$? |
---|
[783] | 788 | |
---|
[1279] | 789 | rm -rf tmp_src |
---|
| 790 | rm -rf config |
---|
[783] | 791 | ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config config |
---|
[2358] | 792 | ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/ppsrc tmp_src |
---|
[1695] | 793 | |
---|
[5271] | 794 | if [[ -r $LIBFGCM/grid/dimensions_mod.f90 ]] |
---|
[1695] | 795 | then |
---|
| 796 | # Cleanup: remove dimension.h file |
---|
[5271] | 797 | \rm -f $LIBFGCM/grid/dimensions_mod.f90 |
---|
[1695] | 798 | fi |
---|
[4103] | 799 | |
---|
[4918] | 800 | # build netcdf95 library necessary for the makelmdz script |
---|
| 801 | if [[ $build_status = 0 ]] |
---|
| 802 | then |
---|
[5313] | 803 | cp bin/${code}${SUFF_NAME} bin/${code}.e |
---|
[4918] | 804 | if [[ ! -d tools/netcdf95/include ]] |
---|
| 805 | then |
---|
| 806 | mkdir tools/netcdf95/include tools/netcdf95/lib |
---|
| 807 | cp config/inc/netcdf95.mod config/inc/nf95_*mod tools/netcdf95/include |
---|
| 808 | cp config/obj/netcdf95.o config/obj/nf95_*o config/obj/check_start_count_m.o tools/netcdf95/lib |
---|
| 809 | cd tools/netcdf95/lib; ar rv libnetcdf95.a *.o; ranlib libnetcdf95.a |
---|
| 810 | cd - |
---|
| 811 | fi |
---|
| 812 | fi |
---|
| 813 | |
---|
[4103] | 814 | exit $build_status |
---|