Ignore:
Timestamp:
Jul 20, 2011, 3:07:02 PM (13 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

Location:
trunk/MESOSCALE/LMD_MM_MARS
Files:
1 added
1 deleted
4 edited
3 moved

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
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS/compile_and_exec

    r11 r235  
    88echo 1 | create_readmeteo.exe
    99readmeteo.exe < readmeteo.def
    10 
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/PREP_MARS/compile_ifort

    r60 r235  
    1818\rm *.o 2> /dev/null
    1919
    20 echo I assume input_diagfi is correctly linked
    21 echo I assume WPSFEED folder exists or is linked
    22 
    23 echo 1 | create_readmeteo.exe
    24 readmeteo.exe < readmeteo.def
     20#echo I assume input_diagfi is correctly linked
     21#echo I assume WPSFEED folder exists or is linked
     22#echo 1 | create_readmeteo.exe
     23#readmeteo.exe < readmeteo.def
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd/libf/phymars/inifis.F

    r234 r235  
    1       SUBROUTINE meso_inifis(ngrid,nlayer,nq,
    2      $           wdt,
     1      SUBROUTINE inifis(ngrid,nlayer,
    32     $           wday_ini,wdaysec,
    4      $           wappel_phys,wecri_phys,
     3     $           wappel_phys,
    54     $           plat,plon,parea,
    65     $           prad,pg,pr,pcpp,
     6     $           nq, wdt,
    77     $           womeg,wmugaz,
    88     $           wyear_day,wperiheli,waphelie,wperi_day,wobliquit,
     
    528528        dtphys=wdt*float(wappel_phys)
    529529        print*,'Physical timestep (s) ',dtphys
    530         ecri_phys=wecri_phys
     530        ecri_phys=8.e18  !! a dummy low frequency
    531531        print*,'Physical frequency for writing ',ecri_phys
    532532c
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd/libf/phymars/physiq.F

    r234 r235  
    1       SUBROUTINE meso_physiq(ngrid,nlayer,nq,
     1      SUBROUTINE physiq(ngrid,nlayer,nq,
    22     $            firstcall,lastcall,
    3      $            wday_ini,
    43     $            pday,ptime,ptimestep,
    54     $            pplev,pplay,pphi,
     
    87     $            pdu,pdv,pdt,pdq,pdpsrf,tracerdyn,
    98     $            wtsurf,wtsoil,wemis,wq2,wqsurf,wco2ice,
    10      $            wecritphys,
     9     $            wday_ini,
    1110     $            output_tab2d, output_tab3d,
    1211     $            flag_LES)
    13 
    1412
    1513
     
    174172      REAL wqsurf(ngridmx,nqmx)       
    175173      REAL wq2(ngridmx,nlayermx+1)
    176       REAL wecritphys
    177174      REAL output_tab2d(ngridmx,n2d)
    178175      REAL output_tab3d(ngridmx,nlayer,n3d)
     
    395392      iphysiq=ptimestep
    396393c
    397       ecritphy=wecritphys
     394      ecritphy=8.e18  !! a dummy low frequency
    398395      PRINT*,'Write LMD physics each:',ecritphy,' seconds'
    399396              !!PRINT*,ecri_phys 
  • trunk/MESOSCALE/LMD_MM_MARS/makemeso

    r227 r235  
    234234     ./copy_model_tmp
    235235     \rm copy_model_tmp
    236      mv WRFV2 ${conf_wrf}/
     236     mv zeWRFV2 ${conf_wrf}/WRFV2
    237237     cd ${conf_wrf}/WRFV2
    238238     cd Registry ; Registry.bash ; cd ..
     
    581581  cd libf/phymars
    582582  \rm dimphys.h 2> /dev/null
     583  if [[ "${phys}" == "newphys_" ]]
     584  then
     585    ln -sf meso_inc/meso_dimphys.h_ref .
     586  fi
    583587  physize=$(expr ${physx} \* ${physy})
    584   sed s/--xsize--/${physx}/g meso_inc/meso_dimphys.h_ref | sed s/--ysize--/${physy}/g | sed s/--physize--/${physize}/g | sed s/--zsize--/${physz}/g | sed s/--soilsize--/${soilsize}/g > dimphys.h
     588  sed s/--xsize--/${physx}/g meso_dimphys.h_ref | sed s/--ysize--/${physy}/g | sed s/--physize--/${physize}/g | sed s/--zsize--/${physz}/g | sed s/--soilsize--/${soilsize}/g > dimphys.h
    585589  head -15 dimphys.h
    586590     ### TEST new new phys
Note: See TracChangeset for help on using the changeset viewer.