Ignore:
Timestamp:
Jan 25, 2011, 4:46:17 PM (14 years ago)
Author:
aslmd
Message:

LMD_MM_MARS: script de compilation compatible old/new physics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mesoscale/LMD_MM_MARS/makemeso

    r28 r29  
    1212# Last update : January 2009 #
    1313#               November  09 #
     14#               January   11 #
    1415##############################
    1516
     
    5152justphys=0
    5253debug=0
    53 while getopts "drc:njhg" options; do
     54phys=""
     55while getopts "drc:njhgp" options; do
    5456  case $options in
    5557   d ) donotcompile=1;;     ## just to check the compile folder
     
    5961   j ) justphys=1;;         ## just compile LMD physics
    6062   g ) debug=1;;            ## debug mode
     63   p ) phys="newphys_";;
    6164   h ) echo "
    6265# Use:   
     
    7881#
    7982# makemeso -h                ## display options
     83#
     84# makemeso -p                ## with new LMD physics
    8085" ; exit ;;
    8186  esac
     
    8893  echo ' LMD Mesoscale Model Compiler. Welcome.'
    8994  echo '****************************************'
     95  if [[ "${phys}" == "newphys_" ]]
     96  then
     97    echo '***********with new physics*************'
     98    echo '****************************************'
     99  fi
    90100  # computer
    91101  uname -a | grep x86_64 > /dev/null
     
    147157####
    148158
    149     conf_wrf="${compilo}_${machine}${single}${testflag}"
     159    conf_wrf="${phys}${compilo}_${machine}${single}${testflag}"
    150160    \rm what_folder 2> /dev/null
    151161    echo ${conf_wrf} > what_folder
     
    173183  then
    174184    echo new folder ... link sources
     185    if [[ "${phys}" == "newphys_" ]]
     186    then
     187    sed s+"mars_lmd"+"mars_lmd_new"+g copy_model > copy_model_tmp
     188    exit
     189    else
    175190    ./copy_model
     191    fi
    176192    mv WRFV2 ${conf_wrf}/
    177193    cd ${conf_wrf}/WRFV2
     
    328344  ########################
    329345
     346  if [[ "${phys}" == "newphys_" ]]
     347  then
     348     sed s+"CFLAGS          =       "+"CFLAGS          =       -DNEWPHYS "+g configure.wrf > yeah
     349     mv -f yeah configure.wrf
     350  fi
    330351
    331352  if [ ${debug} -ne 0 ]   # not working for xlf!
     
    336357  fi
    337358
     359exit
    338360
    339361
Note: See TracChangeset for help on using the changeset viewer.