source: dynamico_lmdz/simple_physics/config/LMDZ/build_lmdz_phyparam.sh @ 4249

Last change on this file since 4249 was 4230, checked in by dubos, 5 years ago

simple_physics : able to run without plugins

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/bash
2
3function cmd_install_lmdz()
4{
5# Installation du modele en mode sequentiel
6    echo "cmd_install_lmdz"
7    wget -N http://www.lmd.jussieu.fr/~lmdz/pub/install_lmdz.sh
8    export LANG=C # fixes issue with sed on MaxOSX
9    sed -e 's/veget=1/veget=0/g' install_lmdz.sh > install_lmdz_patched.sh
10    sed -i .bak -e 's/makelmdz_fcm/echo makelmdz_fcm/g'  install_lmdz_patched.sh
11    rm -f *.bak
12    chmod +x install_lmdz_patched.sh
13    echo "Watch $PWD/install_lmdz_patched.log"
14    ./install_lmdz_patched.sh -parallel none -v $version >install_lmdz_patched.log 2>&1
15}
16
17function cmd_patch_lmdz()
18{
19# Modification du code source pour prendre en compte la physique
20# a 20 parametres
21    echo "cmd_patch_lmdz"
22    cd $LMDZ/libf
23    rm -rf phyparam dynphy_lonlat/phyparam
24    mkdir phyparam dynphy_lonlat/phyparam
25    cd phyparam
26    ln -s ../phydev/* .
27    rm -f physiq_mod.F90 # we have our own one in dynphy_lonlat
28    ln -sf $ROOT/phyparam/param/* .
29    ln -sf $ROOT/phyparam/physics/* .
30    cd ../dynphy_lonlat/phyparam
31    ln -s ../phydev/* .
32    ln -sf $ROOT/phyparam/dynphy_lonlat/* .
33    cd $LMDZ
34    echo "./makelmdz_fcm $* -rrtm false  -v false -arch local -j 8 -p param -d 32x32x39 gcm" > compile.sh
35    chmod +x compile.sh
36    ./compile.sh
37}
38
39function cmd_full()
40{
41    cd $LMDZ
42    echo "./makelmdz_fcm -rrtm false  -v false -arch local -j 8 -p param -d 32x32x39 -full gcm" > compile.sh
43    chmod +x compile.sh
44    ./compile.sh
45}
46
47function cmd_()
48{
49    rm -rf LMDZ$version install_lmdz.*
50    cmd_install_lmdz
51    cmd_patch_lmdz
52    echo "Now cd TEST_PARAM and execute ./gcm.e"
53}
54
55# On peut choisir la version de LMDZ a insitaller
56version=20191106.trunk
57LMDZ=$PWD/LMDZ$version/modipsl/modeles/LMDZ
58ROOT=$(cd -P ../.. ; pwd)
59
60CMD=$1
61shift
62cmd_$CMD $*
63
Note: See TracBrowser for help on using the repository browser.