Changeset 153 for trunk/MESOSCALE


Ignore:
Timestamp:
Jun 8, 2011, 6:01:00 PM (13 years ago)
Author:
aslmd
Message:

MESOSCALE: modified makemeso and runmeso to comply with changes performed in r148 about scatterers in newphys. a new question is now asked if you run makemeso -p or if you run runmeso with run.def in the folder. note that runmeso only asks the question for scenarios mars=1 or mars=11 where water cycle is on, otherwise by default number of scatterers is 1 (i.e. only dust).

Location:
trunk/MESOSCALE/LMD_MM_MARS
Files:
2 edited

Legend:

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

    r138 r153  
    2727
    2828scenario=""
    29 #scenario="storm"
     29scenario="storm"
    3030
    3131if [[ "${LMDMOD}" = "" ]]
     
    167167        exit
    168168  fi
    169 tracers=$(more ${simu_folder}/namelist.input | grep mars | awk '{print $3}' | sed s+','+''+g)
    170   case ${tracers} in
     169mars_scenario=$(more ${simu_folder}/namelist.input | grep mars | awk '{print $3}' | sed s+','+''+g)
     170  case ${mars_scenario} in
    171171      0) tracers='1' ;;
    172172      1) tracers='2' ;;
     
    178178echo '** Domain(s)             >>> '${nest}
    179179echo '** Tracer(s)             >>> '${tracers}
     180
     181   ############ SCATTERERS SCATTERERS ######
     182   if [[ ${newphys} -eq 1 ]]
     183   then
     184     #### CHANGE THIS IF YOU ADD NEW SCENARIOS
     185     case ${mars_scenario} in
     186       0) scat=1 ;;
     187       1) echo "!! How many scatterers are you using : 1,2,..." ; read scat ;;
     188       2) scat=1 ;;
     189       3) scat=1 ;;
     190      11) echo "!! How many scatterers are you using : 1,2,..." ; read scat ;;
     191      20) scat=1 ;;
     192       *) scat=1 ;;
     193     esac
     194     echo '** Scatterers            >>> '${scat}
     195   else
     196     #### USELESS here BUT COMPATIBILITY
     197     scat=1
     198   fi
     199   #########################################
     200
    180201echo '** Grid points           >>> '${nx}" x "${ny}" x "${nz}
    181202echo '** Horizontal resolution >>> '${dx}
     203
    182204#echo "OK ? ('no' to exit, any key if OK)" ; read wellok
    183205#  if [[ "${wellok}" = "no" ]]
     
    326348 cd ${simu_folder}
    327349     ## corresponding executables
    328     wrfexe=${work_folder}/wrf_x${nx}_y${ny}_z${nz}_d${nest}_t${tracers}_p${numproc}.exe
    329     realexe=${work_folder}/real_x${nx}_y${ny}_z${nz}_d${nest}_t${tracers}_p${numproc}.exe
     350    wrfexe=${work_folder}/wrf_x${nx}_y${ny}_z${nz}_d${nest}_t${tracers}_p${numproc}_s${scat}.exe
     351    realexe=${work_folder}/real_x${nx}_y${ny}_z${nz}_d${nest}_t${tracers}_p${numproc}_s${scat}.exe
    330352 if [[ -f ${wrfexe} ]]
    331353 then
     
    360382   echo ${nest} >> ${simu_folder}/makemeso_input
    361383   echo ${tracers} >> ${simu_folder}/makemeso_input
    362    #echo 'y' >> ${simu_folder}/makemeso_input
     384   if [[ ${newphys} -eq 1 ]]
     385   then
     386     echo 'n' >> ${simu_folder}/makemeso_input
     387     echo ${scat} >> ${simu_folder}/makemeso_input
     388   fi
    363389   #
    364390   # COMPILE THE MODEL
  • trunk/MESOSCALE/LMD_MM_MARS/makemeso

    r147 r153  
    248248    fi
    249249  fi
     250  if [[ "${phys}" == "newphys_" ]]
     251  then
     252     echo "How many scatterers are you using : 1,2,..." ; read scat
     253  else
     254     scat=1 ## dummy stuff
     255  fi
     256
    250257  # summary
    251258  echo '**********************'
     
    268275  echo '         '${dom} domains
    269276  echo '         '${tra} tracers
     277  if [[ "${phys}" == "newphys_" ]]
     278  then
     279    echo '         '${scat} scatterers
     280  fi
    270281  echo '****************************************'
    271282  # save answer
     
    283294  echo ${tra} >> last
    284295  echo ${answer} >> last
     296  echo ${scat} >> last
    285297
    286298#------------
     
    547559       touch gr_fi_dyn.F.lien
    548560         ln -sf ../dyn3d/gr_fi_dyn.F .  ## dommage, a corriger ## attention idem
     561     ###############################
     562     ###############################
     563\rm scatterers.h
     564cat << EOF > scatterers.h
     565!-----------------------------------------------------------------------
     566!   INCLUDE 'scatterers.h'
     567!
     568! Number of kind of tracer radiative properties
     569! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     570! (ex: naerkind=1 if you use one dust mode without ice ...)
     571! (ex: naerkind=2 if you use one dust mode and active ice ...)
     572!-----------------------------------------------------------------------
     573
     574      integer, parameter :: naerkind=${scat}
     575
     576!-----------------------------------------------------------------------
     577EOF
     578     ###############################
     579     ###############################
    549580     fi
    550581     ###
     
    600631  # save a copy
    601632  #--------------
    602   cp -f libo/liblmd.a libo/liblmd.a_${lon}_${lat}_${level}_${dom}_${tra}
     633  cp -f libo/liblmd.a libo/liblmd.a_${lon}_${lat}_${level}_${dom}_${tra}_${scat}
    603634  echo '****************************************'
    604635
     
    655686                        echo 'Looks good ! wrf.exe is here...'
    656687                      fi
    657                     cp -f real.exe ../../real_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}.exe
    658                     cp -f wrf.exe ../../wrf_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}.exe
     688                    cp -f real.exe ../../real_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}_s${scat}.exe
     689                    cp -f wrf.exe ../../wrf_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}_s${scat}.exe
    659690                    cd ..  ;;
    660691    'ideal')        #mkdir 'test/em_quarter_ss' 2> /dev/null
     
    671702                        echo 'Looks good ! wrf.exe is here...'
    672703                      fi
    673                     cp -f ideal.exe ../../ideal_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}.exe
    674                     cp -f wrf.exe ../../wrf_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}.exe
     704                    cp -f ideal.exe ../../ideal_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}_s${scat}.exe
     705                    cp -f wrf.exe ../../wrf_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}_s${scat}.exe
    675706                    cd ..  ;;
    676707    'les')          echo '>>> YOUR CONFIG IS : '${config}
     
    687718                        echo 'Looks good ! wrf.exe is here...'
    688719                      fi
    689                     cp -f ideal.exe ../../ideal_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}.exe
    690                     cp -f wrf.exe ../../wrf_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}.exe
     720                    cp -f ideal.exe ../../ideal_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}_s${scat}.exe
     721                    cp -f wrf.exe ../../wrf_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}_s${scat}.exe
    691722                    cd ..  ;;
    692723    *)              echo not supported... please use ; echo ideal les ; exit ;;
     
    700731  echo 'done.'
    701732  echo '****************************************'
    702   cp last ../makemeso_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}
     733  cp last ../makemeso_x${lon}_y${lat}_z${level}_d${dom}_t${tra}_p${numproc}_s${scat}
    703734  mv last ../../
    704735
Note: See TracChangeset for help on using the changeset viewer.