Changeset 2756


Ignore:
Timestamp:
2011-04-29T17:16:07+02:00 (10 years ago)
Author:
flavoni
Message:

add copy_original function in SETTE to solve pb during re-run tests,… it not the best solution but it is one for the moment, see ticket #819

Location:
trunk/NEMOGCM/SETTE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/SETTE/all_functions.sh

    r2675 r2756  
    3030# :: 
    3131# 
    32 #  $ ./set_namelist.sh INPUT_NAMELIST VARIABLE VALUE  
     32#  $ ./set_namelist INPUT_NAMELIST VARIABLE VALUE  
     33#  $ ./copy_original INPUT_NAMELIST  
    3334# 
    3435# 
     
    3839# function superegrep 
    3940#   input variable value 
     41# 
     42# function copy_original 
     43#   input namelist_name 
     44#   output namelist  
    4045# 
    4146# function set_namelist 
     
    4853# :: 
    4954# 
    50 #  $ ./set_namelist.sh namelist          nn_itend        75 
    51 #  $ ./set_namelist.sh namelist_ice_lim2 cn_icerst_in  \"00101231_restart_ice\" 
     55#  $ ./copy_original namelist_pisces          
     56#  $ ./set_namelist namelist          nn_itend        75 
     57#  $ ./set_namelist namelist_ice_lim2 cn_icerst_in  \"00101231_restart_ice\" 
    5258# 
    5359# 
     
    6773# 
    6874 
     75 
     76# function to copy original namelists in ORIGINAL_namelist directory in ${INPUT_DIR} directory 
     77# to allow re-run same tests in same directory and start with all correct values of namelist 
     78copy_original () { 
     79        `mkdir -p ${INPUT_DIR}/ORIGINAL_namelist` 
     80   if [ -d ${INPUT_DIR}/ORIGINAL_namelist ] ; then 
     81           echo "created ${INPUT_DIR}/ORIGINAL_namelist directory in ${INPUT_DIR}"   >> ${SETTE_DIR}/output.sette 
     82   else 
     83           echo "problems in creating ${INPUT_DIR}/ORIGINAL_namelist directory"   >> ${SETTE_DIR}/output.sette 
     84           echo "EXIT," 
     85           exit 1 
     86   fi 
     87        `cp ${CONFIG_DIR}/${REF_CONF}/EXP00/$1 ${INPUT_DIR}/ORIGINAL_namelist/$1.ori` 
     88   if [ -n "$(ls ${INPUT_DIR}/ORIGINAL_namelist/$1.ori)" ] ; then 
     89      echo "copied namelist of reference configuration in ${INPUT_DIR}/ORIGINAL_namelist/$1.ori " >> ${SETTE_DIR}/output.sette 
     90   else 
     91      echo "problem in copying namelist of reference configuration in ${INPUT_DIR}/ORIGINAL_namelist/$1.ori " >> ${SETTE_DIR}/output.sette 
     92           echo "EXIT," 
     93           exit 1 
     94   fi 
     95        `cp ${INPUT_DIR}/ORIGINAL_namelist/$1.ori ${INPUT_DIR}/$1` 
     96   if [ -n "$(ls ${INPUT_DIR}/$1)" ] ; then 
     97      echo "copied original namelist in ${INPUT_DIR} directory " >> ${SETTE_DIR}/output.sette 
     98   else 
     99           echo "problem in copying  original namelist in ${INPUT_DIR} directory"  >> ${SETTE_DIR}/output.sette 
     100           echo "EXIT," 
     101           exit 1 
     102   fi 
     103} 
    69104 
    70105# function to find namelists parameters 
  • trunk/NEMOGCM/SETTE/sette.sh

    r2754 r2756  
    112112#- 
    113113# Compiler among those in NEMOGCM/ARCH 
    114 COMPILER=gfortran_linux 
     114COMPILER=PW6_VARGAS 
    115115 
    116116# Directory to run the tests 
     
    136136    . param.cfg 
    137137    . all_functions.sh 
     138    copy_original namelist  
     139    copy_original namelist_top 
    138140    set_namelist namelist cn_exp \"GYRELOB_LONG\" 
    139141    set_namelist namelist nn_it000 1 
     
    146148     
    147149    cd ${SETTE_DIR} 
     150    copy_original namelist 
     151    copy_original namelist_top 
    148152    set_namelist namelist cn_exp \"GYRELOB_SHORT\" 
    149153    set_namelist namelist nn_it000 61 
     
    167171    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES del_key "key_dtatrc key_diatrc" 
    168172    cd ${SETTE_DIR} 
     173    copy_original namelist 
     174    copy_original namelist_top 
     175    copy_original namelist_pisces 
    169176    . param.cfg 
    170177    . all_functions.sh 
     
    186193     
    187194    cd ${SETTE_DIR} 
     195    copy_original namelist 
     196    copy_original namelist_ice 
     197    copy_original namelist_top 
     198    copy_original namelist_pisces 
    188199    set_namelist namelist cn_exp \"O2LP_SHORT\" 
    189200    set_namelist namelist nn_it000 76 
     
    217228    . param.cfg 
    218229    . all_functions.sh 
     230    copy_original namelist 
    219231    set_namelist namelist cn_exp \"POMME_LONG\" 
    220232    set_namelist namelist nn_it000 1 
     
    225237     
    226238    cd ${SETTE_DIR} 
     239    copy_original namelist 
    227240    set_namelist namelist cn_exp \"POMME_SHORT\" 
    228241    set_namelist namelist nn_it000 301 
     
    245258    . param.cfg 
    246259    . all_functions.sh 
     260    copy_original namelist 
    247261    set_namelist namelist cn_exp \"GYRELOB_14\" 
    248262    set_namelist namelist nn_it000 1 
     
    259273     
    260274    cd ${SETTE_DIR} 
     275    copy_original namelist 
    261276    set_namelist namelist cn_exp \"GYRELOB_22\" 
    262277    set_namelist namelist nn_it000 1 
     
    279294    . param.cfg 
    280295    . all_functions.sh 
     296    copy_original namelist 
     297    copy_original namelist_pisces 
    281298    set_namelist namelist nn_it000 1 
    282299    set_namelist namelist nn_itend 75 
     
    298315     
    299316    cd ${SETTE_DIR} 
     317    copy_original namelist 
     318    copy_original namelist_pisces 
    300319    set_namelist namelist nn_it000 1 
    301320    set_namelist namelist nn_itend 75 
     
    324343    . param.cfg 
    325344    . all_functions.sh 
     345    copy_original namelist 
    326346    set_namelist namelist nn_it000 1 
    327347    set_namelist namelist nn_itend 300 
     
    336356     
    337357    cd ${SETTE_DIR} 
     358    copy_original namelist 
    338359    set_namelist namelist nn_it000 1 
    339360    set_namelist namelist nn_itend 300 
     
    355376    . param.cfg 
    356377    . all_functions.sh 
     378    copy_original namelist 
     379    copy_original 1_namelist 
    357380    set_namelist namelist nn_it000 1 
    358381    set_namelist namelist nn_itend 75 
     
    374397    . param.cfg 
    375398    . all_functions.sh 
     399    copy_original namelist 
     400    copy_original 1_namelist 
    376401    set_namelist namelist nn_it000 1 
    377402    set_namelist namelist nn_itend 75 
Note: See TracChangeset for help on using the changeset viewer.