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/2012/dev_NOC_MERCATOR_2012/NEMOGCM/SETTE – NEMO

source: branches/2012/dev_NOC_MERCATOR_2012/NEMOGCM/SETTE/sette_rpt @ 3667

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

Branch dev_NOC_MERCATOR_2012. Return sette.sh to LOCEAN settings and add a simple SETTE report generator

  • Property svn:executable set to *
File size: 7.6 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 WGYRELOB_LONG directory
21#
22  set dorv = `ls -1rtd ./WGYRELOB_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
32  if ( -d ./WGYRELOB_LONG ) then
33    set f1o = ./WGYRELOB_LONG/{$mach}/{$dorv}/LONG/ocean.output
34    set f1s = ./WGYRELOB_LONG/{$mach}/{$dorv}/LONG/solver.stat
35    set f2o = ./WGYRELOB_LONG/{$mach}/{$dorv}/SHORT/ocean.output
36    set f2s = ./WGYRELOB_LONG/{$mach}/{$dorv}/SHORT/solver.stat
37 
38    set nl = `wc -l $f2s`
39    tail -$nl[1] $f1s > f1.tmp$$
40    cmp -s f1.tmp$$ $f2s
41    if ( $status == 0 ) then
42      echo "GYRELOB     restartability  passed"
43    else
44      echo "GYRELOB     restartability  FAILED"
45      if ( $pass == 1 ) then
46        echo "<return> to view solver.stat differences"
47        set y = $<
48        sdiff -W f1.tmp$$ $f2s
49        echo "<return> to view ocean.output differences"
50        set y = $<
51        sdiff -W $f1o $f2o | grep "|"
52        echo "<return> to continue"
53        set y = $<
54      endif
55    endif
56    rm f1.tmp$$
57  endif
58 
59  if ( -d ./WORCA2LIMPIS_LONG ) then
60    set f1o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output
61    set f1s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/solver.stat
62    set f2o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
63    set f2s = ./WORCA2LIMPIS_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 "ORCA2LIMPIS restartability  passed"
70    else
71      echo "ORCA2LIMPIS restartability  FAILED"
72      if ( $pass == 1 ) then
73        echo "<return> to view solver.stat differences"
74        set y = $<
75        sdiff -W f1.tmp$$ $f2s
76        echo "<return> to view ocean.output differences"
77        set y = $<
78        sdiff -W $f1o $f2o | grep "|"
79        echo "<return> to continue"
80        set y = $<
81      endif
82    endif
83    rm f1.tmp$$
84  endif
85
86  if ( -d ./WORCA2OFFPIS_LONG ) then
87    set f1o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output
88    set f1s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/tracer.stat
89    set f2o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
90    set f2s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/SHORT/tracer.stat
91
92    set nl = `wc -l $f2s`
93    tail -$nl[1] $f1s > f1.tmp$$
94    cmp -s f1.tmp$$ $f2s
95    if ( $status == 0 ) then
96      echo "ORCA2OFFPIS restartability  passed"
97    else
98      echo "ORCA2OFFPIS restartability  FAILED"
99      if ( $pass == 1 ) then
100        echo "<return> to view tracer.stat differences"
101        set y = $<
102        sdiff -W f1.tmp$$ $f2s
103        echo "<return> to view ocean.output differences"
104        set y = $<
105        sdiff -W $f1o $f2o | grep "|"
106        echo "<return> to continue"
107        set y = $<
108      endif
109    endif
110    rm f1.tmp$$
111  endif
112 
113  if ( -d ./WAMM12_LONG ) then
114    set f1o = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/ocean.output
115    set f1s = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/solver.stat
116    set f2o = ./WAMM12_LONG/{$mach}/{$dorv}/SHORT/ocean.output
117    set f2s = ./WAMM12_LONG/{$mach}/{$dorv}/SHORT/solver.stat
118
119    set nl = `wc -l $f2s`
120    tail -$nl[1] $f1s > f1.tmp$$
121    cmp -s f1.tmp$$ $f2s
122    if ( $status == 0 ) then
123      echo "AMM12       restartability  passed"
124    else
125      echo "AMM12       restartability  FAILED"
126      if ( $pass == 1 ) then
127        echo "<return> to view solver.stat differences"
128        set y = $<
129        sdiff -W f1.tmp$$ $f2s
130        echo "<return> to view ocean.output differences"
131        set y = $<
132        sdiff -W $f1o $f2o | grep "|"
133        echo "<return> to continue"
134        set y = $<
135      endif
136    endif
137    rm f1.tmp$$
138  endif
139
140echo
141 
142  if ( -d ./WGYRELOB_4 ) then
143    set f1o = ./WGYRELOB_4/{$mach}/{$dorv}/REPRO_1_4/ocean.output
144    set f1s = ./WGYRELOB_4/{$mach}/{$dorv}/REPRO_1_4/solver.stat
145    set f2o = ./WGYRELOB_4/{$mach}/{$dorv}/REPRO_2_2/ocean.output
146    set f2s = ./WGYRELOB_4/{$mach}/{$dorv}/REPRO_2_2/solver.stat
147 
148    cmp -s $f1s $f2s
149    if ( $status == 0 ) then
150      echo "GYRELOB     reproducibility passed"
151    else
152      echo "GYRELOB     reproducibility FAILED"
153      if ( $pass == 1 ) then
154        echo "<return> to view solver.stat differences"
155        set y = $<
156        sdiff -W $f1s $f2s
157        echo "<return> to view ocean.output differences"
158        set y = $<
159        sdiff -W $f1o $f2o | grep "|"
160        echo "<return> to continue"
161        set y = $<
162      endif
163    endif
164  endif
165 
166  if ( -d ./WORCA2LIMPIS_16 ) then
167    set f1o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
168    set f1s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/solver.stat
169    set f2o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output
170    set f2s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_4_4/solver.stat
171 
172    cmp -s $f1s $f2s
173    if ( $status == 0 ) then
174      echo "ORCA2LIMPIS reproducibility passed"
175    else
176      echo "ORCA2LIMPIS reproducibility FAILED"
177      if ( $pass == 1 ) then
178        echo "<return> to view solver.stat differences"
179        set y = $<
180        sdiff -W $f1s $f2s
181        echo "<return> to view ocean.output differences"
182        set y = $<
183        sdiff -W $f1o $f2o | grep "|"
184        echo "<return> to continue"
185        set y = $<
186      endif
187    endif
188  endif
189
190  if ( -d ./WORCA2OFFPIS_16 ) then
191    set f1o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
192    set f1s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/tracer.stat
193    set f2o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output
194    set f2s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_4_4/tracer.stat
195
196    cmp -s $f1s $f2s
197    if ( $status == 0 ) then
198      echo "ORCA2OFFPIS reproducibility passed"
199    else
200      echo "ORCA2OFFPIS reproducibility FAILED"
201      if ( $pass == 1 ) then
202        echo "<return> to view tracer.stat differences"
203        set y = $<
204        sdiff -W $f1s $f2s
205        echo "<return> to view ocean.output differences"
206        set y = $<
207        sdiff -W $f1o $f2o | grep "|"
208        echo "<return> to continue"
209        set y = $<
210      endif
211    endif
212  endif
213 
214  if ( -d ./WAMM12_32 ) then
215    set f1o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output
216    set f1s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat
217    set f2o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_8_4/ocean.output
218    set f2s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_8_4/solver.stat
219
220    cmp -s $f1s $f2s
221    if ( $status == 0 ) then
222      echo "AMM12       reproducibility passed"
223    else
224      echo "AMM12       reproducibility FAILED"
225      if ( $pass == 1 ) then
226        echo "<return> to view solver.stat differences"
227        set y = $<
228        sdiff -W $f1s $f2s
229        echo "<return> to view ocean.output differences"
230        set y = $<
231        sdiff -W $f1o $f2o | grep "|"
232        echo "<return> to continue"
233        set y = $<
234      endif
235    endif
236  endif
237
238  echo "<return> for second (more detailed) pass (y/n)"
239  set y = $<
240  if ( $y != "y" ) exit
241end
242cd $basedir
243exit
Note: See TracBrowser for help on using the repository browser.