Changeset 1613 for trunk/MESOSCALE/LMD_MM_MARS/SIMU
- Timestamp:
- Sep 25, 2016, 4:20:20 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SIMU/meso_install.sh
r1568 r1613 17 17 18 18 meso="on" 19 while getopts "gn:h" options; do 19 gcm="" 20 while getopts "gn:hv:o" options; do 20 21 case $options in 21 22 n ) name="${OPTARG}";; 22 23 g ) meso="off";; 24 v ) version="${OPTARG}";; 25 o ) gcm="old" ;; 23 26 h ) echo " 24 27 # OPTIONS 25 # -n [name] --> name of the folder to be created 26 # -g --> only compile GCM (for tests) 28 # -n [name] --> name of the folder to be created 29 # -g --> only compile GCM (for tests) 30 # -v [# (or) HEAD] --> svn version 31 # -o --> old GCM+meso version 27 32 " ; exit ;; 28 33 esac … … 48 53 echo "*** get structure" 49 54 rm -rf $name > /dev/null 2> /dev/null 50 svn -q co $where_is_svn"/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN" $name55 svn -q co $where_is_svn"/MESOSCALE/LMD_MM_MARS/SIMU/MESORUN"$gcm $name 51 56 refrepo=$PWD/$name 52 57 ## fill here user input to obtain independent script 53 case ${fortcom} in 54 "ifort") echo 1 > $refrepo/wpsin ; echo 5 > $refrepo/mesoin ; echo 1 >> $refrepo/mesoin ;; 58 case ${fortcom}$gcm in 59 "ifort") echo 1 > $refrepo/wpsin ; echo 5 > $refrepo/mesoin ; echo 1 >> $refrepo/mesoin ;; 60 "ifortold") echo 1 > $refrepo/wpsin ; echo 5 > $refrepo/mesoin ; echo 1 >> $refrepo/mesoin ; 61 echo 61 >> $refrepo/mesoin ; echo 61 >> $refrepo/mesoin ; echo 61 >> $refrepo/mesoin ; 62 echo 1 >> $refrepo/mesoin ; echo 1 >> $refrepo/mesoin ;; 55 63 esac 56 64 … … 62 70 svn -q co -N $where_is_svn $refrepo/code 63 71 64 ## ------------ 65 ## get GCM code 66 ## ------------ 67 echo "*** get GCM code version "$version 68 cd $refrepo/code 69 svn -q update -r $version LMDZ.MARS 70 svn -q update -r $version LMDZ.COMMON 71 cd $refrepo/code/LMDZ.COMMON 72 svn -q co http://forge.ipsl.jussieu.fr/fcm/svn/PATCHED/FCM_V1.2 73 ln -sf FCM_V1.2/bin/fcm . 74 75 ## -------------- 76 ## compile IOIPSL 77 ## -------------- 78 log=$refrepo/code/logcompile_ioipsl 79 echo "*** compile IOIPSL: check progress in "$log 80 rm -rf $log ; touch $log 81 cd $refrepo/code/LMDZ.COMMON/ioipsl 82 ./install_ioipsl_$fortcom".bash" > $log 2> $log 83 84 ## ----------- 85 ## compile GCM 86 ## ----------- 87 log=$refrepo/code/logcompile_gcm 88 echo "*** compile GCM: check progress in "$log 89 rm -rf $log ; touch $log 90 cd $refrepo/code/LMDZ.COMMON 91 ./makelmdz_fcm -cpp MESOINI -j 8 -s 2 -d $dimgcm -arch $machine$fortcom -parallel mpi -p mars gcm > $log 2> $log 92 ./makelmdz_fcm -j 8 -s 2 -d $dimgcm -arch $machine$fortcom -p mars newstart >> $log 2>> $log 93 cd $refrepo/gcm 94 \rm gcm.e 95 ln -sf $refrepo/code/LMDZ.COMMON/bin/gcm_$dimgcm"_phymars_para.e" gcm.e 96 cd $refrepo/gcm/newstart 97 \rm newstart.e 98 ln -sf $refrepo/code/LMDZ.COMMON/bin/newstart_$dimgcm"_phymars_seq.e" newstart.e 72 ################################### 73 ################################### GCM 74 ################################### 75 if [[ "${gcm}" == "old" ]] 76 then 77 78 log=$refrepo/code/MESOSCALE/LMDZ.MARS/logcompile_gcm 79 echo "*** get and compile GCM code version "$version 80 cd $refrepo/code 81 svn update -r $version MESOSCALE > /dev/null 82 cd $refrepo/code/MESOSCALE/LMDZ.MARS 83 ln -sf makegcm_$fortcom makegcm 84 ./compile > $log 2> $log 85 86 else 87 88 ## ------------ 89 ## get GCM code 90 ## ------------ 91 echo "*** get GCM code version "$version 92 cd $refrepo/code 93 svn -q update -r $version LMDZ.MARS 94 svn -q update -r $version LMDZ.COMMON 95 cd $refrepo/code/LMDZ.COMMON 96 svn -q co http://forge.ipsl.jussieu.fr/fcm/svn/PATCHED/FCM_V1.2 97 ln -sf FCM_V1.2/bin/fcm . 98 99 ## -------------- 100 ## compile IOIPSL 101 ## -------------- 102 log=$refrepo/code/logcompile_ioipsl 103 echo "*** compile IOIPSL: check progress in "$log 104 rm -rf $log ; touch $log 105 cd $refrepo/code/LMDZ.COMMON/ioipsl 106 ./install_ioipsl_$fortcom".bash" > $log 2> $log 107 108 ## ----------- 109 ## compile GCM 110 ## ----------- 111 log=$refrepo/code/logcompile_gcm 112 echo "*** compile GCM: check progress in "$log 113 rm -rf $log ; touch $log 114 cd $refrepo/code/LMDZ.COMMON 115 ./makelmdz_fcm -cpp MESOINI -j 8 -s 2 -d $dimgcm -arch $machine$fortcom -parallel mpi -p mars gcm > $log 2> $log 116 ./makelmdz_fcm -j 8 -s 2 -d $dimgcm -arch $machine$fortcom -p mars newstart >> $log 2>> $log 117 cd $refrepo/gcm 118 \rm gcm.e 119 ln -sf $refrepo/code/LMDZ.COMMON/bin/gcm_$dimgcm"_phymars_para.e" gcm.e 120 cd $refrepo/gcm/newstart 121 \rm newstart.e 122 ln -sf $refrepo/code/LMDZ.COMMON/bin/newstart_$dimgcm"_phymars_seq.e" newstart.e 123 124 ## ------------------------ 125 ## make a minimal startbase 126 ## ------------------------ 127 echo "*** make a minimal startbase" 128 cd $refrepo/gcm/newstart 129 ./mini_startbase.sh 130 131 fi 132 133 ################################### 134 ################################### MESO 135 ################################### 99 136 100 137 ## START MESOSCALE PART … … 109 146 svn update -r $version MESOSCALE > /dev/null 110 147 cd $refrepo/code/MESOSCALE/LMD_MM_MARS 148 # 149 if [[ "${gcm}" == "old" ]] 150 then 151 option="" 152 else 153 option="-p mars_lmd_new" 154 fi 155 # 111 156 ls $refrepo/mesoin 112 157 if [[ "$?" == 0 ]] ; then 113 ./makemeso -p< $refrepo/mesoin114 else 115 ./makemeso -p158 ./makemeso $option < $refrepo/mesoin 159 else 160 ./makemeso $option 116 161 fi 117 162 rm -rf $refrepo/mesoin … … 169 214 ## END MESOSCALE PART 170 215 171 ## ------------------------172 ## make a minimal startbase173 ## ------------------------174 echo "*** make a minimal startbase"175 cd $refrepo/gcm/newstart176 ./mini_startbase.sh177 178 216 ## ----- 179 217 ## check
Note: See TracChangeset
for help on using the changeset viewer.