Ignore:
Timestamp:
Apr 7, 2015, 3:43:13 PM (10 years ago)
Author:
aslmd
Message:

MESOSCALE: a change in lmd_driver to get the right amount of dust in DUSTSTORM mode. changed makemeso to allow for a simple compilation with option -s DUSTSTORM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/makemeso

    r1389 r1411  
    4747   f ) fresh_start=1;;        ## a fresh start
    4848   e ) from_scratch=1;;       ## a fresh start with a completely new folder
    49    s ) scenario="${OPTARG}";; ## a specific scenario, you need a corresponding "mars_lmd_..."
     49   s ) scenario="${OPTARG}";; ## a specific scenario (with precompiling flags)
    5050   x ) donotcompile=1;phys="nophys_";donotcompilephys=1;; ## a case with no LMD physics included
    5151   h ) echo "
     
    7777# makemeso -e                ## a completely new recompile with erasing ALL compiling folder
    7878#
    79 # makemeso -s storm          ## a specific scenario, you need a corresponding mars_lmd_... (only for newphys)
     79# makemeso -s DUSTSTORM      ## a specific scenario (with precompiling flags)
    8080#
    8181# makemeso -x                ## a case with no LMD physics included
     
    224224    then
    225225     \rm copy_model_tmp > /dev/null 2> /dev/null
    226         if [[ "${scenario}" == "" ]]
    227         then
    228           sed s+"mars_lmd"+"mars_lmd_new"+g             SRC/SCRIPTS/copy_model > copy_model_tmp
    229         else
    230           echo SCENARIO ${scenario} DID YOU INCLUDE THE SPECIFIC folder ? ; read dummy
    231           sed s+"mars_lmd"+"mars_lmd_new_${scenario}"+g SRC/SCRIPTS/copy_model > copy_model_tmp
    232              if [[ "${config}" == "les" ]]
    233              then
    234               echo "NOT SUPPORTED, check options"
    235               exit
    236              fi
    237         fi
     226        sed s+"mars_lmd"+"mars_lmd_new"+g             SRC/SCRIPTS/copy_model > copy_model_tmp
    238227        if [[ "${config}" == "les" ]]
    239228        then
     
    246235     mv zeWRFV2 ${conf_wrf}/WRFV2
    247236     cd ${conf_wrf}/WRFV2
    248         if [[ "${scenario}" == "" ]]
     237     ln -sf mars_lmd_new mars_lmd
     238     if [[ "${phys}" == "newphys_" ]]
     239     then
     240        if [[ "${config}" != "les" ]]
    249241        then
    250           ln -sf mars_lmd_new mars_lmd
    251           if [[ "${phys}" == "newphys_" ]]
    252           then
    253             if [[ "${config}" != "les" ]]
    254             then
    255               cp ../../SRC/WRFV2/Registry/Registry.EM.newphys Registry/Registry.EM
    256             else
    257               cp -L ../../SRC/LES/WRFV2/Registry/Registry.EM.newphys Registry/Registry.EM
    258             fi
    259           fi
    260           cd phys
    261           ln -sf module_lmd_driver.F.new module_lmd_driver.F
    262           cd ..
     242           cp ../../SRC/WRFV2/Registry/Registry.EM.newphys Registry/Registry.EM
    263243        else
    264           ln -sf mars_lmd_new_${scenario} mars_lmd
    265           cp ../../SRC/WRFV2/mars_lmd_new_${scenario}/Registry.EM mars_lmd_new_${scenario}/
    266           cp ../../SRC/WRFV2/mars_lmd_new_${scenario}/*.inc mars_lmd_new_${scenario}/
    267           cd Registry ; ln -sf ../mars_lmd_new_${scenario}/Registry.EM . ; cd ..
    268         fi
     244           cp -L ../../SRC/LES/WRFV2/Registry/Registry.EM.newphys Registry/Registry.EM
     245        fi
     246     fi
     247     cd phys
     248     ln -sf module_lmd_driver.F.new module_lmd_driver.F
     249     cd ..
    269250
    270251     # remove files adapted to parallel GCM and useless for mesoscale
     
    317298      clean -a > /dev/null 2> /dev/null
    318299      ### get a possibly modified registry !
    319       if [[ "${scenario}" == "" ]]
     300      if [[ "${phys}" == "newphys_" ]]
    320301      then
    321         if [[ "${phys}" == "newphys_" ]]
    322         then
    323             cp ../../SRC/WRFV2/Registry/Registry.EM.newphys Registry/Registry.EM
    324         else
    325             cp ../../SRC/WRFV2/Registry/Registry.EM Registry/
    326         fi
     302          cp ../../SRC/WRFV2/Registry/Registry.EM.newphys Registry/Registry.EM
     303      else
     304          cp ../../SRC/WRFV2/Registry/Registry.EM Registry/
    327305      fi
    328306      if [[ "${config}" == "les" ]]
     
    599577  fi
    600578
    601         if [[ ! ("${scenario}" == "") ]]   ### not supported with LES for the moment
     579        ### SCENARIO SCENARIO SCENARIO
     580        if [[ ! ("${scenario}" == "") ]]   ### not supported with LES for the moment?
    602581        then
     582          # precompiling flag in WRF part
    603583          sed s+"ARCHFLAGS       =       "+"ARCHFLAGS       =       -D${scenario} "+g configure.wrf > yeah
    604584          mv -f yeah configure.wrf
     585          # precompiling flag in LMD part
     586          cd mars_lmd
     587          cp -Lrf makegcm_${compilo} yeah
     588          \rm makegcm_${compilo}
     589          sed s+"-DMESOSCALE"+"-D${scenario} -DMESOSCALE"+ yeah > makegcm_${compilo}
     590          chmod 755 makegcm_${compilo}
     591          \rm yeah
     592          cd ..
    605593        fi
    606594
Note: See TracChangeset for help on using the changeset viewer.