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

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

simple_physics : start code cleanup

  • Property svn:executable set to *
File size: 1.5 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    ln -sf $ROOT/phyparam/param/* .
28    ln -sf $ROOT/phyparam/physics/* .
29    cd ../dynphy_lonlat/phyparam
30    ln -s ../phydev/* .
31    ln -sf $ROOT/phyparam/dynphy_lonlat/* .
32    cd $LMDZ
33    echo "./makelmdz_fcm -rrtm false  -v false -arch local -j 8 -p param -d 32x32x39 gcm" > compile.sh
34    chmod +x compile.sh
35    ./compile.sh
36}
37
38function cmd_()
39{
40    rm -rf LMDZ$version install_lmdz.*
41    cmd_install_lmdz
42    cmd_patch_lmdz
43    echo "Now cd TEST_PARAM and execute ./gcm.e"
44}
45
46# On peut choisir la version de LMDZ a insitaller
47version=20191106.trunk
48LMDZ=$PWD/LMDZ$version/modipsl/modeles/LMDZ
49ROOT=$(cd -P ../.. ; pwd)
50
51cmd_$1
Note: See TracBrowser for help on using the repository browser.