Merge lp:~fluidity-core/fluidity/ocean_forcing into lp:fluidity

Proposed by Jon Hill
Status: Merged
Merged at revision: 3572
Proposed branch: lp:~fluidity-core/fluidity/ocean_forcing
Merge into: lp:fluidity
Diff against target: 1474 lines (+1331/-39)
10 files modified
main/Usage.cpp (+17/-11)
ocean_forcing/bulk_parameterisations.F90 (+0/-1)
ocean_forcing/forcingERA40.cpp (+11/-2)
schemas/fluidity_options.rnc (+14/-9)
schemas/fluidity_options.rng (+25/-16)
tests/forcing_inst_vals/Makefile (+7/-0)
tests/forcing_inst_vals/forcing-ncar.flml (+587/-0)
tests/forcing_inst_vals/forcing-ncar_inst.flml (+589/-0)
tests/forcing_inst_vals/forcing_inst_vals.xml (+56/-0)
tests/forcing_inst_vals/src/column.geo (+25/-0)
To merge this branch: bzr merge lp:~fluidity-core/fluidity/ocean_forcing
Reviewer Review Type Date Requested Status
Simon Mouradian Approve
Review via email: mp+73819@code.launchpad.net

Description of the change

Removed the assumption of accumulated values by adding a flag to switch it off. This allows files with instantaneous values to be used instead.

This is largely for Nick's MSci project, but is part of a large plan to make the forcing routines more flexible.

To post a comment you must log in.
3570. By Simon Mouradian

Very minor modifications.

-Added spaces to diamond description.
- Enforced type real on accumulated_correction assignment (not sure if this matters?)

Revision history for this message
Simon Mouradian (mouradian) wrote :

Looks good to me. Ship it!

Revision history for this message
Simon Mouradian (mouradian) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'main/Usage.cpp'
--- main/Usage.cpp 2011-07-12 10:06:34 +0000
+++ main/Usage.cpp 2011-09-05 07:36:25 +0000
@@ -384,17 +384,23 @@
384 if(have_option("/ocean_forcing/bulk_formulae/file_type")) {384 if(have_option("/ocean_forcing/bulk_formulae/file_type")) {
385 get_option("/ocean_forcing/bulk_formulae/file_type/filetype/name", dataset);385 get_option("/ocean_forcing/bulk_formulae/file_type/filetype/name", dataset);
386 }386 }
387 FluxesReader_global.RegisterDataFile(option);387 if (dataset == "ERA40") {
388 // field from NetCDF file Index | Physical meaning388 FluxesReader_global.RegisterDataFile(option);
389 FluxesReader_global.AddFieldOfInterest("u10"); // 0 | 10 metre U wind component389 // field from NetCDF file Index | Physical meaning
390 FluxesReader_global.AddFieldOfInterest("v10"); // 1 | 10 metre V wind component390 FluxesReader_global.AddFieldOfInterest("u10"); // 0 | 10 metre U wind component
391 FluxesReader_global.AddFieldOfInterest("ssrd"); // 2 | Surface solar radiation391 FluxesReader_global.AddFieldOfInterest("v10"); // 1 | 10 metre V wind component
392 FluxesReader_global.AddFieldOfInterest("strd"); // 3 | Surface thermal radiation 392 FluxesReader_global.AddFieldOfInterest("ssrd"); // 2 | Surface solar radiation
393 FluxesReader_global.AddFieldOfInterest("ro"); // 4 | Runoff393 FluxesReader_global.AddFieldOfInterest("strd"); // 3 | Surface thermal radiation
394 FluxesReader_global.AddFieldOfInterest("tp"); // 5 | Total precipitation394 FluxesReader_global.AddFieldOfInterest("ro"); // 4 | Runoff
395 FluxesReader_global.AddFieldOfInterest("d2m"); // 6 | Dew point temp at 2m395 FluxesReader_global.AddFieldOfInterest("tp"); // 5 | Total precipitation
396 FluxesReader_global.AddFieldOfInterest("t2m"); // 7 | Air temp at 2m 396 FluxesReader_global.AddFieldOfInterest("d2m"); // 6 | Dew point temp at 2m
397 FluxesReader_global.AddFieldOfInterest("msl"); // 8 | Mean sea level pressure 397 FluxesReader_global.AddFieldOfInterest("t2m"); // 7 | Air temp at 2m
398 FluxesReader_global.AddFieldOfInterest("msl"); // 8 | Mean sea level pressure
399 } else {
400 cerr<<"ERROR: unsupported bulk formula input file type. Choose ERA40\n";
401 exit(-1);
402 }
403
398 }404 }
399405
400 if(have_option("/ocean_biology/lagrangian_ensemble/hyperlight")) {406 if(have_option("/ocean_biology/lagrangian_ensemble/hyperlight")) {
401407
=== modified file 'ocean_forcing/bulk_parameterisations.F90'
--- ocean_forcing/bulk_parameterisations.F90 2011-02-08 14:23:43 +0000
+++ ocean_forcing/bulk_parameterisations.F90 2011-09-05 07:36:25 +0000
@@ -64,7 +64,6 @@
64 OneOverDensity = 1.0 / ocean_density, &64 OneOverDensity = 1.0 / ocean_density, &
65 ocean_heat_capacity = 4000.0, &65 ocean_heat_capacity = 4000.0, &
66 kelvin_centrigrade = 273.15, &66 kelvin_centrigrade = 273.15, &
67 accumulated_correction = 6.0*60.0*60.0, & ! Assumes data every 6 hours.
68 heat_convert = 1.0 / (ocean_density * ocean_heat_capacity), &67 heat_convert = 1.0 / (ocean_density * ocean_heat_capacity), &
69 one_over_density = 1.0 / ocean_density68 one_over_density = 1.0 / ocean_density
7069
7170
=== modified file 'ocean_forcing/forcingERA40.cpp'
--- ocean_forcing/forcingERA40.cpp 2011-06-07 08:12:34 +0000
+++ ocean_forcing/forcingERA40.cpp 2011-09-05 07:36:25 +0000
@@ -28,8 +28,10 @@
28#include "confdefs.h"28#include "confdefs.h"
29#include "BulkForcing.h"29#include "BulkForcing.h"
30#include "FluxesReader.h"30#include "FluxesReader.h"
31#include "spud"
3132
32using namespace std;33using namespace std;
34using namespace Spud;
3335
34extern int projections(int nPoints, double *x, double *y, double *z, string current_coord, string output_coord);36extern int projections(int nPoints, double *x, double *y, double *z, string current_coord, string output_coord);
3537
@@ -43,8 +45,10 @@
43 const double air_density = 1.22, 45 const double air_density = 1.22,
44 q1 = 0.98*640380, 46 q1 = 0.98*640380,
45 q2 = -5107.4,47 q2 = -5107.4,
46 kelvin_centrigrade = 273.15,48 kelvin_centrigrade = 273.15;
47 accumulated_correction = 6.0*60.0*60.0; // Assumes data every 6 hours.49
50 // Set up for ERA40 data. Options to change rate are set below
51 double accumulated_correction = 6.0*60.0*60.0; // Assumes data every 6 hours.
4852
49 // problem constants53 // problem constants
50 const int nFields = 9;54 const int nFields = 9;
@@ -65,6 +69,11 @@
65 double *SST = new double[NNodes];69 double *SST = new double[NNodes];
6670
67 FluxesReader_global.SetTimeSeconds(*time);71 FluxesReader_global.SetTimeSeconds(*time);
72
73 if(have_option("/ocean_forcing/bulk_formulae/input_file_type/type::ERA40/no_accumulation")) {
74 cout<<"Found flag"<<endl;
75 accumulated_correction = 1.0;
76 }
68 77
69 // convert from Cart to long-lat78 // convert from Cart to long-lat
70 double *x = new double[NNodes];79 double *x = new double[NNodes];
7180
=== modified file 'schemas/fluidity_options.rnc'
--- schemas/fluidity_options.rnc 2011-07-27 12:49:45 +0000
+++ schemas/fluidity_options.rnc 2011-09-05 07:36:25 +0000
@@ -6508,15 +6508,20 @@
6508 ## What kind of file is this? Currently only ERA40 files are supported6508 ## What kind of file is this? Currently only ERA40 files are supported
6509 element type {6509 element type {
6510 attribute name { "ERA40" },6510 attribute name { "ERA40" },
6511 empty6511 ## The data from ERA40 website included accumulated values (ppt, ro, ssrd, strd).
6512 #}|6512 ## If these values have been already ammended to instantaneous values, then switch this
6513 #element type {6513 ## flag on and the accumulation correction will not be applied.
6514 # attribute name { "NSEP" },6514 element no_accumulation {
6515 # empty6515 empty
6516 #}|6516 }?
6517 #element type {6517 }|
6518 # attribute name { "ICOM" },6518 element type {
6519 # empty6519 attribute name { "NSEP" },
6520 empty
6521 }|
6522 element type {
6523 attribute name { "ICOM" },
6524 empty
6520 }6525 }
6521 }?,6526 }?,
6522 ## Adding a latitude and longitude here (specified as two real numbers)6527 ## Adding a latitude and longitude here (specified as two real numbers)
65236528
=== modified file 'schemas/fluidity_options.rng'
--- schemas/fluidity_options.rng 2011-07-27 12:49:45 +0000
+++ schemas/fluidity_options.rng 2011-09-05 07:36:25 +0000
@@ -8248,25 +8248,34 @@
8248 </element>8248 </element>
8249 <optional>8249 <optional>
8250 <element name="input_file_type">8250 <element name="input_file_type">
8251 <element name="type">8251 <choice>
8252 <a:documentation>What kind of file is this? Currently only ERA40 files are supported</a:documentation>8252 <element name="type">
8253 <group>8253 <a:documentation>What kind of file is this? Currently only ERA40 files are supported</a:documentation>
8254 <attribute name="name">8254 <attribute name="name">
8255 <value>ERA40</value>8255 <value>ERA40</value>
8256 </attribute>8256 </attribute>
8257 <empty/>8257 <optional>
8258 </group>8258 <element name="no_accumulation">
8259 <!--8259 <a:documentation>The data from ERA40 website included accumulated values (ppt, ro, ssrd, strd).
8260 }|8260If these values have been already ammended to instantaneous values, then switch this
8261 element type {8261flag on and the accumulation correction will not be applied.</a:documentation>
8262 attribute name { "NSEP" },8262 <empty/>
8263 empty8263 </element>
8264 }|8264 </optional>
8265 element type {8265 </element>
8266 attribute name { "ICOM" },8266 <element name="type">
8267 empty8267 <attribute name="name">
8268 -->8268 <value>NSEP</value>
8269 </element>8269 </attribute>
8270 <empty/>
8271 </element>
8272 <element name="type">
8273 <attribute name="name">
8274 <value>ICOM</value>
8275 </attribute>
8276 <empty/>
8277 </element>
8278 </choice>
8270 </element>8279 </element>
8271 </optional>8280 </optional>
8272 <optional>8281 <optional>
82738282
=== added directory 'tests/forcing_inst_vals'
=== added file 'tests/forcing_inst_vals/1970_stationPapa.nc'
8274Binary files tests/forcing_inst_vals/1970_stationPapa.nc 1970-01-01 00:00:00 +0000 and tests/forcing_inst_vals/1970_stationPapa.nc 2011-09-05 07:36:25 +0000 differ8283Binary files tests/forcing_inst_vals/1970_stationPapa.nc 1970-01-01 00:00:00 +0000 and tests/forcing_inst_vals/1970_stationPapa.nc 2011-09-05 07:36:25 +0000 differ
=== added file 'tests/forcing_inst_vals/1970_stationPapa_unacc.nc'
8275Binary files tests/forcing_inst_vals/1970_stationPapa_unacc.nc 1970-01-01 00:00:00 +0000 and tests/forcing_inst_vals/1970_stationPapa_unacc.nc 2011-09-05 07:36:25 +0000 differ8284Binary files tests/forcing_inst_vals/1970_stationPapa_unacc.nc 1970-01-01 00:00:00 +0000 and tests/forcing_inst_vals/1970_stationPapa_unacc.nc 2011-09-05 07:36:25 +0000 differ
=== added file 'tests/forcing_inst_vals/Makefile'
--- tests/forcing_inst_vals/Makefile 1970-01-01 00:00:00 +0000
+++ tests/forcing_inst_vals/Makefile 2011-09-05 07:36:25 +0000
@@ -0,0 +1,7 @@
1input: clean
2 gmsh -3 -o column.msh src/column.geo
3 ../../scripts/gmsh2triangle column.msh
4
5clean:
6 rm -f *.ele *.edge *.node *.face *.poly *.vtu *.s *.stat *.log-0 *.err-0 matrixdump* *log *err
7 rm -f *.msh
08
=== added file 'tests/forcing_inst_vals/forcing-ncar.flml'
--- tests/forcing_inst_vals/forcing-ncar.flml 1970-01-01 00:00:00 +0000
+++ tests/forcing_inst_vals/forcing-ncar.flml 2011-09-05 07:36:25 +0000
@@ -0,0 +1,587 @@
1<?xml version='1.0' encoding='utf-8'?>
2<fluidity_options>
3 <simulation_name>
4 <string_value lines="1">forcing-ncar</string_value>
5 </simulation_name>
6 <problem_type>
7 <string_value lines="1">oceans</string_value>
8 </problem_type>
9 <geometry>
10 <dimension>
11 <integer_value rank="0">3</integer_value>
12 </dimension>
13 <mesh name="CoordinateMesh">
14 <from_file file_name="column">
15 <format name="triangle"/>
16 <stat>
17 <include_in_stat/>
18 </stat>
19 </from_file>
20 </mesh>
21 <mesh name="VelocityMesh">
22 <from_mesh>
23 <mesh name="CoordinateMesh"/>
24 <stat>
25 <exclude_from_stat/>
26 </stat>
27 </from_mesh>
28 </mesh>
29 <mesh name="PressureMesh">
30 <from_mesh>
31 <mesh name="CoordinateMesh"/>
32 <stat>
33 <exclude_from_stat/>
34 </stat>
35 </from_mesh>
36 </mesh>
37 <quadrature>
38 <degree>
39 <integer_value rank="0">3</integer_value>
40 </degree>
41 </quadrature>
42 </geometry>
43 <io>
44 <dump_format>
45 <string_value>vtk</string_value>
46 </dump_format>
47 <dump_period>
48 <constant>
49 <real_value rank="0">360.0</real_value>
50 </constant>
51 </dump_period>
52 <output_mesh name="CoordinateMesh"/>
53 <stat/>
54 </io>
55 <timestepping>
56 <current_time>
57 <real_value rank="0">0.0</real_value>
58 <time_units date="seconds since 1970-01-01 12:00:0.0"/>
59 </current_time>
60 <timestep>
61 <real_value rank="0">360.0</real_value>
62 </timestep>
63 <finish_time>
64 <real_value rank="0">1440</real_value>
65 <comment>31536000.0 - 1 year
66360000 - 12 hours (i.e. 2 forcing steps)</comment>
67 </finish_time>
68 <nonlinear_iterations>
69 <integer_value rank="0">2</integer_value>
70 </nonlinear_iterations>
71 </timestepping>
72 <physical_parameters>
73 <gravity>
74 <magnitude>
75 <real_value rank="0">9.8</real_value>
76 </magnitude>
77 <vector_field name="GravityDirection" rank="1">
78 <prescribed>
79 <mesh name="CoordinateMesh"/>
80 <value name="WholeMesh">
81 <constant>
82 <real_value shape="3" dim1="dim" rank="1">0.0 0.0 -1.0</real_value>
83 </constant>
84 </value>
85 <output/>
86 <stat>
87 <include_in_stat/>
88 </stat>
89 <detectors>
90 <exclude_from_detectors/>
91 </detectors>
92 </prescribed>
93 </vector_field>
94 </gravity>
95 <coriolis>
96 <f_plane>
97 <f>
98 <real_value rank="0">1.0e-4</real_value>
99 </f>
100 </f_plane>
101 </coriolis>
102 </physical_parameters>
103 <material_phase name="Fluid">
104 <equation_of_state>
105 <fluids>
106 <ocean_pade_approximation/>
107 </fluids>
108 </equation_of_state>
109 <subgridscale_parameterisations>
110 <prescribed_diffusivity>
111 <tensor_field name="PrescribedDiffusivity" rank="2">
112 <prescribed>
113 <mesh name="VelocityMesh"/>
114 <value name="WholeMesh">
115 <anisotropic_symmetric>
116 <constant>
117 <real_value symmetric="true" dim2="dim" shape="3 3" dim1="dim" rank="2">10 0 0 0 10 0 0 0 1e-4</real_value>
118 </constant>
119 </anisotropic_symmetric>
120 </value>
121 <output/>
122 </prescribed>
123 </tensor_field>
124 </prescribed_diffusivity>
125 </subgridscale_parameterisations>
126 <scalar_field name="Pressure" rank="0">
127 <prescribed>
128 <mesh name="PressureMesh"/>
129 <value name="WholeMesh">
130 <constant>
131 <real_value rank="0">0.0</real_value>
132 </constant>
133 </value>
134 <output/>
135 <stat/>
136 <detectors>
137 <exclude_from_detectors/>
138 </detectors>
139 </prescribed>
140 </scalar_field>
141 <vector_field name="Velocity" rank="1">
142 <prognostic>
143 <mesh name="VelocityMesh"/>
144 <equation name="Boussinesq"/>
145 <spatial_discretisation>
146 <continuous_galerkin>
147 <stabilisation>
148 <streamline_upwind>
149 <nu_bar_unity/>
150 <nu_scale name="unity">
151 <real_value shape="1" rank="0">1.0</real_value>
152 </nu_scale>
153 </streamline_upwind>
154 </stabilisation>
155 <mass_terms>
156 <lump_mass_matrix/>
157 </mass_terms>
158 <advection_terms>
159 <exclude_advection_terms/>
160 </advection_terms>
161 <stress_terms>
162 <tensor_form/>
163 </stress_terms>
164 </continuous_galerkin>
165 <conservative_advection>
166 <real_value rank="0">0.0</real_value>
167 </conservative_advection>
168 </spatial_discretisation>
169 <temporal_discretisation>
170 <theta>
171 <real_value rank="0">1.0</real_value>
172 </theta>
173 <relaxation>
174 <real_value rank="0">1.0</real_value>
175 </relaxation>
176 </temporal_discretisation>
177 <solver>
178 <iterative_method name="gmres">
179 <restart>
180 <integer_value rank="0">30</integer_value>
181 </restart>
182 </iterative_method>
183 <preconditioner name="sor"/>
184 <relative_error>
185 <real_value rank="0">1.0E-5</real_value>
186 </relative_error>
187 <max_iterations>
188 <integer_value rank="0">2000</integer_value>
189 </max_iterations>
190 <never_ignore_solver_failures/>
191 <diagnostics>
192 <monitors/>
193 </diagnostics>
194 </solver>
195 <initial_condition name="WholeMesh">
196 <constant>
197 <real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value>
198 </constant>
199 </initial_condition>
200 <boundary_conditions name="lateral">
201 <surface_ids>
202 <integer_value shape="4" rank="1">40 41 42 43</integer_value>
203 </surface_ids>
204 <type name="dirichlet">
205 <align_bc_with_cartesian>
206 <z_component>
207 <constant>
208 <real_value rank="0">0.0</real_value>
209 </constant>
210 </z_component>
211 </align_bc_with_cartesian>
212 </type>
213 </boundary_conditions>
214 <boundary_conditions name="topbottom">
215 <surface_ids>
216 <integer_value shape="2" rank="1">38 39</integer_value>
217 </surface_ids>
218 <type name="dirichlet">
219 <align_bc_with_cartesian>
220 <z_component>
221 <constant>
222 <real_value rank="0">0.0</real_value>
223 </constant>
224 </z_component>
225 </align_bc_with_cartesian>
226 </type>
227 </boundary_conditions>
228 <boundary_conditions name="BulkFormulaVelocity">
229 <surface_ids>
230 <integer_value shape="1" rank="1">38</integer_value>
231 </surface_ids>
232 <type name="bulk_formulae"/>
233 </boundary_conditions>
234 <tensor_field name="Viscosity" rank="2">
235 <prescribed>
236 <value name="WholeMesh">
237 <anisotropic_symmetric>
238 <constant>
239 <real_value symmetric="true" dim2="dim" shape="3 3" dim1="dim" rank="2">10 0 0 0 10 0 0 0 1e-4</real_value>
240 </constant>
241 </anisotropic_symmetric>
242 </value>
243 <output/>
244 </prescribed>
245 </tensor_field>
246 <vector_field name="Absorption" rank="1">
247 <prescribed>
248 <value name="WholeMesh">
249 <constant>
250 <real_value shape="3" dim1="dim" rank="1">1.0e-7 1.0e-7 1.0e-7</real_value>
251 </constant>
252 </value>
253 <output/>
254 <stat>
255 <include_in_stat/>
256 </stat>
257 <detectors>
258 <exclude_from_detectors/>
259 </detectors>
260 </prescribed>
261 <default_absorption/>
262 </vector_field>
263 <output/>
264 <stat>
265 <include_in_stat/>
266 <previous_time_step>
267 <exclude_from_stat/>
268 </previous_time_step>
269 <nonlinear_field>
270 <exclude_from_stat/>
271 </nonlinear_field>
272 </stat>
273 <convergence>
274 <include_in_convergence/>
275 </convergence>
276 <detectors>
277 <include_in_detectors/>
278 </detectors>
279 <steady_state>
280 <include_in_steady_state/>
281 </steady_state>
282 <consistent_interpolation/>
283 </prognostic>
284 </vector_field>
285 <scalar_field name="Temperature" rank="0">
286 <prognostic>
287 <mesh name="VelocityMesh"/>
288 <equation name="AdvectionDiffusion"/>
289 <spatial_discretisation>
290 <continuous_galerkin>
291 <stabilisation>
292 <streamline_upwind>
293 <nu_bar_unity/>
294 <nu_scale name="unity">
295 <real_value shape="1" rank="0">1.0</real_value>
296 </nu_scale>
297 </streamline_upwind>
298 </stabilisation>
299 <advection_terms>
300 <exclude_advection_terms/>
301 </advection_terms>
302 <mass_terms/>
303 </continuous_galerkin>
304 <conservative_advection>
305 <real_value rank="0">0.0</real_value>
306 </conservative_advection>
307 </spatial_discretisation>
308 <temporal_discretisation>
309 <theta>
310 <real_value rank="0">1.0</real_value>
311 </theta>
312 </temporal_discretisation>
313 <solver>
314 <iterative_method name="gmres">
315 <restart>
316 <integer_value rank="0">30</integer_value>
317 </restart>
318 </iterative_method>
319 <preconditioner name="sor"/>
320 <relative_error>
321 <real_value rank="0">5.0e-5</real_value>
322 </relative_error>
323 <max_iterations>
324 <integer_value rank="0">1000000</integer_value>
325 </max_iterations>
326 <never_ignore_solver_failures/>
327 <diagnostics>
328 <monitors/>
329 </diagnostics>
330 </solver>
331 <initial_condition name="WholeMesh">
332 <constant>
333 <real_value rank="0">280</real_value>
334 </constant>
335 </initial_condition>
336 <boundary_conditions name="BulkFormulaTemperature">
337 <surface_ids>
338 <integer_value shape="1" rank="1">38</integer_value>
339 </surface_ids>
340 <type name="bulk_formulae"/>
341 </boundary_conditions>
342 <subgridscale_parameterisation name="prescribed_diffusivity"/>
343 <output/>
344 <stat/>
345 <convergence>
346 <include_in_convergence/>
347 </convergence>
348 <detectors>
349 <include_in_detectors/>
350 </detectors>
351 <steady_state>
352 <include_in_steady_state/>
353 </steady_state>
354 <consistent_interpolation/>
355 </prognostic>
356 </scalar_field>
357 <scalar_field name="PerturbationDensity" rank="0">
358 <diagnostic>
359 <algorithm name="Internal" material_phase_support="multiple"/>
360 <mesh name="VelocityMesh"/>
361 <output/>
362 <stat/>
363 <convergence>
364 <include_in_convergence/>
365 </convergence>
366 <detectors>
367 <include_in_detectors/>
368 </detectors>
369 <steady_state>
370 <include_in_steady_state/>
371 </steady_state>
372 </diagnostic>
373 </scalar_field>
374 <scalar_field name="Salinity" rank="0">
375 <prognostic>
376 <mesh name="VelocityMesh"/>
377 <equation name="AdvectionDiffusion"/>
378 <spatial_discretisation>
379 <continuous_galerkin>
380 <stabilisation>
381 <no_stabilisation/>
382 </stabilisation>
383 <advection_terms/>
384 <mass_terms/>
385 </continuous_galerkin>
386 <conservative_advection>
387 <real_value rank="0">0.0</real_value>
388 </conservative_advection>
389 </spatial_discretisation>
390 <temporal_discretisation>
391 <theta>
392 <real_value rank="0">1.0</real_value>
393 </theta>
394 </temporal_discretisation>
395 <solver>
396 <iterative_method name="gmres">
397 <restart>
398 <integer_value rank="0">30</integer_value>
399 </restart>
400 </iterative_method>
401 <preconditioner name="sor"/>
402 <relative_error>
403 <real_value rank="0">1.0e-7</real_value>
404 </relative_error>
405 <max_iterations>
406 <integer_value rank="0">2000</integer_value>
407 </max_iterations>
408 <never_ignore_solver_failures/>
409 <diagnostics>
410 <monitors/>
411 </diagnostics>
412 </solver>
413 <initial_condition name="WholeMesh">
414 <constant>
415 <real_value rank="0">35</real_value>
416 </constant>
417 </initial_condition>
418 <boundary_conditions name="BulkFormulaSalinity">
419 <surface_ids>
420 <integer_value shape="1" rank="1">38</integer_value>
421 </surface_ids>
422 <type name="bulk_formulae"/>
423 </boundary_conditions>
424 <subgridscale_parameterisation name="prescribed_diffusivity"/>
425 <output/>
426 <stat/>
427 <convergence>
428 <include_in_convergence/>
429 </convergence>
430 <detectors>
431 <include_in_detectors/>
432 </detectors>
433 <steady_state>
434 <include_in_steady_state/>
435 </steady_state>
436 <consistent_interpolation/>
437 </prognostic>
438 </scalar_field>
439 <scalar_field name="PhotosyntheticRadiation" rank="0">
440 <prognostic>
441 <mesh name="VelocityMesh"/>
442 <equation name="AdvectionDiffusion"/>
443 <spatial_discretisation>
444 <continuous_galerkin>
445 <stabilisation>
446 <no_stabilisation/>
447 </stabilisation>
448 <advection_terms>
449 <exclude_advection_terms/>
450 </advection_terms>
451 <mass_terms/>
452 </continuous_galerkin>
453 <conservative_advection>
454 <real_value rank="0">0</real_value>
455 </conservative_advection>
456 </spatial_discretisation>
457 <temporal_discretisation>
458 <theta>
459 <real_value rank="0">1</real_value>
460 </theta>
461 </temporal_discretisation>
462 <solver>
463 <iterative_method name="gmres">
464 <restart>
465 <integer_value rank="0">30</integer_value>
466 </restart>
467 </iterative_method>
468 <preconditioner name="sor"/>
469 <relative_error>
470 <real_value rank="0">1e-6</real_value>
471 </relative_error>
472 <max_iterations>
473 <integer_value rank="0">3000</integer_value>
474 </max_iterations>
475 <never_ignore_solver_failures/>
476 <diagnostics>
477 <monitors/>
478 </diagnostics>
479 </solver>
480 <initial_condition name="WholeMesh">
481 <constant>
482 <real_value rank="0">0</real_value>
483 </constant>
484 </initial_condition>
485 <boundary_conditions name="BulkFormulaPSR">
486 <surface_ids>
487 <integer_value shape="1" rank="1">38</integer_value>
488 </surface_ids>
489 <type name="bulk_formulae"/>
490 </boundary_conditions>
491 <output/>
492 <stat/>
493 <convergence>
494 <include_in_convergence/>
495 </convergence>
496 <detectors>
497 <include_in_detectors/>
498 </detectors>
499 <steady_state>
500 <include_in_steady_state/>
501 </steady_state>
502 <consistent_interpolation/>
503 </prognostic>
504 </scalar_field>
505 </material_phase>
506 <ocean_forcing>
507 <bulk_formulae>
508 <bulk_formulae>
509 <type name="NCAR"/>
510 </bulk_formulae>
511 <input_file file_name="1970_stationPapa.nc"/>
512 <input_file_type>
513 <type name="ERA40"/>
514 </input_file_type>
515 <output_fluxes_diagnostics>
516 <vector_field name="MomentumFlux" rank="1">
517 <diagnostic>
518 <algorithm name="Internal" material_phase_support="multiple"/>
519 <mesh name="VelocityMesh"/>
520 <output/>
521 <stat/>
522 <convergence>
523 <include_in_convergence/>
524 </convergence>
525 <detectors>
526 <include_in_detectors/>
527 </detectors>
528 <steady_state>
529 <include_in_steady_state/>
530 </steady_state>
531 </diagnostic>
532 </vector_field>
533 <scalar_field name="HeatFlux" rank="0">
534 <diagnostic>
535 <algorithm name="Internal" material_phase_support="multiple"/>
536 <mesh name="VelocityMesh"/>
537 <output/>
538 <stat/>
539 <convergence>
540 <include_in_convergence/>
541 </convergence>
542 <detectors>
543 <include_in_detectors/>
544 </detectors>
545 <steady_state>
546 <include_in_steady_state/>
547 </steady_state>
548 </diagnostic>
549 </scalar_field>
550 <scalar_field name="SalinityFlux" rank="0">
551 <diagnostic>
552 <algorithm name="Internal" material_phase_support="multiple"/>
553 <mesh name="VelocityMesh"/>
554 <output/>
555 <stat/>
556 <convergence>
557 <include_in_convergence/>
558 </convergence>
559 <detectors>
560 <include_in_detectors/>
561 </detectors>
562 <steady_state>
563 <include_in_steady_state/>
564 </steady_state>
565 </diagnostic>
566 </scalar_field>
567 <scalar_field name="PhotosyntheticRadiationDownward" rank="0">
568 <diagnostic>
569 <algorithm name="Internal" material_phase_support="multiple"/>
570 <mesh name="VelocityMesh"/>
571 <output/>
572 <stat/>
573 <convergence>
574 <include_in_convergence/>
575 </convergence>
576 <detectors>
577 <include_in_detectors/>
578 </detectors>
579 <steady_state>
580 <include_in_steady_state/>
581 </steady_state>
582 </diagnostic>
583 </scalar_field>
584 </output_fluxes_diagnostics>
585 </bulk_formulae>
586 </ocean_forcing>
587</fluidity_options>
0588
=== added file 'tests/forcing_inst_vals/forcing-ncar_inst.flml'
--- tests/forcing_inst_vals/forcing-ncar_inst.flml 1970-01-01 00:00:00 +0000
+++ tests/forcing_inst_vals/forcing-ncar_inst.flml 2011-09-05 07:36:25 +0000
@@ -0,0 +1,589 @@
1<?xml version='1.0' encoding='utf-8'?>
2<fluidity_options>
3 <simulation_name>
4 <string_value lines="1">forcing-ncar_inst</string_value>
5 </simulation_name>
6 <problem_type>
7 <string_value lines="1">oceans</string_value>
8 </problem_type>
9 <geometry>
10 <dimension>
11 <integer_value rank="0">3</integer_value>
12 </dimension>
13 <mesh name="CoordinateMesh">
14 <from_file file_name="column">
15 <format name="triangle"/>
16 <stat>
17 <include_in_stat/>
18 </stat>
19 </from_file>
20 </mesh>
21 <mesh name="VelocityMesh">
22 <from_mesh>
23 <mesh name="CoordinateMesh"/>
24 <stat>
25 <exclude_from_stat/>
26 </stat>
27 </from_mesh>
28 </mesh>
29 <mesh name="PressureMesh">
30 <from_mesh>
31 <mesh name="CoordinateMesh"/>
32 <stat>
33 <exclude_from_stat/>
34 </stat>
35 </from_mesh>
36 </mesh>
37 <quadrature>
38 <degree>
39 <integer_value rank="0">3</integer_value>
40 </degree>
41 </quadrature>
42 </geometry>
43 <io>
44 <dump_format>
45 <string_value>vtk</string_value>
46 </dump_format>
47 <dump_period>
48 <constant>
49 <real_value rank="0">360.0</real_value>
50 </constant>
51 </dump_period>
52 <output_mesh name="CoordinateMesh"/>
53 <stat/>
54 </io>
55 <timestepping>
56 <current_time>
57 <real_value rank="0">0.0</real_value>
58 <time_units date="seconds since 1970-01-01 12:00:0.0"/>
59 </current_time>
60 <timestep>
61 <real_value rank="0">360.0</real_value>
62 </timestep>
63 <finish_time>
64 <real_value rank="0">1440</real_value>
65 <comment>31536000.0 - 1 year
66360000 - 12 hours (i.e. 2 forcing steps)</comment>
67 </finish_time>
68 <nonlinear_iterations>
69 <integer_value rank="0">2</integer_value>
70 </nonlinear_iterations>
71 </timestepping>
72 <physical_parameters>
73 <gravity>
74 <magnitude>
75 <real_value rank="0">9.8</real_value>
76 </magnitude>
77 <vector_field name="GravityDirection" rank="1">
78 <prescribed>
79 <mesh name="CoordinateMesh"/>
80 <value name="WholeMesh">
81 <constant>
82 <real_value shape="3" dim1="dim" rank="1">0.0 0.0 -1.0</real_value>
83 </constant>
84 </value>
85 <output/>
86 <stat>
87 <include_in_stat/>
88 </stat>
89 <detectors>
90 <exclude_from_detectors/>
91 </detectors>
92 </prescribed>
93 </vector_field>
94 </gravity>
95 <coriolis>
96 <f_plane>
97 <f>
98 <real_value rank="0">1.0e-4</real_value>
99 </f>
100 </f_plane>
101 </coriolis>
102 </physical_parameters>
103 <material_phase name="Fluid">
104 <equation_of_state>
105 <fluids>
106 <ocean_pade_approximation/>
107 </fluids>
108 </equation_of_state>
109 <subgridscale_parameterisations>
110 <prescribed_diffusivity>
111 <tensor_field name="PrescribedDiffusivity" rank="2">
112 <prescribed>
113 <mesh name="VelocityMesh"/>
114 <value name="WholeMesh">
115 <anisotropic_symmetric>
116 <constant>
117 <real_value symmetric="true" dim2="dim" shape="3 3" dim1="dim" rank="2">10 0 0 0 10 0 0 0 1e-4</real_value>
118 </constant>
119 </anisotropic_symmetric>
120 </value>
121 <output/>
122 </prescribed>
123 </tensor_field>
124 </prescribed_diffusivity>
125 </subgridscale_parameterisations>
126 <scalar_field name="Pressure" rank="0">
127 <prescribed>
128 <mesh name="PressureMesh"/>
129 <value name="WholeMesh">
130 <constant>
131 <real_value rank="0">0.0</real_value>
132 </constant>
133 </value>
134 <output/>
135 <stat/>
136 <detectors>
137 <exclude_from_detectors/>
138 </detectors>
139 </prescribed>
140 </scalar_field>
141 <vector_field name="Velocity" rank="1">
142 <prognostic>
143 <mesh name="VelocityMesh"/>
144 <equation name="Boussinesq"/>
145 <spatial_discretisation>
146 <continuous_galerkin>
147 <stabilisation>
148 <streamline_upwind>
149 <nu_bar_unity/>
150 <nu_scale name="unity">
151 <real_value shape="1" rank="0">1.0</real_value>
152 </nu_scale>
153 </streamline_upwind>
154 </stabilisation>
155 <mass_terms>
156 <lump_mass_matrix/>
157 </mass_terms>
158 <advection_terms>
159 <exclude_advection_terms/>
160 </advection_terms>
161 <stress_terms>
162 <tensor_form/>
163 </stress_terms>
164 </continuous_galerkin>
165 <conservative_advection>
166 <real_value rank="0">0.0</real_value>
167 </conservative_advection>
168 </spatial_discretisation>
169 <temporal_discretisation>
170 <theta>
171 <real_value rank="0">1.0</real_value>
172 </theta>
173 <relaxation>
174 <real_value rank="0">1.0</real_value>
175 </relaxation>
176 </temporal_discretisation>
177 <solver>
178 <iterative_method name="gmres">
179 <restart>
180 <integer_value rank="0">30</integer_value>
181 </restart>
182 </iterative_method>
183 <preconditioner name="sor"/>
184 <relative_error>
185 <real_value rank="0">1.0E-5</real_value>
186 </relative_error>
187 <max_iterations>
188 <integer_value rank="0">2000</integer_value>
189 </max_iterations>
190 <never_ignore_solver_failures/>
191 <diagnostics>
192 <monitors/>
193 </diagnostics>
194 </solver>
195 <initial_condition name="WholeMesh">
196 <constant>
197 <real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value>
198 </constant>
199 </initial_condition>
200 <boundary_conditions name="lateral">
201 <surface_ids>
202 <integer_value shape="4" rank="1">40 41 42 43</integer_value>
203 </surface_ids>
204 <type name="dirichlet">
205 <align_bc_with_cartesian>
206 <z_component>
207 <constant>
208 <real_value rank="0">0.0</real_value>
209 </constant>
210 </z_component>
211 </align_bc_with_cartesian>
212 </type>
213 </boundary_conditions>
214 <boundary_conditions name="topbottom">
215 <surface_ids>
216 <integer_value shape="2" rank="1">38 39</integer_value>
217 </surface_ids>
218 <type name="dirichlet">
219 <align_bc_with_cartesian>
220 <z_component>
221 <constant>
222 <real_value rank="0">0.0</real_value>
223 </constant>
224 </z_component>
225 </align_bc_with_cartesian>
226 </type>
227 </boundary_conditions>
228 <boundary_conditions name="BulkFormulaVelocity">
229 <surface_ids>
230 <integer_value shape="1" rank="1">38</integer_value>
231 </surface_ids>
232 <type name="bulk_formulae"/>
233 </boundary_conditions>
234 <tensor_field name="Viscosity" rank="2">
235 <prescribed>
236 <value name="WholeMesh">
237 <anisotropic_symmetric>
238 <constant>
239 <real_value symmetric="true" dim2="dim" shape="3 3" dim1="dim" rank="2">10 0 0 0 10 0 0 0 1e-4</real_value>
240 </constant>
241 </anisotropic_symmetric>
242 </value>
243 <output/>
244 </prescribed>
245 </tensor_field>
246 <vector_field name="Absorption" rank="1">
247 <prescribed>
248 <value name="WholeMesh">
249 <constant>
250 <real_value shape="3" dim1="dim" rank="1">1.0e-7 1.0e-7 1.0e-7</real_value>
251 </constant>
252 </value>
253 <output/>
254 <stat>
255 <include_in_stat/>
256 </stat>
257 <detectors>
258 <exclude_from_detectors/>
259 </detectors>
260 </prescribed>
261 <default_absorption/>
262 </vector_field>
263 <output/>
264 <stat>
265 <include_in_stat/>
266 <previous_time_step>
267 <exclude_from_stat/>
268 </previous_time_step>
269 <nonlinear_field>
270 <exclude_from_stat/>
271 </nonlinear_field>
272 </stat>
273 <convergence>
274 <include_in_convergence/>
275 </convergence>
276 <detectors>
277 <include_in_detectors/>
278 </detectors>
279 <steady_state>
280 <include_in_steady_state/>
281 </steady_state>
282 <consistent_interpolation/>
283 </prognostic>
284 </vector_field>
285 <scalar_field name="Temperature" rank="0">
286 <prognostic>
287 <mesh name="VelocityMesh"/>
288 <equation name="AdvectionDiffusion"/>
289 <spatial_discretisation>
290 <continuous_galerkin>
291 <stabilisation>
292 <streamline_upwind>
293 <nu_bar_unity/>
294 <nu_scale name="unity">
295 <real_value shape="1" rank="0">1.0</real_value>
296 </nu_scale>
297 </streamline_upwind>
298 </stabilisation>
299 <advection_terms>
300 <exclude_advection_terms/>
301 </advection_terms>
302 <mass_terms/>
303 </continuous_galerkin>
304 <conservative_advection>
305 <real_value rank="0">0.0</real_value>
306 </conservative_advection>
307 </spatial_discretisation>
308 <temporal_discretisation>
309 <theta>
310 <real_value rank="0">1.0</real_value>
311 </theta>
312 </temporal_discretisation>
313 <solver>
314 <iterative_method name="gmres">
315 <restart>
316 <integer_value rank="0">30</integer_value>
317 </restart>
318 </iterative_method>
319 <preconditioner name="sor"/>
320 <relative_error>
321 <real_value rank="0">5.0e-5</real_value>
322 </relative_error>
323 <max_iterations>
324 <integer_value rank="0">1000000</integer_value>
325 </max_iterations>
326 <never_ignore_solver_failures/>
327 <diagnostics>
328 <monitors/>
329 </diagnostics>
330 </solver>
331 <initial_condition name="WholeMesh">
332 <constant>
333 <real_value rank="0">280</real_value>
334 </constant>
335 </initial_condition>
336 <boundary_conditions name="BulkFormulaTemperature">
337 <surface_ids>
338 <integer_value shape="1" rank="1">38</integer_value>
339 </surface_ids>
340 <type name="bulk_formulae"/>
341 </boundary_conditions>
342 <subgridscale_parameterisation name="prescribed_diffusivity"/>
343 <output/>
344 <stat/>
345 <convergence>
346 <include_in_convergence/>
347 </convergence>
348 <detectors>
349 <include_in_detectors/>
350 </detectors>
351 <steady_state>
352 <include_in_steady_state/>
353 </steady_state>
354 <consistent_interpolation/>
355 </prognostic>
356 </scalar_field>
357 <scalar_field name="PerturbationDensity" rank="0">
358 <diagnostic>
359 <algorithm name="Internal" material_phase_support="multiple"/>
360 <mesh name="VelocityMesh"/>
361 <output/>
362 <stat/>
363 <convergence>
364 <include_in_convergence/>
365 </convergence>
366 <detectors>
367 <include_in_detectors/>
368 </detectors>
369 <steady_state>
370 <include_in_steady_state/>
371 </steady_state>
372 </diagnostic>
373 </scalar_field>
374 <scalar_field name="Salinity" rank="0">
375 <prognostic>
376 <mesh name="VelocityMesh"/>
377 <equation name="AdvectionDiffusion"/>
378 <spatial_discretisation>
379 <continuous_galerkin>
380 <stabilisation>
381 <no_stabilisation/>
382 </stabilisation>
383 <advection_terms/>
384 <mass_terms/>
385 </continuous_galerkin>
386 <conservative_advection>
387 <real_value rank="0">0.0</real_value>
388 </conservative_advection>
389 </spatial_discretisation>
390 <temporal_discretisation>
391 <theta>
392 <real_value rank="0">1.0</real_value>
393 </theta>
394 </temporal_discretisation>
395 <solver>
396 <iterative_method name="gmres">
397 <restart>
398 <integer_value rank="0">30</integer_value>
399 </restart>
400 </iterative_method>
401 <preconditioner name="sor"/>
402 <relative_error>
403 <real_value rank="0">1.0e-7</real_value>
404 </relative_error>
405 <max_iterations>
406 <integer_value rank="0">2000</integer_value>
407 </max_iterations>
408 <never_ignore_solver_failures/>
409 <diagnostics>
410 <monitors/>
411 </diagnostics>
412 </solver>
413 <initial_condition name="WholeMesh">
414 <constant>
415 <real_value rank="0">35</real_value>
416 </constant>
417 </initial_condition>
418 <boundary_conditions name="BulkFormulaSalinity">
419 <surface_ids>
420 <integer_value shape="1" rank="1">38</integer_value>
421 </surface_ids>
422 <type name="bulk_formulae"/>
423 </boundary_conditions>
424 <subgridscale_parameterisation name="prescribed_diffusivity"/>
425 <output/>
426 <stat/>
427 <convergence>
428 <include_in_convergence/>
429 </convergence>
430 <detectors>
431 <include_in_detectors/>
432 </detectors>
433 <steady_state>
434 <include_in_steady_state/>
435 </steady_state>
436 <consistent_interpolation/>
437 </prognostic>
438 </scalar_field>
439 <scalar_field name="PhotosyntheticRadiation" rank="0">
440 <prognostic>
441 <mesh name="VelocityMesh"/>
442 <equation name="AdvectionDiffusion"/>
443 <spatial_discretisation>
444 <continuous_galerkin>
445 <stabilisation>
446 <no_stabilisation/>
447 </stabilisation>
448 <advection_terms>
449 <exclude_advection_terms/>
450 </advection_terms>
451 <mass_terms/>
452 </continuous_galerkin>
453 <conservative_advection>
454 <real_value rank="0">0</real_value>
455 </conservative_advection>
456 </spatial_discretisation>
457 <temporal_discretisation>
458 <theta>
459 <real_value rank="0">1</real_value>
460 </theta>
461 </temporal_discretisation>
462 <solver>
463 <iterative_method name="gmres">
464 <restart>
465 <integer_value rank="0">30</integer_value>
466 </restart>
467 </iterative_method>
468 <preconditioner name="sor"/>
469 <relative_error>
470 <real_value rank="0">1e-6</real_value>
471 </relative_error>
472 <max_iterations>
473 <integer_value rank="0">3000</integer_value>
474 </max_iterations>
475 <never_ignore_solver_failures/>
476 <diagnostics>
477 <monitors/>
478 </diagnostics>
479 </solver>
480 <initial_condition name="WholeMesh">
481 <constant>
482 <real_value rank="0">0</real_value>
483 </constant>
484 </initial_condition>
485 <boundary_conditions name="BulkFormulaPSR">
486 <surface_ids>
487 <integer_value shape="1" rank="1">38</integer_value>
488 </surface_ids>
489 <type name="bulk_formulae"/>
490 </boundary_conditions>
491 <output/>
492 <stat/>
493 <convergence>
494 <include_in_convergence/>
495 </convergence>
496 <detectors>
497 <include_in_detectors/>
498 </detectors>
499 <steady_state>
500 <include_in_steady_state/>
501 </steady_state>
502 <consistent_interpolation/>
503 </prognostic>
504 </scalar_field>
505 </material_phase>
506 <ocean_forcing>
507 <bulk_formulae>
508 <bulk_formulae>
509 <type name="NCAR"/>
510 </bulk_formulae>
511 <input_file file_name="1970_stationPapa_unacc.nc"/>
512 <input_file_type>
513 <type name="ERA40">
514 <no_accumulation/>
515 </type>
516 </input_file_type>
517 <output_fluxes_diagnostics>
518 <vector_field name="MomentumFlux" rank="1">
519 <diagnostic>
520 <algorithm name="Internal" material_phase_support="multiple"/>
521 <mesh name="VelocityMesh"/>
522 <output/>
523 <stat/>
524 <convergence>
525 <include_in_convergence/>
526 </convergence>
527 <detectors>
528 <include_in_detectors/>
529 </detectors>
530 <steady_state>
531 <include_in_steady_state/>
532 </steady_state>
533 </diagnostic>
534 </vector_field>
535 <scalar_field name="HeatFlux" rank="0">
536 <diagnostic>
537 <algorithm name="Internal" material_phase_support="multiple"/>
538 <mesh name="VelocityMesh"/>
539 <output/>
540 <stat/>
541 <convergence>
542 <include_in_convergence/>
543 </convergence>
544 <detectors>
545 <include_in_detectors/>
546 </detectors>
547 <steady_state>
548 <include_in_steady_state/>
549 </steady_state>
550 </diagnostic>
551 </scalar_field>
552 <scalar_field name="SalinityFlux" rank="0">
553 <diagnostic>
554 <algorithm name="Internal" material_phase_support="multiple"/>
555 <mesh name="VelocityMesh"/>
556 <output/>
557 <stat/>
558 <convergence>
559 <include_in_convergence/>
560 </convergence>
561 <detectors>
562 <include_in_detectors/>
563 </detectors>
564 <steady_state>
565 <include_in_steady_state/>
566 </steady_state>
567 </diagnostic>
568 </scalar_field>
569 <scalar_field name="PhotosyntheticRadiationDownward" rank="0">
570 <diagnostic>
571 <algorithm name="Internal" material_phase_support="multiple"/>
572 <mesh name="VelocityMesh"/>
573 <output/>
574 <stat/>
575 <convergence>
576 <include_in_convergence/>
577 </convergence>
578 <detectors>
579 <include_in_detectors/>
580 </detectors>
581 <steady_state>
582 <include_in_steady_state/>
583 </steady_state>
584 </diagnostic>
585 </scalar_field>
586 </output_fluxes_diagnostics>
587 </bulk_formulae>
588 </ocean_forcing>
589</fluidity_options>
0590
=== added file 'tests/forcing_inst_vals/forcing_inst_vals.xml'
--- tests/forcing_inst_vals/forcing_inst_vals.xml 1970-01-01 00:00:00 +0000
+++ tests/forcing_inst_vals/forcing_inst_vals.xml 2011-09-05 07:36:25 +0000
@@ -0,0 +1,56 @@
1<?xml version="1.0" encoding="UTF-8" ?>
2<!DOCTYPE testproblem SYSTEM "regressiontest.dtd">
3
4<testproblem>
5 <name>forcing</name>
6 <owner userid="jhill1"/>
7 <tags>flml forcing</tags>
8 <problem_definition length="short" nprocs="1">
9 <command_line>fluidity -v2 -l forcing-ncar.flml;
10 fluidity -v2 -l forcing-ncar_inst.flml;
11 </command_line>
12 </problem_definition>
13 <variables>
14 <variable name="FinalTimeNcarOrig" language="python">
15import fluidity_tools
16FinalTimeNcarOrig = fluidity_tools.stat_parser("forcing-ncar.stat")['ElapsedTime']['value'][-1]
17 </variable>
18 <variable name="FinalTemperatureIntegralNcarOrig" language="python">
19import fluidity_tools
20FinalTemperatureIntegralNcarOrig = fluidity_tools.stat_parser("forcing-ncar.stat")['Fluid']['Temperature']['integral'][-1]
21 </variable>
22 <variable name="FinalSalinityMinNcarOrig" language="python">
23import fluidity_tools
24FinalSalinityMinNcarOrig = fluidity_tools.stat_parser("forcing-ncar.stat")['Fluid']['Salinity']['min'][-1]
25 </variable>
26 <variable name="FinalTimeNcarInst" language="python">
27import fluidity_tools
28FinalTimeNcarInst = fluidity_tools.stat_parser("forcing-ncar_inst.stat")['ElapsedTime']['value'][-1]
29 </variable>
30 <variable name="FinalTemperatureIntegralNcarInst" language="python">
31import fluidity_tools
32FinalTemperatureIntegralNcarInst = fluidity_tools.stat_parser("forcing-ncar_inst.stat")['Fluid']['Temperature']['integral'][-1]
33 </variable>
34 <variable name="FinalSalinityMinNcarInst" language="python">
35import fluidity_tools
36FinalSalinityMinNcarInst = fluidity_tools.stat_parser("forcing-ncar_inst.stat")['Fluid']['Salinity']['min'][-1]
37 </variable>
38
39</variables>
40
41
42 <pass_tests>
43 <test name="Ncar: Final time is 1440 seconds" language="python">
44assert FinalTimeNcarOrig ==1440
45 </test>
46 <test name="Times match" language="python">
47assert (abs(FinalTimeNcarOrig - FinalTimeNcarInst)/FinalTimeNcarOrig &lt; 1e-10)
48 </test>
49 <test name="Temperature matches" language="python">
50assert(abs(FinalTemperatureIntegralNcarOrig - FinalTemperatureIntegralNcarInst)/FinalTemperatureIntegralNcarOrig &lt; 1e-10)
51 </test>
52 <test name="Salinity matches" language="python">
53assert (abs(FinalSalinityMinNcarOrig-FinalSalinityMinNcarInst)/FinalSalinityMinNcarOrig &lt; 2e-10)
54 </test>
55 </pass_tests>
56</testproblem>
057
=== added directory 'tests/forcing_inst_vals/src'
=== added file 'tests/forcing_inst_vals/src/column.geo'
--- tests/forcing_inst_vals/src/column.geo 1970-01-01 00:00:00 +0000
+++ tests/forcing_inst_vals/src/column.geo 2011-09-05 07:36:25 +0000
@@ -0,0 +1,25 @@
1// Gmsh project created on Thu Mar 6 16:27:33 2008
2Point(1) = {-3.35835e+06,-2.35154e+06,4.88594e+06};
3Extrude {100.0,0,0} {
4 Point{1}; Layers{1};
5}
6Extrude {0,100.0,0.0} {
7 Line{1}; Layers{1};
8}
9Extrude {0.0,0.0,-100.0} {
10 Surface{5}; Layers{50};
11}
12//Top
13Physical Surface(38) = {5};
14//Bottom
15Physical Surface(39) = {27};
16//North
17Physical Surface(40) = {22};
18//South
19Physical Surface(41) = {14};
20//West
21Physical Surface(42) = {26};
22//East
23Physical Surface(43) = {18};
24Physical Volume(44) = {1};
25