- Timestamp:
- 2017-12-11T17:45:55+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/SETTE/sette_rpt.sh
r8186 r8979 11 11 ######################### Start of function definitions ################################# 12 12 ## 13 14 function restfile() { 15 # Rebuild ice restart for SAS CONFIG, and restartability checks. Expects LONG and SHORT run directories. 16 # For Stand Alone Surface configuration ocean is not running, just run ice model; so no outputs ocean files. 17 # Compares LONG rebuild restart ice file with equivalent entry from the SHORT rebuild restart ice file. 18 # 19 vdir=$1 20 nam=$2 21 pass=$3 22 23 # Directory to run the tests 24 SETTE_DIR=$(cd $(dirname "$0"); pwd) 25 MAIN_DIR=$(dirname $SETTE_DIR) 26 CONFIG_DIR0=${MAIN_DIR}/CONFIG 27 TOOLS_DIR=${MAIN_DIR}/TOOLS 28 COMPIL_DIR=${TOOLS_DIR}/COMPILE 29 NPROC=32 30 SAS_RESTART_DIR=${CONFIG_DIR0}/SAS_LONG 31 # 32 if [ -d $vdir/$nam ]; then 33 dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 34 dorv=`echo $dorv | sed -e 's:.*/::'` 35 rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -2l | head -1 ` 36 rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -1l` 37 cd ${SAS_RESTART_DIR}/LONG 38 #SF add here compilation of rebuild_tools to rebuild restart files, and add comparison of restart files 39 cd ${TOOLS_DIR} 40 ./maketools -n REBUILD_NEMO -m ${mach} > /dev/null 2>&1 41 cd ${TOOLS_DIR}/REBUILD_NEMO 42 #SF echo "REBUILD LONG restart SAS files, without standard output" 43 ./rebuild_nemo -t 4 ../../CONFIG/SAS_LONG/LONG/SAS_00000240_restart_ice $NPROC > /dev/null 2>&1 44 #SF echo "REBUILD SHORT restart SAS files, without standard output" 45 ./rebuild_nemo -t 4 ../../CONFIG/SAS_LONG/SHORT/SAS_00000240_restart_ice $NPROC >&- 46 cd ${SAS_RESTART_DIR}/LONG 47 #SF echo "COPY rebuild restart files" 48 cp SAS_00000240_restart_ice.nc $vdir/$nam/$mach/$dorv/LONG/. 49 cp ../SHORT/SAS_00000240_restart_ice.nc $vdir/$nam/$mach/$dorv/SHORT/. 50 51 f1o=$vdir/$nam/$mach/$dorv/LONG/SAS_00000240_restart_ice.nc 52 f2o=$vdir/$nam/$mach/$dorv/SHORT/SAS_00000240_restart_ice.nc 53 if [ ! -f $f1o ] && [ ! -f $f2o ] ; then 54 printf "%-20s %s\n" $nam " REBUILD SAS restart ice DOES NOT exists; incomplete test"; 55 return; 56 fi 57 # 58 done_oce=0 59 # 60 if [ -f $f1o ] && [ -f $f2o ]; then 61 cmp -s $f1o $f2o 62 #SF cmp SAS_00000240_restart_ice.nc ../SHORT/SAS_00000240_restart_ice.nc > diff_restart.txt 63 if [ $? == 0 ]; then 64 if [ $pass == 0 ]; then 65 printf "%-20s %s %s\n" $nam " SAS restart files are IDENTICAL : passed : " $dorv 66 fi 67 else 68 printf "%-20s %s %s\n" $nam " SAS restart files are DIFFERENT : FAILED : " $dorv 69 # 70 # Offer view of differences on the second pass 71 # 72 if [ $pass == 1 ]; then 73 echo "BE CAREFUL: NEED cdo to see differences!!!!! " 74 echo "DO which cdo and replace cdo PATH to the cdo command in SETTE_rpt.sh " 75 echo "IF cdo is not available you need to do difference of netcdf file by hand" 76 echo "<return> to view restart_ice.nc differences" 77 read y 78 cdo -diffv $f1o $f2o 79 done_oce=1 80 #echo "<return> to continue" 81 #read y 82 fi 83 fi 84 fi 85 # 86 fi 87 } 88 13 89 function resttest() { 14 90 # … … 207 283 fi 208 284 # 285 209 286 # The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory 210 287 # … … 214 291 if [ $pass == 1 ]; then echo "---------------2nd pass------------------";fi 215 292 # 293 294 # Rebuild and restartability test for SAS 295 # 296 for restart_file in WSAS_LONG 297 do 298 # restfile $SAS_RESTART_DIR LONG $pass 299 restfile $NEMO_VALID $restart_file $pass 300 done 301 # 216 302 # Restartability test 217 303 # 218 for restart_test in WGYREPIS_LONG WORCA2LIM3PIS_LONG WORCA2OFFPIS_LONG WAMM12_LONG W SAS_LONG WISOMIP_LONG WORCA2AGUL_LONG304 for restart_test in WGYREPIS_LONG WORCA2LIM3PIS_LONG WORCA2OFFPIS_LONG WAMM12_LONG WISOMIP_LONG WORCA2AGUL_LONG 219 305 do 220 306 resttest $NEMO_VALID $restart_test $pass
Note: See TracChangeset
for help on using the changeset viewer.