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 9223 for branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette_rpt.sh – NEMO

Ignore:
Timestamp:
2018-01-12T19:43:55+01:00 (6 years ago)
Author:
mathiot
Message:

add function to detect not-succesfull runs (E R R O R in ocean.output) in sette_rpt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette_rpt.sh

    r9221 r9223  
    184184    fi 
    185185    rm f1.tmp$$ 
    186   else 
    187     printf "%-20s %s %s\n" $nam  " directory is MISSING : " $dorv 
    188186  fi 
    189187} 
     
    275273      fi 
    276274    fi 
     275  fi 
     276} 
     277 
     278function runtest(){ 
     279# 
     280# Run checks. 
     281# Check presence of E R R O R in ocean.output from each 
     282# 
     283  vdir=$1 
     284  nam=$2 
     285  pass=$3 
     286# 
     287  if [ -d $vdir/$nam ]; then 
     288    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
     289    dorv=`echo $dorv | sed -e 's:.*/::'` 
     290    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -2l | head -1 ` 
     291    f1o=$vdir/$nam/$mach/$dorv/$rep1/ocean.output 
     292    if  [ ! -f $f1o ] ; then 
     293      printf "%-20s %s\n" $nam " ocean.output is MISSING : " $dorv 
     294      return; 
     295    else  
     296      nerr=`grep 'E R R O R' $f1o | wc -l` 
     297      if [[ $nerr > 0 ]]; then 
     298        printf "%-20s %s %s\n" $nam " run FAILED : " $dorv 
     299        if [ $pass == 1 ]; then 
     300          echo "<return> to view end of ocean.output" 
     301          read y 
     302          tail -100 $f1o 
     303          echo '' 
     304          echo "full ocean.output available here: $f1o" 
     305        fi 
     306      fi 
     307    fi 
    277308  else 
    278309    printf "%-20s %s %s\n" $nam  " directory is MISSING : " $dorv 
     
    392423 do 
    393424   reprotest $NEMO_VALID $repro_test $pass 
     425   runtest $NEMO_VALID $repro_test $pass 
    394426 done 
    395427 
Note: See TracChangeset for help on using the changeset viewer.