Changeset 8849 for trunk/NEMOGCM/SETTE/new_sette_rpt.sh
- Timestamp:
- 2017-11-29T17:56:35+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/SETTE/new_sette_rpt.sh
r8839 r8849 16 16 # For Stand Alone Surface configuration ocean is not running, just run ice model; so no outputs ocean files. 17 17 # Compares LONG rebuild restart ice file with equivalent entry from the SHORT rebuild restart ice file. 18 # 19 # check nco module loaded, and load it if not 20 if [ ! $( echo $LOADEDMODULES | grep cdo ) ]; then module load cdo >& /dev/null ; fi 18 21 # 19 22 vdir=$1 … … 27 30 rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -1l` 28 31 cd ${SAS_RESTART_DIR}/LONG 29 32 #SF add here compilation of rebuild_tools to rebuild restart files, and add comparison of restart files 30 33 cd ${TOOLS_DIR} 31 34 ./maketools -n REBUILD_NEMO -m ${mach} > /dev/null 2>&1 32 35 cd ${TOOLS_DIR}/REBUILD_NEMO 33 36 #SF echo "REBUILD LONG restart SAS files, without standard output" 34 37 ./rebuild_nemo -t 4 ../../CONFIG/SAS_ST/LONG/SAS_00000240_restart_ice $NPROC > /dev/null 2>&1 35 38 #SF echo "REBUILD SHORT restart SAS files, without standard output" 36 39 ./rebuild_nemo -t 4 ../../CONFIG/SAS_ST/SHORT/SAS_00000240_restart_ice $NPROC >&- 37 40 cd ${SAS_RESTART_DIR}/LONG 38 41 #SF echo "COPY rebuild restart files" 39 42 cp SAS_00000240_restart_ice.nc $vdir/$nam/$mach/$dorv/LONG/. 40 43 cp ../SHORT/SAS_00000240_restart_ice.nc $vdir/$nam/$mach/$dorv/SHORT/. … … 45 48 printf "%-20s %s\n" $nam " REBUILD SAS restart ice DOES NOT exists; incomplete test"; 46 49 return; 47 50 fi 48 51 # 49 52 done_oce=0 50 53 # 51 if [ -f $f1o ] && [ -f $f2o ]; then 52 cmp -s $f1o $f2o 53 #SF cmp SAS_00000240_restart_ice.nc ../SHORT/SAS_00000240_restart_ice.nc > diff_restart.txt 54 if [ $? == 0 ]; then 54 if [ -f $f1o ] && [ -f $f2o ]; then 55 ## Compare the two netcdf files 56 cdo diffn $f1o $f2o \ 57 > cdo_diff.out 2> /dev/null 58 ## echo cdo_diff.out 59 ## Identical if first character of $dif ==0 60 [ ! -s cdo_diff.out ] && continue 61 dif=$( grep -om1 '[0-9]* of [0-9]* records differ' cdo_diff.out ) 62 63 if [ -n "$dif" ]; then 64 difi=`echo $dif | cut -c -1` 65 fi 66 \rm cdo_diff.out 67 68 if [ $difi == 0 ]; then 55 69 if [ $pass == 0 ]; then 56 70 printf "%-20s %s %s\n" $nam " SAS restart files are IDENTICAL : passed : " $dorv … … 62 76 # 63 77 if [ $pass == 1 ]; then 64 echo "BE CAREFUL: NEED cdo to see differences!!!!! "65 echo "DO which cdo and replace cdo PATH to the cdo command in SETTE_rpt.sh "66 echo "IF cdo is not available you need to do difference of netcdf file by hand"67 78 echo "<return> to view restart_ice.nc differences" 68 79 read y
Note: See TracChangeset
for help on using the changeset viewer.