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.
sette_rpt in branches/2013/dev_MERGE_2013/NEMOGCM/SETTE – NEMO

source: branches/2013/dev_MERGE_2013/NEMOGCM/SETTE/sette_rpt @ 4318

Last change on this file since 4318 was 3725, checked in by acc, 11 years ago

Branch dev_MERGE_2012. Minor fix to the sette_rpt script to remove references to GYRELOB_LONG

  • Property svn:executable set to *
File size: 7.8 KB
Line 
1#!/bin/csh -f
2#
3# simple SETTE report generator.
4#
5# This version should be run in the SETTE directory.
6# The machine name will be picked up from the sette.sh script but the location of the
7# validation directory needs to be set here (currently assumed to reside in the ../CONFIG directory)
8#
9  set mach = `grep "COMPILER=" ./sette.sh | sed -e 's/COMPILER=//'`
10  set NEMO_VALID = ../CONFIG/NEMO_VALIDATION
11#
12  if ( ! -d $NEMO_VALID ) then
13    echo "$NEMO_VALID validation directory not found"
14  endif
15#
16  set basedir = `pwd`
17  cd $NEMO_VALID
18#
19# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory
20# found in the WGYRE_LONG directory
21#
22  set dorv = `ls -1rtd ./WGYRE_LONG/{$mach}/* | tail -1l `
23  set dorv = $dorv:t
24#
25# Now loop through all the test directories. On the second pass the user can optionally examine any mismatched
26# outputs
27#
28# This is crude but readable and easily extended for new test configurations
29
30foreach pass (0 1 )
31  if ( -d ./WGYRE_LONG ) then
32    set f1o = ./WGYRE_LONG/{$mach}/{$dorv}/LONG/ocean.output
33    set f1s = ./WGYRE_LONG/{$mach}/{$dorv}/LONG/solver.stat
34    set f2o = ./WGYRE_LONG/{$mach}/{$dorv}/SHORT/ocean.output
35    set f2s = ./WGYRE_LONG/{$mach}/{$dorv}/SHORT/solver.stat
36 
37    set nl = `wc -l $f2s`
38    tail -$nl[1] $f1s > f1.tmp$$
39    cmp -s f1.tmp$$ $f2s
40    if ( $status == 0 ) then
41      echo "GYRE     restartability  passed"
42    else
43      echo "GYRE     restartability  FAILED"
44      if ( $pass == 1 ) then
45        echo "<return> to view solver.stat differences"
46        set y = $<
47        sdiff f1.tmp$$ $f2s
48        echo "<return> to view ocean.output differences"
49        set y = $<
50        sdiff $f1o $f2o | grep "|"
51        echo "<return> to continue"
52        set y = $<
53      endif
54    endif
55    rm f1.tmp$$
56  endif
57 
58  if ( -d ./WORCA2LIMPIS_LONG ) then
59    set f1o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output
60    set f1s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/solver.stat
61    set f2o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
62    set f2s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/SHORT/solver.stat
63 
64    set nl = `wc -l $f2s`
65    tail -$nl[1] $f1s > f1.tmp$$
66    cmp -s f1.tmp$$ $f2s
67    if ( $status == 0 ) then
68      echo "ORCA2LIMPIS restartability  passed"
69    else
70      echo "ORCA2LIMPIS restartability  FAILED"
71      if ( $pass == 1 ) then
72        echo "<return> to view solver.stat differences"
73        set y = $<
74        sdiff f1.tmp$$ $f2s
75        echo "<return> to view ocean.output differences"
76        set y = $<
77        sdiff $f1o $f2o | grep "|"
78        echo "<return> to continue"
79        set y = $<
80      endif
81    endif
82    rm f1.tmp$$
83  endif
84
85  if ( -d ./WORCA2OFFPIS_LONG ) then
86    set f1o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output
87    set f1s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/tracer.stat
88    set f2o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
89    set f2s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/SHORT/tracer.stat
90
91    set nl = `wc -l $f2s`
92    tail -$nl[1] $f1s > f1.tmp$$
93    cmp -s f1.tmp$$ $f2s
94    if ( $status == 0 ) then
95      echo "ORCA2OFFPIS restartability  passed"
96    else
97      echo "ORCA2OFFPIS restartability  FAILED"
98      if ( $pass == 1 ) then
99        echo "<return> to view tracer.stat differences"
100        set y = $<
101        sdiff f1.tmp$$ $f2s
102        echo "<return> to view ocean.output differences"
103        set y = $<
104        sdiff $f1o $f2o | grep "|"
105        echo "<return> to continue"
106        set y = $<
107      endif
108    endif
109    rm f1.tmp$$
110  endif
111 
112  if ( -d ./WAMM12_LONG ) then
113    set f1o = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/ocean.output
114    set f1s = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/solver.stat
115    set f2o = ./WAMM12_LONG/{$mach}/{$dorv}/SHORT/ocean.output
116    set f2s = ./WAMM12_LONG/{$mach}/{$dorv}/SHORT/solver.stat
117
118    set nl = `wc -l $f2s`
119    tail -$nl[1] $f1s > f1.tmp$$
120    cmp -s f1.tmp$$ $f2s
121    if ( $status == 0 ) then
122      echo "AMM12       restartability  passed"
123    else
124      echo "AMM12       restartability  FAILED"
125      if ( $pass == 1 ) then
126        echo "<return> to view solver.stat differences"
127        set y = $<
128        sdiff f1.tmp$$ $f2s
129        echo "<return> to view ocean.output differences"
130        set y = $<
131        sdiff $f1o $f2o | grep "|"
132        echo "<return> to continue"
133        set y = $<
134      endif
135    endif
136    rm f1.tmp$$
137  endif
138
139echo
140 
141  if ( -d ./WGYRE_4 ) then
142    set f1o = ./WGYRE_4/{$mach}/{$dorv}/REPRO_1_4/ocean.output
143    set f1s = ./WGYRE_4/{$mach}/{$dorv}/REPRO_1_4/solver.stat
144    set f2o = ./WGYRE_4/{$mach}/{$dorv}/REPRO_2_2/ocean.output
145    set f2s = ./WGYRE_4/{$mach}/{$dorv}/REPRO_2_2/solver.stat
146 
147    cmp -s $f1s $f2s
148    if ( $status == 0 ) then
149      echo "GYRE     reproducibility passed"
150    else
151      echo "GYRE     reproducibility FAILED"
152      if ( $pass == 1 ) then
153        echo "<return> to view solver.stat differences"
154        set y = $<
155        sdiff $f1s $f2s
156        echo "<return> to view ocean.output differences"
157        set y = $<
158        sdiff $f1o $f2o | grep "|"
159        echo "<return> to continue"
160        set y = $<
161      endif
162    endif
163  endif
164 
165  if ( -d ./WORCA2LIMPIS_16 ) then
166    set f1o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
167    set f1s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/solver.stat
168    set f2o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output
169    set f2s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_4_4/solver.stat
170 
171    cmp -s $f1s $f2s
172    if ( $status == 0 ) then
173      echo "ORCA2LIMPIS reproducibility passed"
174    else
175      echo "ORCA2LIMPIS reproducibility FAILED"
176      if ( $pass == 1 ) then
177        echo "<return> to view solver.stat differences"
178        set y = $<
179        sdiff $f1s $f2s
180        echo "<return> to view ocean.output differences"
181        set y = $<
182        sdiff $f1o $f2o | grep "|"
183        echo "<return> to continue"
184        set y = $<
185      endif
186    endif
187  endif
188
189  if ( -d ./WORCA2OFFPIS_16 ) then
190    set f1o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
191    set f1s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/tracer.stat
192    set f2o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output
193    set f2s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_4_4/tracer.stat
194
195    cmp -s $f1s $f2s
196    if ( $status == 0 ) then
197      echo "ORCA2OFFPIS reproducibility passed"
198    else
199      echo "ORCA2OFFPIS reproducibility FAILED"
200      if ( $pass == 1 ) then
201        echo "<return> to view tracer.stat differences"
202        set y = $<
203        sdiff $f1s $f2s
204        echo "<return> to view ocean.output differences"
205        set y = $<
206        sdiff $f1o $f2o | grep "|"
207        echo "<return> to continue"
208        set y = $<
209      endif
210    endif
211  endif
212 
213  if ( -d ./WAMM12_32 ) then
214    set f1o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output
215    set f1s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat
216    set f2o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_8_4/ocean.output
217    set f2s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_8_4/solver.stat
218
219    cmp -s $f1s $f2s
220    if ( $status == 0 ) then
221      echo "AMM12       reproducibility passed"
222    else
223      echo "AMM12       reproducibility FAILED"
224      if ( $pass == 1 ) then
225        echo "<return> to view solver.stat differences"
226        set y = $<
227        sdiff $f1s $f2s
228        echo "<return> to view ocean.output differences"
229        set y = $<
230        sdiff $f1o $f2o | grep "|"
231        echo "<return> to continue"
232        set y = $<
233      endif
234    endif
235  endif
236
237  if ( -d ./WORCA2AGUL_1_2 ) then
238    set f1o = ./WORCA2AGUL_1_2/{$mach}/{$dorv}/SHORT/ocean.output
239    set f1s = ./WORCA2AGUL_1_2/{$mach}/{$dorv}/SHORT/solver.stat
240
241    if ( -f $f1o && -f  $f1s ) then
242      echo "ORCA2_LIM_AGRIF runability passed"
243    else
244      echo "ORCA2_LIM_AGRIF runability FAILED"
245    endif
246  endif
247
248  echo "<return> for second (more detailed) pass (y/n)"
249  set y = $<
250  if ( $y != "y" ) exit
251end
252cd $basedir
253exit
Note: See TracBrowser for help on using the repository browser.