Changeset 235 for trunk/MESOSCALE/LMD_MM_MARS/SIMU/runmeso
- Timestamp:
- Jul 20, 2011, 3:07:02 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SIMU/runmeso
r234 r235 210 210 # ACTIONS # 211 211 ########### 212 #echo '***********************'213 #echo '**** Steps ****'214 #echo '***********************'215 212 echo '**********************************************' 216 echo "** This script will compile the model then :" 217 echo "** <1> Prepare GCM inputs <-1> to skip compilation" 218 echo "** <2> Perform WPS interpolations <-2> to skip compilation" 219 echo "** <3> Execute real.exe <-3> to skip compilation" 220 echo "** <4> Execute wrf.exe <-4> to skip compilation" 221 echo "** <5> Exit" 222 echo "** <9> Oops ! Exit now please." 213 echo "** The runmeso script does it for you !" 223 214 echo '**********************************************' 224 #echo "Start at which step ? (1-4)" ; read step 225 echo "Where shall we start ? 1, 2, 3, 4, 5 or 9" ; read step 215 echo "** Step 0: compile the model if not done yet" 216 echo "** Step 1: run GCM and prepare inputs" 217 echo "** Step 2: interpolate on domain horizontal grid" 218 echo "** Step 3: interpolate on chosen vertical levels" 219 echo "** Step 4: run the model" 220 echo "************************* Please make a choice" 221 echo " 1 --> Perform steps 0 1 2 3 4 [ -1: step 0 skipped]" 222 echo " 2 --> Perform steps 0 2 3 4 [ -2: step 0 skipped]" 223 echo " 3 --> Perform steps 0 3 4 [ -3: step 0 skipped]" 224 echo " 4 --> Perform steps 0 4 [ -4: step 0 skipped]" 225 echo "11 --> Perform steps 0 1 2 3 [-11: step 0 skipped]" 226 echo "12 --> Perform steps 0 2 3 [-12: step 0 skipped]" 227 echo "13 --> Perform steps 0 3 [-13: step 0 skipped]" 228 echo " 0 --> Perform step 0 only" 229 echo "99 --> Oops ! Exit now please." 230 echo '**********************************************' 231 echo "What is your choice? " ; read step 226 232 if [[ ${step} -lt 0 ]] 227 233 then … … 231 237 fi 232 238 case ${step} in 233 9) exit ;; 234 5) gcmstep=0 ; wpsstep=0 ; realstep=0 ; wrfstep=0 ;; 235 1) gcmstep=1 ; wpsstep=1 ; realstep=1 ; wrfstep=1 ;; 236 2) gcmstep=0 ; wpsstep=1 ; realstep=1 ; wrfstep=1 ;; 237 3) gcmstep=0 ; wpsstep=0 ; realstep=1 ; wrfstep=1 ;; 238 4) gcmstep=0 ; wpsstep=0 ; realstep=0 ; wrfstep=1 ;; 239 *) echo "** I guess you do not know what to do. Let's start from the beginning." 240 gcmstep=1 ; wpsstep=1 ; realstep=1 ; wrfstep=1 ;; 239 99) exit ;; 240 0) gcmstep=0 ; wpsstep=0 ; realstep=0 ; wrfstep=0 ;; 241 1) gcmstep=1 ; wpsstep=1 ; realstep=1 ; wrfstep=1 ;; 242 2) gcmstep=0 ; wpsstep=1 ; realstep=1 ; wrfstep=1 ;; 243 3) gcmstep=0 ; wpsstep=0 ; realstep=1 ; wrfstep=1 ;; 244 4) gcmstep=0 ; wpsstep=0 ; realstep=0 ; wrfstep=1 ;; 245 11) gcmstep=1 ; wpsstep=1 ; realstep=1 ; wrfstep=0 ;; 246 12) gcmstep=0 ; wpsstep=1 ; realstep=1 ; wrfstep=0 ;; 247 13) gcmstep=0 ; wpsstep=0 ; realstep=1 ; wrfstep=0 ;; 248 *) echo "** I guess you do not know what to do. Let's start from the beginning." 249 gcmstep=1 ; wpsstep=1 ; realstep=1 ; wrfstep=1 ;; 241 250 esac 242 251 … … 262 271 if [[ ${compilo} -eq 3 || ${compilo} -eq 5 ]] 263 272 then 264 echo How many processors ? 1, 2, 4, 6, 8, 12, 16, 20, 24, 32; read numproc273 echo How many processors ? e.g. 1, 2, 4, 6, 8, 12, 16, 20, 24, 32, 64, 128 ; read numproc 265 274 else 266 275 numproc=1 … … 446 455 if [[ ${newphys} -eq 0 ]] 447 456 then 448 cd ${main_folder}'/LMDZ.MARS/ myGCM'457 cd ${main_folder}'/LMDZ.MARS/' 449 458 else 450 cd ${main_folder}'/LMDZ.MARS.new/ myGCM'459 cd ${main_folder}'/LMDZ.MARS.new/' 451 460 fi 452 #echo '(during the run, you might like to check domain settings in '${work_folder}'/WPS)' 461 if [[ ! ( -f "gcm.e" ) ]] 462 then 463 echo "Oops. There is no gcm.e, you shall compile the GCM first." 464 exit 465 fi 466 cd myGCM 453 467 echo ${daygcm} | ./launch_gcm 454 468 # … … 458 472 if [[ -f ${work_folder}/PREP_MARS/create_readmeteo.exe && -f ${work_folder}/PREP_MARS/readmeteo.exe ]] 459 473 then 460 cd ${work_folder}/PREP_MARS/ 461 ./compile_and_exec 474 ### This is now generic so PREP_MARS could be moved out of DIRCOMPs files 475 cd ${work_folder}/PREP_MARS/ 476 if [[ ${compilo} -eq 1 || ${compilo} -eq 3 ]] 477 then 478 ln -sf compile_pgf compile 479 fi 480 if [[ ${compilo} -eq 2 ]] 481 then 482 ln -sf compile_g95 compile 483 fi 484 if [[ ${compilo} -eq 4 || ${compilo} -eq 5 ]] 485 then 486 ln -sf compile_ifort compile 487 fi 488 if [[ ${compilo} -gt 5 ]] 489 then 490 echo "please adapt compile in PREP_MARS" 491 fi 492 ./compile_and_exec 462 493 #echo 1 | ./create_readmeteo.exe 463 494 #./readmeteo.exe < readmeteo.def … … 521 552 ln -sf ${simu_folder}/namelist.input . 522 553 ln -sf ${simu_folder}/real.exe . 554 ln -sf ${simu_folder}/levels . 523 555 rm -rf ${simu_folder}/met_em/wrfbdy* 2> /dev/null 524 556 rm -rf ${simu_folder}/met_em/wrfinput* 2> /dev/null 525 if [[ ${compilo} -eq 3 ]]557 if [[ ${compilo} -eq 3 || ${compilo} -eq 5 ]] 526 558 then 527 559 rm -rf ${simu_folder}/met_em/rsl.* 2> /dev/null
Note: See TracChangeset
for help on using the changeset viewer.