Ignore:
Timestamp:
Jul 20, 2011, 3:07:02 PM (14 years ago)
Author:
aslmd
Message:

MESOSCALE: corrected runmeso and gcm initialization so that it could be used on GNOME ifort cluster and virtually everywhere. changed choice numbering and added choices to initialize but not execute (good for job submission). Also corrected what was broken in the two previous commits on the version of the mesoscale model with old physics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SIMU/runmeso

    r234 r235  
    210210# ACTIONS #
    211211###########
    212 #echo '***********************'
    213 #echo '****     Steps     ****'
    214 #echo '***********************'
    215212echo '**********************************************'
    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."
     213echo "** The runmeso script does it for you !"
    223214echo '**********************************************'
    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
     215echo "** Step 0: compile the model if not done yet"
     216echo "** Step 1: run GCM and prepare inputs"
     217echo "** Step 2: interpolate on domain horizontal grid"
     218echo "** Step 3: interpolate on chosen vertical levels"
     219echo "** Step 4: run the model"
     220echo "************************* Please make a choice"
     221echo " 1 --> Perform steps 0 1 2 3 4  [ -1: step 0 skipped]"
     222echo " 2 --> Perform steps 0 2 3 4    [ -2: step 0 skipped]"
     223echo " 3 --> Perform steps 0 3 4      [ -3: step 0 skipped]"
     224echo " 4 --> Perform steps 0 4        [ -4: step 0 skipped]"
     225echo "11 --> Perform steps 0 1 2 3    [-11: step 0 skipped]"
     226echo "12 --> Perform steps 0 2 3      [-12: step 0 skipped]"
     227echo "13 --> Perform steps 0 3        [-13: step 0 skipped]"
     228echo " 0 --> Perform step  0 only"
     229echo "99 --> Oops ! Exit now please."
     230echo '**********************************************'
     231echo "What is your choice? " ; read step
    226232if [[ ${step} -lt 0 ]]
    227233then
     
    231237fi
    232238case ${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 ;;
    241250esac
    242251
     
    262271   if [[ ${compilo} -eq 3 || ${compilo} -eq 5 ]]
    263272   then
    264        echo How many processors ? 1, 2, 4, 6, 8, 12, 16, 20, 24, 32 ; read numproc
     273       echo How many processors ? e.g. 1, 2, 4, 6, 8, 12, 16, 20, 24, 32, 64, 128 ; read numproc
    265274   else
    266275       numproc=1
     
    446455        if [[ ${newphys} -eq 0 ]]
    447456        then
    448           cd ${main_folder}'/LMDZ.MARS/myGCM'
     457          cd ${main_folder}'/LMDZ.MARS/'
    449458        else
    450           cd ${main_folder}'/LMDZ.MARS.new/myGCM'
     459          cd ${main_folder}'/LMDZ.MARS.new/'
    451460        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
    453467        echo ${daygcm} | ./launch_gcm
    454468        #
     
    458472        if [[ -f ${work_folder}/PREP_MARS/create_readmeteo.exe && -f ${work_folder}/PREP_MARS/readmeteo.exe ]]
    459473        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
    462493              #echo 1 | ./create_readmeteo.exe
    463494              #./readmeteo.exe < readmeteo.def
     
    521552        ln -sf ${simu_folder}/namelist.input .
    522553        ln -sf ${simu_folder}/real.exe .
     554        ln -sf ${simu_folder}/levels .
    523555        rm -rf ${simu_folder}/met_em/wrfbdy* 2> /dev/null
    524556        rm -rf ${simu_folder}/met_em/wrfinput* 2> /dev/null
    525         if [[ ${compilo} -eq 3 ]]
     557        if [[ ${compilo} -eq 3 || ${compilo} -eq 5 ]]
    526558        then
    527559                rm -rf ${simu_folder}/met_em/rsl.* 2> /dev/null
Note: See TracChangeset for help on using the changeset viewer.