- Timestamp:
- Sep 21, 2021, 11:14:29 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install/install_lmdz.sh
r3973 r3983 64 64 svn="" 65 65 #version=trunk 66 version=20210 615.trunk66 version=20210730.trunk 67 67 getlmdzor=1 68 68 netcdf=1 # 1 for automatic installation … … 111 111 ## compile_with_fcm=1 : use makelmdz_fcm (1) or makelmdz (0) 112 112 compile_with_fcm=1 113 cosp=0 ; opt_cosp1="" 114 cosp=0 ; opt_cosp2="" 115 cosp= 0 ; opt_cospv2=""113 114 #Compilation with Cosp (cosp=NONE/v1/v2 ; default=NONE) 115 cosp=NONE 116 116 opt_cosp="" 117 117 … … 164 164 -gprof to compile with -pg to enable profiling with gprof 165 165 166 -cosp to compile with cosp(v1)166 -cosp to run without our with cospv1 or cospv2 [none/v1/v2] 167 167 168 -cosp2 to compile with cosp(1v2) 169 170 -cospv2 to compile with cosp(v2) 171 172 -rad RADIATIF : can be old, rrtm or ecrad radiatif code 168 -rad RADIATIF can be old, rrtm or ecrad radiatif code 173 169 174 170 -nofcm to compile without fcm … … 197 193 "-d") grid_resolution=$2 ; shift ; shift ;; 198 194 "-gprof") OPT_GPROF="-pg" ; shift ;; 199 "-cosp") cosp=1 ; opt_cosp1="-cosp true" ; shift ;; 200 "-cosp2") cosp2=1 ; opt_cosp2="-cosp2 true" ; shift ;; 201 "-cospv2") cospv2=1 ; opt_cospv2="-cospv2 true" ; shift ;; 195 "-cosp") cosp=$2 196 case $cosp in 197 "none"|"v1"|"v2") cosp=$2 ; shift ; shift ;; 198 *) echo Only none v1 v2 for cosp option ; exit 199 esac ;; 202 200 "-nofcm") compile_with_fcm=0 ; shift ;; 203 201 "-SCM") SCM=1 ; shift ;; … … 234 232 fi 235 233 234 if [ $cosp = v1 ] ; then 235 opt_cosp="-cosp true" 236 elif [ $cosp = v2 ] ; then 237 opt_cosp="-cospv2 true" 238 else 239 opt_cosp="" 240 fi 241 236 242 # Check on veget version 237 243 #if [ "$veget" != 'NONE' -a "$veget" != "CMIP6" -a "$veget" != +([0-9]) ] ; then … … 391 397 fi 392 398 393 ## We can't compile with -cosp and -cosp2394 if [ "$cosp" = 1 -a "$cosp2" = 1 ] ; then395 echo "Error, you can't run with cosp1 and cosp2"396 exit397 fi398 if [ "$cosp" = 1 ] ; then399 opt_cosp="$opt_cosp1"400 fi401 if [ "$cosp2" = 1 ] ; then402 opt_cosp="$opt_cosp2"403 fi404 if [ "$cospv2" = 1 ] ; then405 opt_cosp="$opt_cospv2"406 fi407 408 ## if also compiling XIOS, cosp must be activate to define axis in *.xml409 399 if [ "$with_xios" = "y" ] ; then 410 if [ "$cosp" = 0 -a "$cosp2" = 0 -a "$cospv2" = 0 ] ; then411 echo "Error, you must use -cosp option when compiling with -xios"412 echo "You need to call Cosp in physical first step to define axis variables"413 exit414 fi415 400 opt_makelmdz_xios="-io xios" 416 401 fi 417 402 418 if [ "$cosp v2" = 1-a "$with_xios" = "n" ] ; then403 if [ "$cosp" = "v2" -a "$with_xios" = "n" ] ; then 419 404 echo "Error, Cospv2 cannot run without Xios" 420 405 exit … … 1024 1009 rm -f compile.sh 1025 1010 echo resol=${grid_resolution} >> compile.sh 1026 if [ ${hostname:0:5} = jean- -a "$cospv2" = 1 ] ; then 1011 if [ ${hostname:0:5} = jean- -a "$cosp" = "v2" ] ; then 1012 echo ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige 1013 # ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige 1027 1014 echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh 1028 1015 echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm … … 1081 1068 tar xvf $bench.tar.gz 1082 1069 1083 if [ "$cosp" = 1 -o "$cosp2" = 1 -o "$cospv2" = 1] ; then1070 if [ "$cosp" = "v1" -o "$cosp" = "v2" ] ; then 1084 1071 cd BENCH${grid_resolution} 1085 1072 # copier les fichiers namelist input et output our COSP … … 1110 1097 cp ../DefLists/context_lmdz.xml . 1111 1098 cp ../DefLists/field_def_lmdz.xml . 1099 # A raffiner par la suite 1100 echo A FAIRE : Copier les *xml en fonction de l option cosp 1112 1101 cp ../DefLists/field_def_cosp*.xml . 1113 1102 cp ../DefLists/file_def_hist*xml . … … 1133 1122 1134 1123 #activer les sorties pour Cosp 1135 if [ "$cosp" = 1 -o "$cosp2" = 1] ; then1124 if [ "$cosp" = "v1" ] ; then 1136 1125 histfile=file_def_histdayCOSP_lmdz.xml 1137 1126 sed -e 's@enabled=".FALSE."@enabled=".TRUE."@' $histfile > tmp ; \mv -f tmp $histfile … … 1139 1128 sed -e 's@compression_level="2"@compression_level="0"@' $histfile > tmp ; \mv -f tmp $histfile 1140 1129 fi 1141 if [ "$cosp v2" = 1] ; then1130 if [ "$cosp" = "v2" ] ; then 1142 1131 histfile=file_def_histdayCOSPv2_lmdz.xml 1143 1132 sed -e 's@compression_level="2"@compression_level="0"@' $histfile > tmp ; \mv -f tmp $histfile 1144 1133 contextfile=context_lmdz.xml 1145 1134 sed -e 's@src="./file_def_histdayCOSP_lmdz.xml"@src="./file_def_histdayCOSPv2_lmdz.xml"@' $contextfile > tmp ; \mv -f tmp $contextfile 1135 sed -e 's@src="./file_def_histmthCOSP_lmdz.xml"@src="./file_def_histmthCOSPv2_lmdz.xml"@' $contextfile > tmp ; \mv -f tmp $contextfile 1136 sed -e 's@src="./file_def_histhfCOSP_lmdz.xml"@src="./file_def_histhfCOSPv2_lmdz.xml"@' $contextfile > tmp ; \mv -f tmp $contextfile 1146 1137 fieldfile=field_def_lmdz.xml 1147 1138 sed -e 's@field_def_cosp1.xml@field_def_cospv2.xml@' $fieldfile > tmp ; \mv -f tmp $fieldfile … … 1180 1171 echo "export OMP_NUM_THREADS=2" >> bench.sh 1181 1172 fi 1182 if [ "$cosp v2" = 1 -o "$cosp" = 1 -o "$cosp2" = 1] ; then1173 if [ "$cosp" = "v1" -o "$cosp" = "v2" ] ; then 1183 1174 if [ ${hostname:0:5} = jean- ] ; then 1184 1175 chmod +x ../arch.env
Note: See TracChangeset
for help on using the changeset viewer.