New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 2656 – NEMO

Changeset 2656


Ignore:
Timestamp:
2011-03-04T17:33:53+01:00 (12 years ago)
Author:
flavoni
Message:

add sette_beginner.sh a small sette.sh to start with SETTE tools, see ticket #752

Location:
trunk/NEMOGCM/SETTE
Files:
1 added
2 edited

Legend:

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

    r2585 r2656  
    4040# :: 
    4141# 
    42 #  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME       NUMBER_PROC 
    43 # 
    44 #  run a job of config GYRE with 1 processor 
    45 #  $ ./fcm_job.sh input_GYRE.cfg                     1 
    46 # 
    47 #  run a job of config ORCA2_LIM_PISCES with 8 processors 
    48 #  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg         8 
     42#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME       NUMBER_PROC TEST_NAME 
     43# 
     44#  run a job of config GYRE with 1 processor          test REPRODUCTINILITY 
     45#  $ ./fcm_job.sh input_GYRE.cfg                     1     REPRO 
     46# 
     47#  run a job of config ORCA2_LIM_PISCES with 8 processors test RESTARTABILITY 
     48#  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg         8      RESTART 
    4949# 
    5050# 
     
    6767# 
    6868 
    69 usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS" 
    70 usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8" 
    71  
    72  
    73 minargcount=2 
     69usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME" 
     70usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 RUN" 
     71 
     72 
     73minargcount=3 
    7474        if [ ${#} -lt ${minargcount} ] 
    7575        then 
     
    8080        fi 
    8181        unset minargcount 
    82    if [  -f ${SETTE_DIR}/output.sette ] ; then 
    83            echo "file output already present. Append comments" 
    84            echo "`ls ${SETTE_DIR}/output.sette`" 
    85    else 
    86            echo "file output not present" 
     82   if [ ! -f ${SETTE_DIR}/output.sette ] ; then 
    8783           touch ${SETTE_DIR}/output.sette 
    88            echo "`ls ${SETTE_DIR}/output.sette`" 
    8984   fi 
    9085        
     
    9691echo "`more ../CONFIG/${NEW_CONF}/cpp_${NEW_CONF}.fcm`" >> ${SETTE_DIR}/output.sette 
    9792echo "" >> ${SETTE_DIR}/output.sette 
    98 echo "executing script : fcm_job $@" >> ${SETTE_DIR}/output.sette 
     93echo "executing script : \"fcm_job $@\" " >> ${SETTE_DIR}/output.sette 
    9994echo "            " >> ${SETTE_DIR}/output.sette 
    10095 
     
    107102   echo "            " >> ${SETTE_DIR}/output.sette 
    108103   cp ${FORCING_DIR}/${tar_file} ${INPUT_DIR}/. 
    109    cd ${INPUT_DIR} ; tar xvof ${INPUT_DIR}/*.tar ; gunzip -f *gz 
     104   if [ ! -f ${INPUT_DIR}/${tar_file} ] ; then  
     105      echo "PROBLEM during copy of tar file" >> ${SETTE_DIR}/output.sette 
     106      echo "tar file IS NOT present in ${INPUT_DIR} directory " >> ${SETTE_DIR}/output.sette 
     107      echo "            " >> ${SETTE_DIR}/output.sette 
     108      echo "PROBLEM during copy of tar file"  
     109      exit 1 
     110   else   
     111      cd ${INPUT_DIR} ; tar xvof ${INPUT_DIR}/*.tar ; gunzip -f *gz 
     112   fi 
    110113fi  
    111114 
     
    134137    then 
    135138    echo "executable opa does not exist" 
     139    echo "executable opa does not exist, exit"  >> ${SETTE_DIR}/output.sette 
    136140    exit 1 
    137141fi 
     
    165169 
    166170################################################################ 
    167  
    168 ################################################################ 
    169171# SAVE OUTPUT, DEBUG & RESTART FILES 
    170172echo "saving ocean & ice output, debug & restart files" >> ${SETTE_DIR}/output.sette 
     
    174176[ -f *solver.stat ] && mv *solver.stat ${OUTPUT_DIR}/. 
    175177[ -n "$(ls *_grid_*)" ] && mv *_grid_*.nc ${OUTPUT_DIR}/. 
    176 [ -n "$(ls *restart*)" ] && cp *restart*.nc ${OUTPUT_DIR}/. 
     178[ -n "$(ls *_ptrc_*)" ] && mv *_ptrc_*.nc ${OUTPUT_DIR}/. 
     179[ -n "$(ls *_diad_*)" ] && mv *_diad_*.nc ${OUTPUT_DIR}/. 
     180[ -n "`ls *restart*`" ] && cp *restart*.nc ${OUTPUT_DIR}/. 
    177181[ -f ice_evolu ] && mv ice_evolu ${OUTPUT_DIR}/. 
    178 [ -n "$(ls *icemod*)" ] && mv *icemod* ${OUTPUT_DIR}/. 
     182[ -n "`ls *icemod*`" ] && mv *icemod* ${OUTPUT_DIR}/. 
    179183#- Save ftrace file 
    180184[ -f ftrace.out* ] && cp ftrace.out* ${OUTPUT_DIR}/. 
    181185################################################################ 
    182186 
     187################################################################ 
     188# SAVE IN NEMO_VALIDATION tree 
     189export LANG=en_US  
     190cd ${CONFIG_DIR} 
     191cd ../ 
     192REVISION_NB=`svn info | grep -i "Revision:" | sed -e "s/ //" | cut -d ":" -f 2` 
     193if [ ${#REVISION_NB} -eq 0 ] 
     194then 
     195   echo "some problems with svn info command" 
     196   echo "some problems with svn info command" >> ${SETTE_DIR}/output.sette 
     197   ${REVISION_NB}=`date +%Y%m%d` 
     198   echo "put in ${REVISION_NB} date" 
     199   echo "put in ${REVISION_NB} date" >> ${SETTE_DIR}/output.sette 
     200else 
     201echo "value of revision number of NEMOGCM: ${REVISION_NB}" 
     202fi 
     203cd ${NEMO_VALIDATION_DIR} 
     204export TEST_NAME=$3 
     205`mkdir -p ${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}` 
     206NEMO_VALID=${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME} 
     207if [ -d ${NEMO_VALID} ] ; then 
     208   echo "created ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette 
     209else  
     210   echo "problems in creating ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette 
     211   echo "EXIT," 
     212   exit 1 
     213fi 
     214[ -f ${OUTPUT_DIR}/*ocean.output ] && mv ${OUTPUT_DIR}/*ocean.output ${NEMO_VALID}/. 
     215[ -f ${OUTPUT_DIR}/*solver.stat ] && mv ${OUTPUT_DIR}/*solver.stat ${NEMO_VALID}/. 
     216[ -n "`ls ${OUTPUT_DIR}/*restart*`" ] && mv ${OUTPUT_DIR}/*restart* ${NEMO_VALID}/. 
     217if [ -n "$(ls ${NEMO_VALID}/*solver*)" ] ; then 
     218   echo "moved solver.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     219   echo "moved solver.stat in ${NEMO_VALID} directory"   
     220else 
     221   echo "problem in looking for solver.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     222   echo "solver.stat IS NOT in ${NEMO_VALID} directory"  
     223fi 
     224if [ -n "$(ls ${NEMO_VALID}/*ocean.output*)" ] ; then 
     225   echo "moved ocean.output in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     226   echo "moved ocean.output in ${NEMO_VALID} directory"  
     227else 
     228   echo "problem in looking for ocean.output file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     229   echo "ocean.output IS NOT in ${NEMO_VALID} directory"  
     230fi 
     231if [ -n "`ls ${NEMO_VALID}/*restart*`" ] ; then 
     232   echo "moved restart files in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     233   echo "moved restart files in ${NEMO_VALID} directory"  
     234else 
     235   echo "problem in looking for restart files in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     236   echo "restart files ARE NOT in ${NEMO_VALID} directory"  
     237fi 
     238################################################################ 
  • trunk/NEMOGCM/SETTE/param.cfg

    r2563 r2656  
    55INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    66#- only for IBM 
    7 #- TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
     7# TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    88#- output files storing  
    9 OUTPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00/VALIDATION 
     9OUTPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00/OUTPUT 
     10#- VALIDATION files storing  
     11NEMO_VALIDATION_DIR=~/NEMO_VALIDATION 
Note: See TracChangeset for help on using the changeset viewer.