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/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE – NEMO

source: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette_rpt @ 4924

Last change on this file since 4924 was 4924, checked in by mathiot, 9 years ago

UKM02_ice_shelves merged and SETTE tested with revision 4879 of trunk

  • Property svn:executable set to *
File size: 14.1 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 found in each directory
20#
21#
22# Now loop through all the test directories. On the second pass the user can optionally examine any mismatched
23# outputs
24#
25# This is crude but readable and easily extended for new test configurations
26
27foreach pass (0 1 )
28  if ( -d ./WGYRE_LONG ) then
29    set dorv = `ls -1rtd ./WGYRE_LONG/{$mach}/* | tail -1l `
30    set dorv = $dorv:t
31    set f1o = ./WGYRE_LONG/{$mach}/{$dorv}/LONG/ocean.output
32    set f1s = ./WGYRE_LONG/{$mach}/{$dorv}/LONG/solver.stat
33    set f2o = ./WGYRE_LONG/{$mach}/{$dorv}/SHORT/ocean.output
34    set f2s = ./WGYRE_LONG/{$mach}/{$dorv}/SHORT/solver.stat
35 
36    set nl = `wc -l $f2s`
37    tail -$nl[1] $f1s > f1.tmp$$
38    cmp -s f1.tmp$$ $f2s
39    if ( $status == 0 ) then
40      echo "GYRE        restartability  passed"
41    else
42      echo "GYRE        restartability  FAILED"
43      if ( $pass == 1 ) then
44        echo "<return> to view solver.stat differences"
45        set y = $<
46        sdiff f1.tmp$$ $f2s
47        echo "<return> to view ocean.output differences"
48        set y = $<
49        sdiff $f1o $f2o | grep "|"
50        echo "<return> to continue"
51        set y = $<
52      endif
53    endif
54    rm f1.tmp$$
55  endif
56
57  if ( -d ./WISOMIP_LONG ) then
58    set dorv = `ls -1rtd ./WISOMIP_LONG/{$mach}/* | tail -1l `
59    set dorv = $dorv:t
60    set f1o = ./WISOMIP_LONG/{$mach}/{$dorv}/LONG/ocean.output
61    set f1s = ./WISOMIP_LONG/{$mach}/{$dorv}/LONG/solver.stat
62    set f2o = ./WISOMIP_LONG/{$mach}/{$dorv}/SHORT/ocean.output
63    set f2s = ./WISOMIP_LONG/{$mach}/{$dorv}/SHORT/solver.stat
64
65    set nl = `wc -l $f2s`
66    tail -$nl[1] $f1s > f1.tmp$$
67    cmp -s f1.tmp$$ $f2s
68    if ( $status == 0 ) then
69      echo "ISOMIP      restartability  passed"
70    else
71      echo "ISOMIP      restartability  FAILED"
72      if ( $pass == 1 ) then
73        echo "<return> to view solver.stat differences"
74        set y = $<
75        sdiff f1.tmp$$ $f2s
76        echo "<return> to view ocean.output differences"
77        set y = $<
78        sdiff $f1o $f2o | grep "|"
79        echo "<return> to continue"
80        set y = $<
81      endif
82    endif
83    rm f1.tmp$$
84  endif
85
86 
87  if ( -d ./WORCA2LIMPIS_LONG ) then
88    set dorv = `ls -1rtd ./WORCA2LIMPIS_LONG/{$mach}/* | tail -1l `
89    set dorv = $dorv:t
90    set f1o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output
91    set f1s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/solver.stat
92    set f2o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
93    set f2s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/SHORT/solver.stat
94 
95    set nl = `wc -l $f2s`
96    tail -$nl[1] $f1s > f1.tmp$$
97    cmp -s f1.tmp$$ $f2s
98    if ( $status == 0 ) then
99      echo "ORCA2LIMPIS restartability  passed"
100    else
101      echo "ORCA2LIMPIS restartability  FAILED"
102      if ( $pass == 1 ) then
103        echo "<return> to view solver.stat differences"
104        set y = $<
105        sdiff f1.tmp$$ $f2s
106        echo "<return> to view ocean.output differences"
107        set y = $<
108        sdiff $f1o $f2o | grep "|"
109        echo "<return> to continue"
110        set y = $<
111      endif
112    endif
113    rm f1.tmp$$
114  endif
115
116  if ( -d ./WORCA2OFFPIS_LONG ) then
117    set dorv = `ls -1rtd ./WORCA2OFFPIS_LONG/{$mach}/* | tail -1l `
118    set dorv = $dorv:t
119    set f1o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output
120    set f1s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/tracer.stat
121    set f2o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
122    set f2s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/SHORT/tracer.stat
123
124    set nl = `wc -l $f2s`
125    tail -$nl[1] $f1s > f1.tmp$$
126    cmp -s f1.tmp$$ $f2s
127    if ( $status == 0 ) then
128      echo "ORCA2OFFPIS restartability  passed"
129    else
130      echo "ORCA2OFFPIS restartability  FAILED"
131      if ( $pass == 1 ) then
132        echo "<return> to view tracer.stat differences"
133        set y = $<
134        sdiff f1.tmp$$ $f2s
135        echo "<return> to view ocean.output differences"
136        set y = $<
137        sdiff $f1o $f2o | grep "|"
138        echo "<return> to continue"
139        set y = $<
140      endif
141    endif
142    rm f1.tmp$$
143  endif
144 
145  if ( -d ./WAMM12_LONG ) then
146    set dorv = `ls -1rtd ./WAMM12_LONG/{$mach}/* | tail -1l `
147    set dorv = $dorv:t
148    set f1o = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/ocean.output
149    set f1s = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/solver.stat
150    set f2o = ./WAMM12_LONG/{$mach}/{$dorv}/SHORT/ocean.output
151    set f2s = ./WAMM12_LONG/{$mach}/{$dorv}/SHORT/solver.stat
152
153    set nl = `wc -l $f2s`
154    tail -$nl[1] $f1s > f1.tmp$$
155    cmp -s f1.tmp$$ $f2s
156    if ( $status == 0 ) then
157      echo "AMM12       restartability  passed"
158    else
159      echo "AMM12       restartability  FAILED"
160      if ( $pass == 1 ) then
161        echo "<return> to view solver.stat differences"
162        set y = $<
163        sdiff f1.tmp$$ $f2s
164        echo "<return> to view ocean.output differences"
165        set y = $<
166        sdiff $f1o $f2o | grep "|"
167        echo "<return> to continue"
168        set y = $<
169      endif
170    endif
171    rm f1.tmp$$
172  endif
173  if ( -d ./WORCA2LIM3_LONG ) then
174    set dorv = `ls -1rtd ./WORCA2LIM3_LONG/{$mach}/* | tail -1l `
175    set dorv = $dorv:t
176    set f1o = ./WORCA2LIM3_LONG/{$mach}/{$dorv}/LONG/ocean.output
177    set f1s = ./WORCA2LIM3_LONG/{$mach}/{$dorv}/LONG/solver.stat
178    set f2o = ./WORCA2LIM3_LONG/{$mach}/{$dorv}/SHORT/ocean.output
179    set f2s = ./WORCA2LIM3_LONG/{$mach}/{$dorv}/SHORT/solver.stat
180
181    set nl = `wc -l $f2s`
182    tail -$nl[1] $f1s > f1.tmp$$
183    cmp -s f1.tmp$$ $f2s
184    if ( $status == 0 ) then
185      echo "ORCA2LIM3       restartability  passed"
186    else
187      echo "ORCA2LIM3       restartability  FAILED"
188      if ( $pass == 1 ) then
189        echo "<return> to view solver.stat differences"
190        set y = $<
191        sdiff f1.tmp$$ $f2s
192        echo "<return> to view ocean.output differences"
193        set y = $<
194        sdiff $f1o $f2o | grep "|"
195        echo "<return> to continue"
196        set y = $<
197      endif
198    endif
199    rm f1.tmp$$
200  endif
201NEXT0:
202  if ( -d ./WSAS_LONG ) then
203    set dorv = `ls -1rtd ./WSAS_LONG/{$mach}/* | tail -1l `
204    set dorv = $dorv:t
205    set f1o = ./WSAS_LONG/{$mach}/{$dorv}/LONG/ocean.output
206    set f1s = ./WSAS_LONG/{$mach}/{$dorv}/LONG/solver.stat
207    set f2o = ./WSAS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
208    set f2s = ./WSAS_LONG/{$mach}/{$dorv}/SHORT/solver.stat
209
210    foreach f ( $f1o $f1s $f2o $f2s )
211     if ( ! -f $f ) then
212      echo 'SAS         restartability  inconclusive ( ' $f:t ' not found )'
213      goto NEXT
214     endif
215    end
216
217    set nl = `wc -l $f2s`
218    tail -$nl[1] $f1s > f1.tmp$$
219    cmp -s f1.tmp$$ $f2s
220    if ( $status == 0 ) then
221      echo "SAS         restartability  passed"
222    else
223      echo "SAS         restartability  FAILED"
224      if ( $pass == 1 ) then
225        echo "<return> to view solver.stat differences"
226        set y = $<
227        sdiff f1.tmp$$ $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    rm f1.tmp$$
236  endif
237
238NEXT:
239echo
240 
241  if ( -d ./WGYRE_4 ) then
242    set dorv = `ls -1rtd ./WGYRE_4/{$mach}/* | tail -1l `
243    set dorv = $dorv:t
244    set f1o = ./WGYRE_4/{$mach}/{$dorv}/REPRO_1_4/ocean.output
245    set f1s = ./WGYRE_4/{$mach}/{$dorv}/REPRO_1_4/solver.stat
246    set f2o = ./WGYRE_4/{$mach}/{$dorv}/REPRO_2_2/ocean.output
247    set f2s = ./WGYRE_4/{$mach}/{$dorv}/REPRO_2_2/solver.stat
248 
249    cmp -s $f1s $f2s
250    if ( $status == 0 ) then
251      echo "GYRE        reproducibility passed"
252    else
253      echo "GYRE        reproducibility FAILED"
254      if ( $pass == 1 ) then
255        echo "<return> to view solver.stat differences"
256        set y = $<
257        sdiff $f1s $f2s
258        echo "<return> to view ocean.output differences"
259        set y = $<
260        sdiff $f1o $f2o | grep "|"
261        echo "<return> to continue"
262        set y = $<
263      endif
264    endif
265  endif
266
267  if ( -d ./WISOMIP_4 ) then
268    set dorv = `ls -1rtd ./WISOMIP_4/{$mach}/* | tail -1l `
269    set dorv = $dorv:t
270    set f1o = ./WISOMIP_4/{$mach}/{$dorv}/REPRO_1_4/ocean.output
271    set f1s = ./WISOMIP_4/{$mach}/{$dorv}/REPRO_1_4/solver.stat
272    set f2o = ./WISOMIP_4/{$mach}/{$dorv}/REPRO_2_2/ocean.output
273    set f2s = ./WISOMIP_4/{$mach}/{$dorv}/REPRO_2_2/solver.stat
274
275    cmp -s $f1s $f2s
276    if ( $status == 0 ) then
277      echo "ISOMIP      reproducibility passed"
278    else
279      echo "ISOMIP      reproducibility FAILED"
280      if ( $pass == 1 ) then
281        echo "<return> to view solver.stat differences"
282        set y = $<
283        sdiff $f1s $f2s
284        echo "<return> to view ocean.output differences"
285        set y = $<
286        sdiff $f1o $f2o | grep "|"
287        echo "<return> to continue"
288        set y = $<
289      endif
290    endif
291  endif
292 
293  if ( -d ./WORCA2LIMPIS_16 ) then
294    set dorv = `ls -1rtd ./WORCA2LIMPIS_16/{$mach}/* | tail -1l `
295    set dorv = $dorv:t
296    set f1o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
297    set f1s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/solver.stat
298    set f2o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output
299    set f2s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_4_4/solver.stat
300 
301    cmp -s $f1s $f2s
302    if ( $status == 0 ) then
303      echo "ORCA2LIMPIS reproducibility passed"
304    else
305      echo "ORCA2LIMPIS reproducibility FAILED"
306      if ( $pass == 1 ) then
307        echo "<return> to view solver.stat differences"
308        set y = $<
309        sdiff $f1s $f2s
310        echo "<return> to view ocean.output differences"
311        set y = $<
312        sdiff $f1o $f2o | grep "|"
313        echo "<return> to continue"
314        set y = $<
315      endif
316    endif
317  endif
318
319  if ( -d ./WORCA2OFFPIS_16 ) then
320    set dorv = `ls -1rtd ./WORCA2OFFPIS_16/{$mach}/* | tail -1l `
321    set dorv = $dorv:t
322    set f1o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
323    set f1s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/tracer.stat
324    set f2o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output
325    set f2s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_4_4/tracer.stat
326
327    cmp -s $f1s $f2s
328    if ( $status == 0 ) then
329      echo "ORCA2OFFPIS reproducibility passed"
330    else
331      echo "ORCA2OFFPIS reproducibility FAILED"
332      if ( $pass == 1 ) then
333        echo "<return> to view tracer.stat differences"
334        set y = $<
335        sdiff $f1s $f2s
336        echo "<return> to view ocean.output differences"
337        set y = $<
338        sdiff $f1o $f2o | grep "|"
339        echo "<return> to continue"
340        set y = $<
341      endif
342    endif
343  endif
344 
345  if ( -d ./WAMM12_32 ) then
346    set dorv = `ls -1rtd ./WAMM12_32/{$mach}/* | tail -1l `
347    set dorv = $dorv:t
348    set f1o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output
349    set f1s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat
350    set f2o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_8_4/ocean.output
351    set f2s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_8_4/solver.stat
352
353    cmp -s $f1s $f2s
354    if ( $status == 0 ) then
355      echo "AMM12       reproducibility passed"
356    else
357      echo "AMM12       reproducibility FAILED"
358      if ( $pass == 1 ) then
359        echo "<return> to view solver.stat differences"
360        set y = $<
361        sdiff $f1s $f2s
362        echo "<return> to view ocean.output differences"
363        set y = $<
364        sdiff $f1o $f2o | grep "|"
365        echo "<return> to continue"
366        set y = $<
367      endif
368    endif
369  endif
370  if ( -d ./WORCA2LIM3_16 ) then
371    set dorv = `ls -1rtd ./WORCA2LIM3_16/{$mach}/* | tail -1l `
372    set dorv = $dorv:t
373    set f1o = ./WORCA2LIM3_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
374    set f1s = ./WORCA2LIM3_16/{$mach}/{$dorv}/REPRO_2_8/solver.stat
375    set f2o = ./WORCA2LIM3_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output
376    set f2s = ./WORCA2LIM3_16/{$mach}/{$dorv}/REPRO_4_4/solver.stat
377
378    cmp -s $f1s $f2s
379    if ( $status == 0 ) then
380      echo "ORCA2LIM3   reproducibility passed"
381    else
382      echo "ORCA2LIM3   reproducibility FAILED"
383      if ( $pass == 1 ) then
384        echo "<return> to view solver.stat differences"
385        set y = $<
386        sdiff $f1s $f2s
387        echo "<return> to view ocean.output differences"
388        set y = $<
389        sdiff $f1o $f2o | grep "|"
390        echo "<return> to continue"
391        set y = $<
392      endif
393    endif
394  endif
395
396
397  if ( -d ./WSAS_32 ) then
398    set dorv = `ls -1rtd ./WSAS_32/{$mach}/* | tail -1l `
399    set dorv = $dorv:t
400    set f1o = ./WSAS_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output
401    set f1s = ./WSAS_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat
402    set f2o = ./WSAS_32/{$mach}/{$dorv}/REPRO_8_4/ocean.output
403    set f2s = ./WSAS_32/{$mach}/{$dorv}/REPRO_8_4/solver.stat
404
405    foreach f ( $f1o $f1s $f2o $f2s )
406     if ( ! -f $f ) then
407      echo 'SAS         reproducibility inconclusive ( ' $f:t ' not found )'
408      goto NEXT1
409     endif
410    end
411
412    cmp -s $f1s $f2s
413    if ( $status == 0 ) then
414      echo "SAS reproducibility passed"
415    else
416      echo "SAS reproducibility FAILED"
417      if ( $pass == 1 ) then
418        echo "<return> to view solver.stat differences"
419        set y = $<
420        sdiff $f1s $f2s
421        echo "<return> to view ocean.output differences"
422        set y = $<
423        sdiff $f1o $f2o | grep "|"
424        echo "<return> to continue"
425        set y = $<
426      endif
427    endif
428  endif
429NEXT1:
430
431  if ( -d ./WORCA2AGUL_1_2 ) then
432    set dorv = `ls -1rtd ./WORCA2AGUL_1_2/{$mach}/* | tail -1l `
433    set dorv = $dorv:t
434    set f1o = ./WORCA2AGUL_1_2/{$mach}/{$dorv}/SHORT/ocean.output
435    set f1s = ./WORCA2AGUL_1_2/{$mach}/{$dorv}/SHORT/solver.stat
436
437    if ( -f $f1o && -f  $f1s ) then
438      echo "ORCA2_LIM_AGRIF runability passed"
439    else
440      echo "ORCA2_LIM_AGRIF runability FAILED"
441    endif
442  endif
443
444  echo "<return> for second (more detailed) pass (y/n)"
445  set y = $<
446  if ( $y != "y" ) exit
447end
448cd $basedir
449exit
Note: See TracBrowser for help on using the repository browser.