Changeset 1447 for trunk/MESOSCALE/LMD_MM_MARS/SIMU
- Timestamp:
- Jun 9, 2015, 12:53:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SIMU/meso_install.sh
r1445 r1447 4 4 # A. Spiga 09/06/2015 5 5 # Install the LMD mesoscale model 6 ################################ 7 # prerequisite: NETCDF and FCM 8 # -- FCM executable in PATH 9 # -- NETCDF env variable 6 10 ################################ 7 11 ## name of the folder … … 15 19 ## grid definition for GCM 16 20 dimgcm="64x48x35" 21 ## location of static data 22 webrepo="http://data.spiga.fr/mesoscale_model/STATIC_DATA/" 17 23 ################################ 18 24 … … 20 26 ## import settings and structure 21 27 ## ----------------------------- 22 svn export $where_is_svn"/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN" $name 28 echo "*** get structure" 29 rm -rf $name > /dev/null 2> /dev/null 30 svn -q export $where_is_svn"/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN" $name 23 31 refrepo=$PWD/$name 32 ## fill here user input to obtain independent script 33 case ${fortcom} in 34 "ifort") echo 1 > $refrepo/wpsin ; echo 5 > $refrepo/mesoin ; echo 1 >> $refrepo/mesoin ;; 35 esac 36 37 ## ---------------- 38 ## create code repo 39 ## ---------------- 40 echo "*** get SVN repository" 41 \rm $refrepo/code 42 svn -q co -N $where_is_svn $refrepo/code 43 44 ## ------------ 45 ## get GCM code 46 ## ------------ 47 echo "*** get GCM code" 48 cd $refrepo/code 49 svn -q update LMDZ.MARS 50 svn -q update LMDZ.COMMON 51 52 ## -------------- 53 ## compile IOIPSL 54 ## -------------- 55 log=$refrepo/code/logcompile_ioipsl 56 echo "*** compile IOIPSL: check progress in "$log 57 rm -rf $log ; touch $log 58 cd $refrepo/code/LMDZ.COMMON/ioipsl 59 ./install_ioipsl_$fortcom".bash" > $log 2> $log 24 60 25 61 ## ----------- 26 ## import code62 ## compile GCM 27 63 ## ----------- 28 \rm $refrepo/code 29 svn co -N $where_is_svn $refrepo/code 30 cd $refrepo/code 31 svn update LMDZ.MARS 32 svn update LMDZ.COMMON 33 svn update MESOSCALE 34 35 ## ------------------ 36 ## import static data 37 ## ------------------ 38 cd $refrepo/code/MESOSCALE/WPS_GEOG 39 wget http://data.spiga.fr/mesoscale_model/STATIC_DATA/albedo_TES.tar.gz 40 tar xzvf albedo_TES.tar.gz 41 \rm albedo_TES.tar.gz 42 wget http://data.spiga.fr/mesoscale_model/STATIC_DATA/mola_topo64.tar.gz 43 tar xzvf mola_topo64.tar.gz 44 \rm mola_topo64.tar.gz 45 wget http://data.spiga.fr/mesoscale_model/STATIC_DATA/thermal_TES.tar.gz 46 tar xzvf thermal_TES.tar.gz 47 \rm thermal_TES.tar.gz 48 49 ## -------- 50 ## make gcm 51 ## -------- 64 log=$refrepo/code/logcompile_gcm 65 echo "*** compile GCM: check progress in "$log 66 rm -rf $log ; touch $log 52 67 cd $refrepo/code/LMDZ.COMMON 53 ./makelmdz_fcm -cpp MESOINI -j 8 -s 2 -d $dimgcm -arch $machine "_"$fortcom -parallel mpi -p mars gcm68 ./makelmdz_fcm -cpp MESOINI -j 8 -s 2 -d $dimgcm -arch $machine$fortcom -parallel mpi -p mars gcm > $log 2> $log 54 69 cd $refrepo/gcm 55 70 \rm gcm.e 56 ln -sf $refrepo/code/LMDZ.COMMON/bin/gcm_$dimgcm _phymars_para.egcm.e71 ln -sf $refrepo/code/LMDZ.COMMON/bin/gcm_$dimgcm"_phymars_para.e" gcm.e 57 72 58 ## -------------- 59 ## make mesoscale 60 ## -------------- 73 ## ---------------------- 74 ## get and make mesoscale 75 ## ---------------------- 76 echo "*** get and compile mesoscale" 77 cd $refrepo/code 78 svn update MESOSCALE > /dev/null 61 79 cd $refrepo/code/MESOSCALE/LMD_MM_MARS 62 ./makemeso -p 63 \rm $refrepo/code_compiled 80 ls $refrepo/mesoin 81 if [[ "$?" == 0 ]] ; then 82 ./makemeso -p < $refrepo/mesoin 83 else 84 ./makemeso -p 85 fi 86 rm -rf $refrepo/mesoin 87 rm -rf $refrepo/code_compiled 64 88 ln -sf $refrepo/code/MESOSCALE/LMD_MM_MARS/LATEST $refrepo/code_compiled 65 89 … … 67 91 ## make ini&bdy tools in mesoscale 68 92 ## ------------------------------- 93 echo "*** compile initialization tools" 69 94 cd $refrepo/code_compiled 70 95 ln -sf $refrepo/code/MESOSCALE/LMD_MM_MARS/SRC/SCRIPTS/prepare_ini . 71 ./prepare_ini 96 ./prepare_ini > /dev/null 97 ## 72 98 cd $refrepo/code_compiled/PREP_MARS 73 99 ./compile"_"$fortcom 100 ## 74 101 cd $refrepo/code_compiled/WPS 75 ./configure 76 ./compile 102 ls $refrepo/wpsin 103 if [[ "$?" == 0 ]] ; then 104 ./configure < $refrepo/wpsin > /dev/null 2> /dev/null 105 else 106 ./configure 107 fi 108 rm -rf $refrepo/wpsin 109 rm -rf logcompile 110 ./compile > logcompile 2>&1 111 112 ## ------------------ 113 ## import static data 114 ## ------------------ 115 echo "*** get static data" 116 rm -rf $refrepo/data_static 117 svn co -q $where_is_svn/MESOSCALE/LMD_MM_MARS/WPS_GEOG $refrepo/data_static 118 cd $refrepo/data_static 119 rm -rf logdown 120 wget $webrepo"/albedo_TES.tar.gz" -a logdown 121 wget $webrepo"/mola_topo64.tar.gz" -a logdown 122 wget $webrepo"/thermal_TES.tar.gz" -a logdown 123 for fff in *.tar.gz; do 124 tar xzvf $fff > /dev/null 125 rm -rf $fff 126 done 127 128 ## ----- 129 ## check 130 ## ----- 131 echo "*** CHECKLIST:" 132 ls -lL $refrepo/gcm/gcm.e 133 ls -lL $refrepo/geogrid/geogrid.exe 134 ls -lL $refrepo/metgrid/metgrid.exe 135 ls -lL $refrepo/prep/readmeteo.exe 136 ls -lL $refrepo/data_static/albedo_TES 137 ls -lL $refrepo/real.exe 138 ls -lL $refrepo/wrf.exe 139
Note: See TracChangeset
for help on using the changeset viewer.