Merge lp:~fluidity-core/fluidity/ocean_forcing into lp:fluidity
- ocean_forcing
- Merge into dev-trunk
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Simon Mouradian | Approve | ||
Review via email: mp+73819@code.launchpad.net |
Commit message
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 : | # |
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
1 | === modified file 'main/Usage.cpp' |
2 | --- main/Usage.cpp 2011-07-12 10:06:34 +0000 |
3 | +++ main/Usage.cpp 2011-09-05 07:36:25 +0000 |
4 | @@ -384,17 +384,23 @@ |
5 | if(have_option("/ocean_forcing/bulk_formulae/file_type")) { |
6 | get_option("/ocean_forcing/bulk_formulae/file_type/filetype/name", dataset); |
7 | } |
8 | - FluxesReader_global.RegisterDataFile(option); |
9 | - // field from NetCDF file Index | Physical meaning |
10 | - FluxesReader_global.AddFieldOfInterest("u10"); // 0 | 10 metre U wind component |
11 | - FluxesReader_global.AddFieldOfInterest("v10"); // 1 | 10 metre V wind component |
12 | - FluxesReader_global.AddFieldOfInterest("ssrd"); // 2 | Surface solar radiation |
13 | - FluxesReader_global.AddFieldOfInterest("strd"); // 3 | Surface thermal radiation |
14 | - FluxesReader_global.AddFieldOfInterest("ro"); // 4 | Runoff |
15 | - FluxesReader_global.AddFieldOfInterest("tp"); // 5 | Total precipitation |
16 | - FluxesReader_global.AddFieldOfInterest("d2m"); // 6 | Dew point temp at 2m |
17 | - FluxesReader_global.AddFieldOfInterest("t2m"); // 7 | Air temp at 2m |
18 | - FluxesReader_global.AddFieldOfInterest("msl"); // 8 | Mean sea level pressure |
19 | + if (dataset == "ERA40") { |
20 | + FluxesReader_global.RegisterDataFile(option); |
21 | + // field from NetCDF file Index | Physical meaning |
22 | + FluxesReader_global.AddFieldOfInterest("u10"); // 0 | 10 metre U wind component |
23 | + FluxesReader_global.AddFieldOfInterest("v10"); // 1 | 10 metre V wind component |
24 | + FluxesReader_global.AddFieldOfInterest("ssrd"); // 2 | Surface solar radiation |
25 | + FluxesReader_global.AddFieldOfInterest("strd"); // 3 | Surface thermal radiation |
26 | + FluxesReader_global.AddFieldOfInterest("ro"); // 4 | Runoff |
27 | + FluxesReader_global.AddFieldOfInterest("tp"); // 5 | Total precipitation |
28 | + FluxesReader_global.AddFieldOfInterest("d2m"); // 6 | Dew point temp at 2m |
29 | + FluxesReader_global.AddFieldOfInterest("t2m"); // 7 | Air temp at 2m |
30 | + FluxesReader_global.AddFieldOfInterest("msl"); // 8 | Mean sea level pressure |
31 | + } else { |
32 | + cerr<<"ERROR: unsupported bulk formula input file type. Choose ERA40\n"; |
33 | + exit(-1); |
34 | + } |
35 | + |
36 | } |
37 | |
38 | if(have_option("/ocean_biology/lagrangian_ensemble/hyperlight")) { |
39 | |
40 | === modified file 'ocean_forcing/bulk_parameterisations.F90' |
41 | --- ocean_forcing/bulk_parameterisations.F90 2011-02-08 14:23:43 +0000 |
42 | +++ ocean_forcing/bulk_parameterisations.F90 2011-09-05 07:36:25 +0000 |
43 | @@ -64,7 +64,6 @@ |
44 | OneOverDensity = 1.0 / ocean_density, & |
45 | ocean_heat_capacity = 4000.0, & |
46 | kelvin_centrigrade = 273.15, & |
47 | - accumulated_correction = 6.0*60.0*60.0, & ! Assumes data every 6 hours. |
48 | heat_convert = 1.0 / (ocean_density * ocean_heat_capacity), & |
49 | one_over_density = 1.0 / ocean_density |
50 | |
51 | |
52 | === modified file 'ocean_forcing/forcingERA40.cpp' |
53 | --- ocean_forcing/forcingERA40.cpp 2011-06-07 08:12:34 +0000 |
54 | +++ ocean_forcing/forcingERA40.cpp 2011-09-05 07:36:25 +0000 |
55 | @@ -28,8 +28,10 @@ |
56 | #include "confdefs.h" |
57 | #include "BulkForcing.h" |
58 | #include "FluxesReader.h" |
59 | +#include "spud" |
60 | |
61 | using namespace std; |
62 | +using namespace Spud; |
63 | |
64 | extern int projections(int nPoints, double *x, double *y, double *z, string current_coord, string output_coord); |
65 | |
66 | @@ -43,8 +45,10 @@ |
67 | const double air_density = 1.22, |
68 | q1 = 0.98*640380, |
69 | q2 = -5107.4, |
70 | - kelvin_centrigrade = 273.15, |
71 | - accumulated_correction = 6.0*60.0*60.0; // Assumes data every 6 hours. |
72 | + kelvin_centrigrade = 273.15; |
73 | + |
74 | + // Set up for ERA40 data. Options to change rate are set below |
75 | + double accumulated_correction = 6.0*60.0*60.0; // Assumes data every 6 hours. |
76 | |
77 | // problem constants |
78 | const int nFields = 9; |
79 | @@ -65,6 +69,11 @@ |
80 | double *SST = new double[NNodes]; |
81 | |
82 | FluxesReader_global.SetTimeSeconds(*time); |
83 | + |
84 | + if(have_option("/ocean_forcing/bulk_formulae/input_file_type/type::ERA40/no_accumulation")) { |
85 | + cout<<"Found flag"<<endl; |
86 | + accumulated_correction = 1.0; |
87 | + } |
88 | |
89 | // convert from Cart to long-lat |
90 | double *x = new double[NNodes]; |
91 | |
92 | === modified file 'schemas/fluidity_options.rnc' |
93 | --- schemas/fluidity_options.rnc 2011-07-27 12:49:45 +0000 |
94 | +++ schemas/fluidity_options.rnc 2011-09-05 07:36:25 +0000 |
95 | @@ -6508,15 +6508,20 @@ |
96 | ## What kind of file is this? Currently only ERA40 files are supported |
97 | element type { |
98 | attribute name { "ERA40" }, |
99 | - empty |
100 | - #}| |
101 | - #element type { |
102 | - # attribute name { "NSEP" }, |
103 | - # empty |
104 | - #}| |
105 | - #element type { |
106 | - # attribute name { "ICOM" }, |
107 | - # empty |
108 | + ## The data from ERA40 website included accumulated values (ppt, ro, ssrd, strd). |
109 | + ## If these values have been already ammended to instantaneous values, then switch this |
110 | + ## flag on and the accumulation correction will not be applied. |
111 | + element no_accumulation { |
112 | + empty |
113 | + }? |
114 | + }| |
115 | + element type { |
116 | + attribute name { "NSEP" }, |
117 | + empty |
118 | + }| |
119 | + element type { |
120 | + attribute name { "ICOM" }, |
121 | + empty |
122 | } |
123 | }?, |
124 | ## Adding a latitude and longitude here (specified as two real numbers) |
125 | |
126 | === modified file 'schemas/fluidity_options.rng' |
127 | --- schemas/fluidity_options.rng 2011-07-27 12:49:45 +0000 |
128 | +++ schemas/fluidity_options.rng 2011-09-05 07:36:25 +0000 |
129 | @@ -8248,25 +8248,34 @@ |
130 | </element> |
131 | <optional> |
132 | <element name="input_file_type"> |
133 | - <element name="type"> |
134 | - <a:documentation>What kind of file is this? Currently only ERA40 files are supported</a:documentation> |
135 | - <group> |
136 | + <choice> |
137 | + <element name="type"> |
138 | + <a:documentation>What kind of file is this? Currently only ERA40 files are supported</a:documentation> |
139 | <attribute name="name"> |
140 | <value>ERA40</value> |
141 | </attribute> |
142 | - <empty/> |
143 | - </group> |
144 | - <!-- |
145 | - }| |
146 | - element type { |
147 | - attribute name { "NSEP" }, |
148 | - empty |
149 | - }| |
150 | - element type { |
151 | - attribute name { "ICOM" }, |
152 | - empty |
153 | - --> |
154 | - </element> |
155 | + <optional> |
156 | + <element name="no_accumulation"> |
157 | + <a:documentation>The data from ERA40 website included accumulated values (ppt, ro, ssrd, strd). |
158 | +If these values have been already ammended to instantaneous values, then switch this |
159 | +flag on and the accumulation correction will not be applied.</a:documentation> |
160 | + <empty/> |
161 | + </element> |
162 | + </optional> |
163 | + </element> |
164 | + <element name="type"> |
165 | + <attribute name="name"> |
166 | + <value>NSEP</value> |
167 | + </attribute> |
168 | + <empty/> |
169 | + </element> |
170 | + <element name="type"> |
171 | + <attribute name="name"> |
172 | + <value>ICOM</value> |
173 | + </attribute> |
174 | + <empty/> |
175 | + </element> |
176 | + </choice> |
177 | </element> |
178 | </optional> |
179 | <optional> |
180 | |
181 | === added directory 'tests/forcing_inst_vals' |
182 | === added file 'tests/forcing_inst_vals/1970_stationPapa.nc' |
183 | Binary 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 |
184 | === added file 'tests/forcing_inst_vals/1970_stationPapa_unacc.nc' |
185 | Binary 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 |
186 | === added file 'tests/forcing_inst_vals/Makefile' |
187 | --- tests/forcing_inst_vals/Makefile 1970-01-01 00:00:00 +0000 |
188 | +++ tests/forcing_inst_vals/Makefile 2011-09-05 07:36:25 +0000 |
189 | @@ -0,0 +1,7 @@ |
190 | +input: clean |
191 | + gmsh -3 -o column.msh src/column.geo |
192 | + ../../scripts/gmsh2triangle column.msh |
193 | + |
194 | +clean: |
195 | + rm -f *.ele *.edge *.node *.face *.poly *.vtu *.s *.stat *.log-0 *.err-0 matrixdump* *log *err |
196 | + rm -f *.msh |
197 | |
198 | === added file 'tests/forcing_inst_vals/forcing-ncar.flml' |
199 | --- tests/forcing_inst_vals/forcing-ncar.flml 1970-01-01 00:00:00 +0000 |
200 | +++ tests/forcing_inst_vals/forcing-ncar.flml 2011-09-05 07:36:25 +0000 |
201 | @@ -0,0 +1,587 @@ |
202 | +<?xml version='1.0' encoding='utf-8'?> |
203 | +<fluidity_options> |
204 | + <simulation_name> |
205 | + <string_value lines="1">forcing-ncar</string_value> |
206 | + </simulation_name> |
207 | + <problem_type> |
208 | + <string_value lines="1">oceans</string_value> |
209 | + </problem_type> |
210 | + <geometry> |
211 | + <dimension> |
212 | + <integer_value rank="0">3</integer_value> |
213 | + </dimension> |
214 | + <mesh name="CoordinateMesh"> |
215 | + <from_file file_name="column"> |
216 | + <format name="triangle"/> |
217 | + <stat> |
218 | + <include_in_stat/> |
219 | + </stat> |
220 | + </from_file> |
221 | + </mesh> |
222 | + <mesh name="VelocityMesh"> |
223 | + <from_mesh> |
224 | + <mesh name="CoordinateMesh"/> |
225 | + <stat> |
226 | + <exclude_from_stat/> |
227 | + </stat> |
228 | + </from_mesh> |
229 | + </mesh> |
230 | + <mesh name="PressureMesh"> |
231 | + <from_mesh> |
232 | + <mesh name="CoordinateMesh"/> |
233 | + <stat> |
234 | + <exclude_from_stat/> |
235 | + </stat> |
236 | + </from_mesh> |
237 | + </mesh> |
238 | + <quadrature> |
239 | + <degree> |
240 | + <integer_value rank="0">3</integer_value> |
241 | + </degree> |
242 | + </quadrature> |
243 | + </geometry> |
244 | + <io> |
245 | + <dump_format> |
246 | + <string_value>vtk</string_value> |
247 | + </dump_format> |
248 | + <dump_period> |
249 | + <constant> |
250 | + <real_value rank="0">360.0</real_value> |
251 | + </constant> |
252 | + </dump_period> |
253 | + <output_mesh name="CoordinateMesh"/> |
254 | + <stat/> |
255 | + </io> |
256 | + <timestepping> |
257 | + <current_time> |
258 | + <real_value rank="0">0.0</real_value> |
259 | + <time_units date="seconds since 1970-01-01 12:00:0.0"/> |
260 | + </current_time> |
261 | + <timestep> |
262 | + <real_value rank="0">360.0</real_value> |
263 | + </timestep> |
264 | + <finish_time> |
265 | + <real_value rank="0">1440</real_value> |
266 | + <comment>31536000.0 - 1 year |
267 | +360000 - 12 hours (i.e. 2 forcing steps)</comment> |
268 | + </finish_time> |
269 | + <nonlinear_iterations> |
270 | + <integer_value rank="0">2</integer_value> |
271 | + </nonlinear_iterations> |
272 | + </timestepping> |
273 | + <physical_parameters> |
274 | + <gravity> |
275 | + <magnitude> |
276 | + <real_value rank="0">9.8</real_value> |
277 | + </magnitude> |
278 | + <vector_field name="GravityDirection" rank="1"> |
279 | + <prescribed> |
280 | + <mesh name="CoordinateMesh"/> |
281 | + <value name="WholeMesh"> |
282 | + <constant> |
283 | + <real_value shape="3" dim1="dim" rank="1">0.0 0.0 -1.0</real_value> |
284 | + </constant> |
285 | + </value> |
286 | + <output/> |
287 | + <stat> |
288 | + <include_in_stat/> |
289 | + </stat> |
290 | + <detectors> |
291 | + <exclude_from_detectors/> |
292 | + </detectors> |
293 | + </prescribed> |
294 | + </vector_field> |
295 | + </gravity> |
296 | + <coriolis> |
297 | + <f_plane> |
298 | + <f> |
299 | + <real_value rank="0">1.0e-4</real_value> |
300 | + </f> |
301 | + </f_plane> |
302 | + </coriolis> |
303 | + </physical_parameters> |
304 | + <material_phase name="Fluid"> |
305 | + <equation_of_state> |
306 | + <fluids> |
307 | + <ocean_pade_approximation/> |
308 | + </fluids> |
309 | + </equation_of_state> |
310 | + <subgridscale_parameterisations> |
311 | + <prescribed_diffusivity> |
312 | + <tensor_field name="PrescribedDiffusivity" rank="2"> |
313 | + <prescribed> |
314 | + <mesh name="VelocityMesh"/> |
315 | + <value name="WholeMesh"> |
316 | + <anisotropic_symmetric> |
317 | + <constant> |
318 | + <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> |
319 | + </constant> |
320 | + </anisotropic_symmetric> |
321 | + </value> |
322 | + <output/> |
323 | + </prescribed> |
324 | + </tensor_field> |
325 | + </prescribed_diffusivity> |
326 | + </subgridscale_parameterisations> |
327 | + <scalar_field name="Pressure" rank="0"> |
328 | + <prescribed> |
329 | + <mesh name="PressureMesh"/> |
330 | + <value name="WholeMesh"> |
331 | + <constant> |
332 | + <real_value rank="0">0.0</real_value> |
333 | + </constant> |
334 | + </value> |
335 | + <output/> |
336 | + <stat/> |
337 | + <detectors> |
338 | + <exclude_from_detectors/> |
339 | + </detectors> |
340 | + </prescribed> |
341 | + </scalar_field> |
342 | + <vector_field name="Velocity" rank="1"> |
343 | + <prognostic> |
344 | + <mesh name="VelocityMesh"/> |
345 | + <equation name="Boussinesq"/> |
346 | + <spatial_discretisation> |
347 | + <continuous_galerkin> |
348 | + <stabilisation> |
349 | + <streamline_upwind> |
350 | + <nu_bar_unity/> |
351 | + <nu_scale name="unity"> |
352 | + <real_value shape="1" rank="0">1.0</real_value> |
353 | + </nu_scale> |
354 | + </streamline_upwind> |
355 | + </stabilisation> |
356 | + <mass_terms> |
357 | + <lump_mass_matrix/> |
358 | + </mass_terms> |
359 | + <advection_terms> |
360 | + <exclude_advection_terms/> |
361 | + </advection_terms> |
362 | + <stress_terms> |
363 | + <tensor_form/> |
364 | + </stress_terms> |
365 | + </continuous_galerkin> |
366 | + <conservative_advection> |
367 | + <real_value rank="0">0.0</real_value> |
368 | + </conservative_advection> |
369 | + </spatial_discretisation> |
370 | + <temporal_discretisation> |
371 | + <theta> |
372 | + <real_value rank="0">1.0</real_value> |
373 | + </theta> |
374 | + <relaxation> |
375 | + <real_value rank="0">1.0</real_value> |
376 | + </relaxation> |
377 | + </temporal_discretisation> |
378 | + <solver> |
379 | + <iterative_method name="gmres"> |
380 | + <restart> |
381 | + <integer_value rank="0">30</integer_value> |
382 | + </restart> |
383 | + </iterative_method> |
384 | + <preconditioner name="sor"/> |
385 | + <relative_error> |
386 | + <real_value rank="0">1.0E-5</real_value> |
387 | + </relative_error> |
388 | + <max_iterations> |
389 | + <integer_value rank="0">2000</integer_value> |
390 | + </max_iterations> |
391 | + <never_ignore_solver_failures/> |
392 | + <diagnostics> |
393 | + <monitors/> |
394 | + </diagnostics> |
395 | + </solver> |
396 | + <initial_condition name="WholeMesh"> |
397 | + <constant> |
398 | + <real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value> |
399 | + </constant> |
400 | + </initial_condition> |
401 | + <boundary_conditions name="lateral"> |
402 | + <surface_ids> |
403 | + <integer_value shape="4" rank="1">40 41 42 43</integer_value> |
404 | + </surface_ids> |
405 | + <type name="dirichlet"> |
406 | + <align_bc_with_cartesian> |
407 | + <z_component> |
408 | + <constant> |
409 | + <real_value rank="0">0.0</real_value> |
410 | + </constant> |
411 | + </z_component> |
412 | + </align_bc_with_cartesian> |
413 | + </type> |
414 | + </boundary_conditions> |
415 | + <boundary_conditions name="topbottom"> |
416 | + <surface_ids> |
417 | + <integer_value shape="2" rank="1">38 39</integer_value> |
418 | + </surface_ids> |
419 | + <type name="dirichlet"> |
420 | + <align_bc_with_cartesian> |
421 | + <z_component> |
422 | + <constant> |
423 | + <real_value rank="0">0.0</real_value> |
424 | + </constant> |
425 | + </z_component> |
426 | + </align_bc_with_cartesian> |
427 | + </type> |
428 | + </boundary_conditions> |
429 | + <boundary_conditions name="BulkFormulaVelocity"> |
430 | + <surface_ids> |
431 | + <integer_value shape="1" rank="1">38</integer_value> |
432 | + </surface_ids> |
433 | + <type name="bulk_formulae"/> |
434 | + </boundary_conditions> |
435 | + <tensor_field name="Viscosity" rank="2"> |
436 | + <prescribed> |
437 | + <value name="WholeMesh"> |
438 | + <anisotropic_symmetric> |
439 | + <constant> |
440 | + <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> |
441 | + </constant> |
442 | + </anisotropic_symmetric> |
443 | + </value> |
444 | + <output/> |
445 | + </prescribed> |
446 | + </tensor_field> |
447 | + <vector_field name="Absorption" rank="1"> |
448 | + <prescribed> |
449 | + <value name="WholeMesh"> |
450 | + <constant> |
451 | + <real_value shape="3" dim1="dim" rank="1">1.0e-7 1.0e-7 1.0e-7</real_value> |
452 | + </constant> |
453 | + </value> |
454 | + <output/> |
455 | + <stat> |
456 | + <include_in_stat/> |
457 | + </stat> |
458 | + <detectors> |
459 | + <exclude_from_detectors/> |
460 | + </detectors> |
461 | + </prescribed> |
462 | + <default_absorption/> |
463 | + </vector_field> |
464 | + <output/> |
465 | + <stat> |
466 | + <include_in_stat/> |
467 | + <previous_time_step> |
468 | + <exclude_from_stat/> |
469 | + </previous_time_step> |
470 | + <nonlinear_field> |
471 | + <exclude_from_stat/> |
472 | + </nonlinear_field> |
473 | + </stat> |
474 | + <convergence> |
475 | + <include_in_convergence/> |
476 | + </convergence> |
477 | + <detectors> |
478 | + <include_in_detectors/> |
479 | + </detectors> |
480 | + <steady_state> |
481 | + <include_in_steady_state/> |
482 | + </steady_state> |
483 | + <consistent_interpolation/> |
484 | + </prognostic> |
485 | + </vector_field> |
486 | + <scalar_field name="Temperature" rank="0"> |
487 | + <prognostic> |
488 | + <mesh name="VelocityMesh"/> |
489 | + <equation name="AdvectionDiffusion"/> |
490 | + <spatial_discretisation> |
491 | + <continuous_galerkin> |
492 | + <stabilisation> |
493 | + <streamline_upwind> |
494 | + <nu_bar_unity/> |
495 | + <nu_scale name="unity"> |
496 | + <real_value shape="1" rank="0">1.0</real_value> |
497 | + </nu_scale> |
498 | + </streamline_upwind> |
499 | + </stabilisation> |
500 | + <advection_terms> |
501 | + <exclude_advection_terms/> |
502 | + </advection_terms> |
503 | + <mass_terms/> |
504 | + </continuous_galerkin> |
505 | + <conservative_advection> |
506 | + <real_value rank="0">0.0</real_value> |
507 | + </conservative_advection> |
508 | + </spatial_discretisation> |
509 | + <temporal_discretisation> |
510 | + <theta> |
511 | + <real_value rank="0">1.0</real_value> |
512 | + </theta> |
513 | + </temporal_discretisation> |
514 | + <solver> |
515 | + <iterative_method name="gmres"> |
516 | + <restart> |
517 | + <integer_value rank="0">30</integer_value> |
518 | + </restart> |
519 | + </iterative_method> |
520 | + <preconditioner name="sor"/> |
521 | + <relative_error> |
522 | + <real_value rank="0">5.0e-5</real_value> |
523 | + </relative_error> |
524 | + <max_iterations> |
525 | + <integer_value rank="0">1000000</integer_value> |
526 | + </max_iterations> |
527 | + <never_ignore_solver_failures/> |
528 | + <diagnostics> |
529 | + <monitors/> |
530 | + </diagnostics> |
531 | + </solver> |
532 | + <initial_condition name="WholeMesh"> |
533 | + <constant> |
534 | + <real_value rank="0">280</real_value> |
535 | + </constant> |
536 | + </initial_condition> |
537 | + <boundary_conditions name="BulkFormulaTemperature"> |
538 | + <surface_ids> |
539 | + <integer_value shape="1" rank="1">38</integer_value> |
540 | + </surface_ids> |
541 | + <type name="bulk_formulae"/> |
542 | + </boundary_conditions> |
543 | + <subgridscale_parameterisation name="prescribed_diffusivity"/> |
544 | + <output/> |
545 | + <stat/> |
546 | + <convergence> |
547 | + <include_in_convergence/> |
548 | + </convergence> |
549 | + <detectors> |
550 | + <include_in_detectors/> |
551 | + </detectors> |
552 | + <steady_state> |
553 | + <include_in_steady_state/> |
554 | + </steady_state> |
555 | + <consistent_interpolation/> |
556 | + </prognostic> |
557 | + </scalar_field> |
558 | + <scalar_field name="PerturbationDensity" rank="0"> |
559 | + <diagnostic> |
560 | + <algorithm name="Internal" material_phase_support="multiple"/> |
561 | + <mesh name="VelocityMesh"/> |
562 | + <output/> |
563 | + <stat/> |
564 | + <convergence> |
565 | + <include_in_convergence/> |
566 | + </convergence> |
567 | + <detectors> |
568 | + <include_in_detectors/> |
569 | + </detectors> |
570 | + <steady_state> |
571 | + <include_in_steady_state/> |
572 | + </steady_state> |
573 | + </diagnostic> |
574 | + </scalar_field> |
575 | + <scalar_field name="Salinity" rank="0"> |
576 | + <prognostic> |
577 | + <mesh name="VelocityMesh"/> |
578 | + <equation name="AdvectionDiffusion"/> |
579 | + <spatial_discretisation> |
580 | + <continuous_galerkin> |
581 | + <stabilisation> |
582 | + <no_stabilisation/> |
583 | + </stabilisation> |
584 | + <advection_terms/> |
585 | + <mass_terms/> |
586 | + </continuous_galerkin> |
587 | + <conservative_advection> |
588 | + <real_value rank="0">0.0</real_value> |
589 | + </conservative_advection> |
590 | + </spatial_discretisation> |
591 | + <temporal_discretisation> |
592 | + <theta> |
593 | + <real_value rank="0">1.0</real_value> |
594 | + </theta> |
595 | + </temporal_discretisation> |
596 | + <solver> |
597 | + <iterative_method name="gmres"> |
598 | + <restart> |
599 | + <integer_value rank="0">30</integer_value> |
600 | + </restart> |
601 | + </iterative_method> |
602 | + <preconditioner name="sor"/> |
603 | + <relative_error> |
604 | + <real_value rank="0">1.0e-7</real_value> |
605 | + </relative_error> |
606 | + <max_iterations> |
607 | + <integer_value rank="0">2000</integer_value> |
608 | + </max_iterations> |
609 | + <never_ignore_solver_failures/> |
610 | + <diagnostics> |
611 | + <monitors/> |
612 | + </diagnostics> |
613 | + </solver> |
614 | + <initial_condition name="WholeMesh"> |
615 | + <constant> |
616 | + <real_value rank="0">35</real_value> |
617 | + </constant> |
618 | + </initial_condition> |
619 | + <boundary_conditions name="BulkFormulaSalinity"> |
620 | + <surface_ids> |
621 | + <integer_value shape="1" rank="1">38</integer_value> |
622 | + </surface_ids> |
623 | + <type name="bulk_formulae"/> |
624 | + </boundary_conditions> |
625 | + <subgridscale_parameterisation name="prescribed_diffusivity"/> |
626 | + <output/> |
627 | + <stat/> |
628 | + <convergence> |
629 | + <include_in_convergence/> |
630 | + </convergence> |
631 | + <detectors> |
632 | + <include_in_detectors/> |
633 | + </detectors> |
634 | + <steady_state> |
635 | + <include_in_steady_state/> |
636 | + </steady_state> |
637 | + <consistent_interpolation/> |
638 | + </prognostic> |
639 | + </scalar_field> |
640 | + <scalar_field name="PhotosyntheticRadiation" rank="0"> |
641 | + <prognostic> |
642 | + <mesh name="VelocityMesh"/> |
643 | + <equation name="AdvectionDiffusion"/> |
644 | + <spatial_discretisation> |
645 | + <continuous_galerkin> |
646 | + <stabilisation> |
647 | + <no_stabilisation/> |
648 | + </stabilisation> |
649 | + <advection_terms> |
650 | + <exclude_advection_terms/> |
651 | + </advection_terms> |
652 | + <mass_terms/> |
653 | + </continuous_galerkin> |
654 | + <conservative_advection> |
655 | + <real_value rank="0">0</real_value> |
656 | + </conservative_advection> |
657 | + </spatial_discretisation> |
658 | + <temporal_discretisation> |
659 | + <theta> |
660 | + <real_value rank="0">1</real_value> |
661 | + </theta> |
662 | + </temporal_discretisation> |
663 | + <solver> |
664 | + <iterative_method name="gmres"> |
665 | + <restart> |
666 | + <integer_value rank="0">30</integer_value> |
667 | + </restart> |
668 | + </iterative_method> |
669 | + <preconditioner name="sor"/> |
670 | + <relative_error> |
671 | + <real_value rank="0">1e-6</real_value> |
672 | + </relative_error> |
673 | + <max_iterations> |
674 | + <integer_value rank="0">3000</integer_value> |
675 | + </max_iterations> |
676 | + <never_ignore_solver_failures/> |
677 | + <diagnostics> |
678 | + <monitors/> |
679 | + </diagnostics> |
680 | + </solver> |
681 | + <initial_condition name="WholeMesh"> |
682 | + <constant> |
683 | + <real_value rank="0">0</real_value> |
684 | + </constant> |
685 | + </initial_condition> |
686 | + <boundary_conditions name="BulkFormulaPSR"> |
687 | + <surface_ids> |
688 | + <integer_value shape="1" rank="1">38</integer_value> |
689 | + </surface_ids> |
690 | + <type name="bulk_formulae"/> |
691 | + </boundary_conditions> |
692 | + <output/> |
693 | + <stat/> |
694 | + <convergence> |
695 | + <include_in_convergence/> |
696 | + </convergence> |
697 | + <detectors> |
698 | + <include_in_detectors/> |
699 | + </detectors> |
700 | + <steady_state> |
701 | + <include_in_steady_state/> |
702 | + </steady_state> |
703 | + <consistent_interpolation/> |
704 | + </prognostic> |
705 | + </scalar_field> |
706 | + </material_phase> |
707 | + <ocean_forcing> |
708 | + <bulk_formulae> |
709 | + <bulk_formulae> |
710 | + <type name="NCAR"/> |
711 | + </bulk_formulae> |
712 | + <input_file file_name="1970_stationPapa.nc"/> |
713 | + <input_file_type> |
714 | + <type name="ERA40"/> |
715 | + </input_file_type> |
716 | + <output_fluxes_diagnostics> |
717 | + <vector_field name="MomentumFlux" rank="1"> |
718 | + <diagnostic> |
719 | + <algorithm name="Internal" material_phase_support="multiple"/> |
720 | + <mesh name="VelocityMesh"/> |
721 | + <output/> |
722 | + <stat/> |
723 | + <convergence> |
724 | + <include_in_convergence/> |
725 | + </convergence> |
726 | + <detectors> |
727 | + <include_in_detectors/> |
728 | + </detectors> |
729 | + <steady_state> |
730 | + <include_in_steady_state/> |
731 | + </steady_state> |
732 | + </diagnostic> |
733 | + </vector_field> |
734 | + <scalar_field name="HeatFlux" rank="0"> |
735 | + <diagnostic> |
736 | + <algorithm name="Internal" material_phase_support="multiple"/> |
737 | + <mesh name="VelocityMesh"/> |
738 | + <output/> |
739 | + <stat/> |
740 | + <convergence> |
741 | + <include_in_convergence/> |
742 | + </convergence> |
743 | + <detectors> |
744 | + <include_in_detectors/> |
745 | + </detectors> |
746 | + <steady_state> |
747 | + <include_in_steady_state/> |
748 | + </steady_state> |
749 | + </diagnostic> |
750 | + </scalar_field> |
751 | + <scalar_field name="SalinityFlux" rank="0"> |
752 | + <diagnostic> |
753 | + <algorithm name="Internal" material_phase_support="multiple"/> |
754 | + <mesh name="VelocityMesh"/> |
755 | + <output/> |
756 | + <stat/> |
757 | + <convergence> |
758 | + <include_in_convergence/> |
759 | + </convergence> |
760 | + <detectors> |
761 | + <include_in_detectors/> |
762 | + </detectors> |
763 | + <steady_state> |
764 | + <include_in_steady_state/> |
765 | + </steady_state> |
766 | + </diagnostic> |
767 | + </scalar_field> |
768 | + <scalar_field name="PhotosyntheticRadiationDownward" rank="0"> |
769 | + <diagnostic> |
770 | + <algorithm name="Internal" material_phase_support="multiple"/> |
771 | + <mesh name="VelocityMesh"/> |
772 | + <output/> |
773 | + <stat/> |
774 | + <convergence> |
775 | + <include_in_convergence/> |
776 | + </convergence> |
777 | + <detectors> |
778 | + <include_in_detectors/> |
779 | + </detectors> |
780 | + <steady_state> |
781 | + <include_in_steady_state/> |
782 | + </steady_state> |
783 | + </diagnostic> |
784 | + </scalar_field> |
785 | + </output_fluxes_diagnostics> |
786 | + </bulk_formulae> |
787 | + </ocean_forcing> |
788 | +</fluidity_options> |
789 | |
790 | === added file 'tests/forcing_inst_vals/forcing-ncar_inst.flml' |
791 | --- tests/forcing_inst_vals/forcing-ncar_inst.flml 1970-01-01 00:00:00 +0000 |
792 | +++ tests/forcing_inst_vals/forcing-ncar_inst.flml 2011-09-05 07:36:25 +0000 |
793 | @@ -0,0 +1,589 @@ |
794 | +<?xml version='1.0' encoding='utf-8'?> |
795 | +<fluidity_options> |
796 | + <simulation_name> |
797 | + <string_value lines="1">forcing-ncar_inst</string_value> |
798 | + </simulation_name> |
799 | + <problem_type> |
800 | + <string_value lines="1">oceans</string_value> |
801 | + </problem_type> |
802 | + <geometry> |
803 | + <dimension> |
804 | + <integer_value rank="0">3</integer_value> |
805 | + </dimension> |
806 | + <mesh name="CoordinateMesh"> |
807 | + <from_file file_name="column"> |
808 | + <format name="triangle"/> |
809 | + <stat> |
810 | + <include_in_stat/> |
811 | + </stat> |
812 | + </from_file> |
813 | + </mesh> |
814 | + <mesh name="VelocityMesh"> |
815 | + <from_mesh> |
816 | + <mesh name="CoordinateMesh"/> |
817 | + <stat> |
818 | + <exclude_from_stat/> |
819 | + </stat> |
820 | + </from_mesh> |
821 | + </mesh> |
822 | + <mesh name="PressureMesh"> |
823 | + <from_mesh> |
824 | + <mesh name="CoordinateMesh"/> |
825 | + <stat> |
826 | + <exclude_from_stat/> |
827 | + </stat> |
828 | + </from_mesh> |
829 | + </mesh> |
830 | + <quadrature> |
831 | + <degree> |
832 | + <integer_value rank="0">3</integer_value> |
833 | + </degree> |
834 | + </quadrature> |
835 | + </geometry> |
836 | + <io> |
837 | + <dump_format> |
838 | + <string_value>vtk</string_value> |
839 | + </dump_format> |
840 | + <dump_period> |
841 | + <constant> |
842 | + <real_value rank="0">360.0</real_value> |
843 | + </constant> |
844 | + </dump_period> |
845 | + <output_mesh name="CoordinateMesh"/> |
846 | + <stat/> |
847 | + </io> |
848 | + <timestepping> |
849 | + <current_time> |
850 | + <real_value rank="0">0.0</real_value> |
851 | + <time_units date="seconds since 1970-01-01 12:00:0.0"/> |
852 | + </current_time> |
853 | + <timestep> |
854 | + <real_value rank="0">360.0</real_value> |
855 | + </timestep> |
856 | + <finish_time> |
857 | + <real_value rank="0">1440</real_value> |
858 | + <comment>31536000.0 - 1 year |
859 | +360000 - 12 hours (i.e. 2 forcing steps)</comment> |
860 | + </finish_time> |
861 | + <nonlinear_iterations> |
862 | + <integer_value rank="0">2</integer_value> |
863 | + </nonlinear_iterations> |
864 | + </timestepping> |
865 | + <physical_parameters> |
866 | + <gravity> |
867 | + <magnitude> |
868 | + <real_value rank="0">9.8</real_value> |
869 | + </magnitude> |
870 | + <vector_field name="GravityDirection" rank="1"> |
871 | + <prescribed> |
872 | + <mesh name="CoordinateMesh"/> |
873 | + <value name="WholeMesh"> |
874 | + <constant> |
875 | + <real_value shape="3" dim1="dim" rank="1">0.0 0.0 -1.0</real_value> |
876 | + </constant> |
877 | + </value> |
878 | + <output/> |
879 | + <stat> |
880 | + <include_in_stat/> |
881 | + </stat> |
882 | + <detectors> |
883 | + <exclude_from_detectors/> |
884 | + </detectors> |
885 | + </prescribed> |
886 | + </vector_field> |
887 | + </gravity> |
888 | + <coriolis> |
889 | + <f_plane> |
890 | + <f> |
891 | + <real_value rank="0">1.0e-4</real_value> |
892 | + </f> |
893 | + </f_plane> |
894 | + </coriolis> |
895 | + </physical_parameters> |
896 | + <material_phase name="Fluid"> |
897 | + <equation_of_state> |
898 | + <fluids> |
899 | + <ocean_pade_approximation/> |
900 | + </fluids> |
901 | + </equation_of_state> |
902 | + <subgridscale_parameterisations> |
903 | + <prescribed_diffusivity> |
904 | + <tensor_field name="PrescribedDiffusivity" rank="2"> |
905 | + <prescribed> |
906 | + <mesh name="VelocityMesh"/> |
907 | + <value name="WholeMesh"> |
908 | + <anisotropic_symmetric> |
909 | + <constant> |
910 | + <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> |
911 | + </constant> |
912 | + </anisotropic_symmetric> |
913 | + </value> |
914 | + <output/> |
915 | + </prescribed> |
916 | + </tensor_field> |
917 | + </prescribed_diffusivity> |
918 | + </subgridscale_parameterisations> |
919 | + <scalar_field name="Pressure" rank="0"> |
920 | + <prescribed> |
921 | + <mesh name="PressureMesh"/> |
922 | + <value name="WholeMesh"> |
923 | + <constant> |
924 | + <real_value rank="0">0.0</real_value> |
925 | + </constant> |
926 | + </value> |
927 | + <output/> |
928 | + <stat/> |
929 | + <detectors> |
930 | + <exclude_from_detectors/> |
931 | + </detectors> |
932 | + </prescribed> |
933 | + </scalar_field> |
934 | + <vector_field name="Velocity" rank="1"> |
935 | + <prognostic> |
936 | + <mesh name="VelocityMesh"/> |
937 | + <equation name="Boussinesq"/> |
938 | + <spatial_discretisation> |
939 | + <continuous_galerkin> |
940 | + <stabilisation> |
941 | + <streamline_upwind> |
942 | + <nu_bar_unity/> |
943 | + <nu_scale name="unity"> |
944 | + <real_value shape="1" rank="0">1.0</real_value> |
945 | + </nu_scale> |
946 | + </streamline_upwind> |
947 | + </stabilisation> |
948 | + <mass_terms> |
949 | + <lump_mass_matrix/> |
950 | + </mass_terms> |
951 | + <advection_terms> |
952 | + <exclude_advection_terms/> |
953 | + </advection_terms> |
954 | + <stress_terms> |
955 | + <tensor_form/> |
956 | + </stress_terms> |
957 | + </continuous_galerkin> |
958 | + <conservative_advection> |
959 | + <real_value rank="0">0.0</real_value> |
960 | + </conservative_advection> |
961 | + </spatial_discretisation> |
962 | + <temporal_discretisation> |
963 | + <theta> |
964 | + <real_value rank="0">1.0</real_value> |
965 | + </theta> |
966 | + <relaxation> |
967 | + <real_value rank="0">1.0</real_value> |
968 | + </relaxation> |
969 | + </temporal_discretisation> |
970 | + <solver> |
971 | + <iterative_method name="gmres"> |
972 | + <restart> |
973 | + <integer_value rank="0">30</integer_value> |
974 | + </restart> |
975 | + </iterative_method> |
976 | + <preconditioner name="sor"/> |
977 | + <relative_error> |
978 | + <real_value rank="0">1.0E-5</real_value> |
979 | + </relative_error> |
980 | + <max_iterations> |
981 | + <integer_value rank="0">2000</integer_value> |
982 | + </max_iterations> |
983 | + <never_ignore_solver_failures/> |
984 | + <diagnostics> |
985 | + <monitors/> |
986 | + </diagnostics> |
987 | + </solver> |
988 | + <initial_condition name="WholeMesh"> |
989 | + <constant> |
990 | + <real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value> |
991 | + </constant> |
992 | + </initial_condition> |
993 | + <boundary_conditions name="lateral"> |
994 | + <surface_ids> |
995 | + <integer_value shape="4" rank="1">40 41 42 43</integer_value> |
996 | + </surface_ids> |
997 | + <type name="dirichlet"> |
998 | + <align_bc_with_cartesian> |
999 | + <z_component> |
1000 | + <constant> |
1001 | + <real_value rank="0">0.0</real_value> |
1002 | + </constant> |
1003 | + </z_component> |
1004 | + </align_bc_with_cartesian> |
1005 | + </type> |
1006 | + </boundary_conditions> |
1007 | + <boundary_conditions name="topbottom"> |
1008 | + <surface_ids> |
1009 | + <integer_value shape="2" rank="1">38 39</integer_value> |
1010 | + </surface_ids> |
1011 | + <type name="dirichlet"> |
1012 | + <align_bc_with_cartesian> |
1013 | + <z_component> |
1014 | + <constant> |
1015 | + <real_value rank="0">0.0</real_value> |
1016 | + </constant> |
1017 | + </z_component> |
1018 | + </align_bc_with_cartesian> |
1019 | + </type> |
1020 | + </boundary_conditions> |
1021 | + <boundary_conditions name="BulkFormulaVelocity"> |
1022 | + <surface_ids> |
1023 | + <integer_value shape="1" rank="1">38</integer_value> |
1024 | + </surface_ids> |
1025 | + <type name="bulk_formulae"/> |
1026 | + </boundary_conditions> |
1027 | + <tensor_field name="Viscosity" rank="2"> |
1028 | + <prescribed> |
1029 | + <value name="WholeMesh"> |
1030 | + <anisotropic_symmetric> |
1031 | + <constant> |
1032 | + <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> |
1033 | + </constant> |
1034 | + </anisotropic_symmetric> |
1035 | + </value> |
1036 | + <output/> |
1037 | + </prescribed> |
1038 | + </tensor_field> |
1039 | + <vector_field name="Absorption" rank="1"> |
1040 | + <prescribed> |
1041 | + <value name="WholeMesh"> |
1042 | + <constant> |
1043 | + <real_value shape="3" dim1="dim" rank="1">1.0e-7 1.0e-7 1.0e-7</real_value> |
1044 | + </constant> |
1045 | + </value> |
1046 | + <output/> |
1047 | + <stat> |
1048 | + <include_in_stat/> |
1049 | + </stat> |
1050 | + <detectors> |
1051 | + <exclude_from_detectors/> |
1052 | + </detectors> |
1053 | + </prescribed> |
1054 | + <default_absorption/> |
1055 | + </vector_field> |
1056 | + <output/> |
1057 | + <stat> |
1058 | + <include_in_stat/> |
1059 | + <previous_time_step> |
1060 | + <exclude_from_stat/> |
1061 | + </previous_time_step> |
1062 | + <nonlinear_field> |
1063 | + <exclude_from_stat/> |
1064 | + </nonlinear_field> |
1065 | + </stat> |
1066 | + <convergence> |
1067 | + <include_in_convergence/> |
1068 | + </convergence> |
1069 | + <detectors> |
1070 | + <include_in_detectors/> |
1071 | + </detectors> |
1072 | + <steady_state> |
1073 | + <include_in_steady_state/> |
1074 | + </steady_state> |
1075 | + <consistent_interpolation/> |
1076 | + </prognostic> |
1077 | + </vector_field> |
1078 | + <scalar_field name="Temperature" rank="0"> |
1079 | + <prognostic> |
1080 | + <mesh name="VelocityMesh"/> |
1081 | + <equation name="AdvectionDiffusion"/> |
1082 | + <spatial_discretisation> |
1083 | + <continuous_galerkin> |
1084 | + <stabilisation> |
1085 | + <streamline_upwind> |
1086 | + <nu_bar_unity/> |
1087 | + <nu_scale name="unity"> |
1088 | + <real_value shape="1" rank="0">1.0</real_value> |
1089 | + </nu_scale> |
1090 | + </streamline_upwind> |
1091 | + </stabilisation> |
1092 | + <advection_terms> |
1093 | + <exclude_advection_terms/> |
1094 | + </advection_terms> |
1095 | + <mass_terms/> |
1096 | + </continuous_galerkin> |
1097 | + <conservative_advection> |
1098 | + <real_value rank="0">0.0</real_value> |
1099 | + </conservative_advection> |
1100 | + </spatial_discretisation> |
1101 | + <temporal_discretisation> |
1102 | + <theta> |
1103 | + <real_value rank="0">1.0</real_value> |
1104 | + </theta> |
1105 | + </temporal_discretisation> |
1106 | + <solver> |
1107 | + <iterative_method name="gmres"> |
1108 | + <restart> |
1109 | + <integer_value rank="0">30</integer_value> |
1110 | + </restart> |
1111 | + </iterative_method> |
1112 | + <preconditioner name="sor"/> |
1113 | + <relative_error> |
1114 | + <real_value rank="0">5.0e-5</real_value> |
1115 | + </relative_error> |
1116 | + <max_iterations> |
1117 | + <integer_value rank="0">1000000</integer_value> |
1118 | + </max_iterations> |
1119 | + <never_ignore_solver_failures/> |
1120 | + <diagnostics> |
1121 | + <monitors/> |
1122 | + </diagnostics> |
1123 | + </solver> |
1124 | + <initial_condition name="WholeMesh"> |
1125 | + <constant> |
1126 | + <real_value rank="0">280</real_value> |
1127 | + </constant> |
1128 | + </initial_condition> |
1129 | + <boundary_conditions name="BulkFormulaTemperature"> |
1130 | + <surface_ids> |
1131 | + <integer_value shape="1" rank="1">38</integer_value> |
1132 | + </surface_ids> |
1133 | + <type name="bulk_formulae"/> |
1134 | + </boundary_conditions> |
1135 | + <subgridscale_parameterisation name="prescribed_diffusivity"/> |
1136 | + <output/> |
1137 | + <stat/> |
1138 | + <convergence> |
1139 | + <include_in_convergence/> |
1140 | + </convergence> |
1141 | + <detectors> |
1142 | + <include_in_detectors/> |
1143 | + </detectors> |
1144 | + <steady_state> |
1145 | + <include_in_steady_state/> |
1146 | + </steady_state> |
1147 | + <consistent_interpolation/> |
1148 | + </prognostic> |
1149 | + </scalar_field> |
1150 | + <scalar_field name="PerturbationDensity" rank="0"> |
1151 | + <diagnostic> |
1152 | + <algorithm name="Internal" material_phase_support="multiple"/> |
1153 | + <mesh name="VelocityMesh"/> |
1154 | + <output/> |
1155 | + <stat/> |
1156 | + <convergence> |
1157 | + <include_in_convergence/> |
1158 | + </convergence> |
1159 | + <detectors> |
1160 | + <include_in_detectors/> |
1161 | + </detectors> |
1162 | + <steady_state> |
1163 | + <include_in_steady_state/> |
1164 | + </steady_state> |
1165 | + </diagnostic> |
1166 | + </scalar_field> |
1167 | + <scalar_field name="Salinity" rank="0"> |
1168 | + <prognostic> |
1169 | + <mesh name="VelocityMesh"/> |
1170 | + <equation name="AdvectionDiffusion"/> |
1171 | + <spatial_discretisation> |
1172 | + <continuous_galerkin> |
1173 | + <stabilisation> |
1174 | + <no_stabilisation/> |
1175 | + </stabilisation> |
1176 | + <advection_terms/> |
1177 | + <mass_terms/> |
1178 | + </continuous_galerkin> |
1179 | + <conservative_advection> |
1180 | + <real_value rank="0">0.0</real_value> |
1181 | + </conservative_advection> |
1182 | + </spatial_discretisation> |
1183 | + <temporal_discretisation> |
1184 | + <theta> |
1185 | + <real_value rank="0">1.0</real_value> |
1186 | + </theta> |
1187 | + </temporal_discretisation> |
1188 | + <solver> |
1189 | + <iterative_method name="gmres"> |
1190 | + <restart> |
1191 | + <integer_value rank="0">30</integer_value> |
1192 | + </restart> |
1193 | + </iterative_method> |
1194 | + <preconditioner name="sor"/> |
1195 | + <relative_error> |
1196 | + <real_value rank="0">1.0e-7</real_value> |
1197 | + </relative_error> |
1198 | + <max_iterations> |
1199 | + <integer_value rank="0">2000</integer_value> |
1200 | + </max_iterations> |
1201 | + <never_ignore_solver_failures/> |
1202 | + <diagnostics> |
1203 | + <monitors/> |
1204 | + </diagnostics> |
1205 | + </solver> |
1206 | + <initial_condition name="WholeMesh"> |
1207 | + <constant> |
1208 | + <real_value rank="0">35</real_value> |
1209 | + </constant> |
1210 | + </initial_condition> |
1211 | + <boundary_conditions name="BulkFormulaSalinity"> |
1212 | + <surface_ids> |
1213 | + <integer_value shape="1" rank="1">38</integer_value> |
1214 | + </surface_ids> |
1215 | + <type name="bulk_formulae"/> |
1216 | + </boundary_conditions> |
1217 | + <subgridscale_parameterisation name="prescribed_diffusivity"/> |
1218 | + <output/> |
1219 | + <stat/> |
1220 | + <convergence> |
1221 | + <include_in_convergence/> |
1222 | + </convergence> |
1223 | + <detectors> |
1224 | + <include_in_detectors/> |
1225 | + </detectors> |
1226 | + <steady_state> |
1227 | + <include_in_steady_state/> |
1228 | + </steady_state> |
1229 | + <consistent_interpolation/> |
1230 | + </prognostic> |
1231 | + </scalar_field> |
1232 | + <scalar_field name="PhotosyntheticRadiation" rank="0"> |
1233 | + <prognostic> |
1234 | + <mesh name="VelocityMesh"/> |
1235 | + <equation name="AdvectionDiffusion"/> |
1236 | + <spatial_discretisation> |
1237 | + <continuous_galerkin> |
1238 | + <stabilisation> |
1239 | + <no_stabilisation/> |
1240 | + </stabilisation> |
1241 | + <advection_terms> |
1242 | + <exclude_advection_terms/> |
1243 | + </advection_terms> |
1244 | + <mass_terms/> |
1245 | + </continuous_galerkin> |
1246 | + <conservative_advection> |
1247 | + <real_value rank="0">0</real_value> |
1248 | + </conservative_advection> |
1249 | + </spatial_discretisation> |
1250 | + <temporal_discretisation> |
1251 | + <theta> |
1252 | + <real_value rank="0">1</real_value> |
1253 | + </theta> |
1254 | + </temporal_discretisation> |
1255 | + <solver> |
1256 | + <iterative_method name="gmres"> |
1257 | + <restart> |
1258 | + <integer_value rank="0">30</integer_value> |
1259 | + </restart> |
1260 | + </iterative_method> |
1261 | + <preconditioner name="sor"/> |
1262 | + <relative_error> |
1263 | + <real_value rank="0">1e-6</real_value> |
1264 | + </relative_error> |
1265 | + <max_iterations> |
1266 | + <integer_value rank="0">3000</integer_value> |
1267 | + </max_iterations> |
1268 | + <never_ignore_solver_failures/> |
1269 | + <diagnostics> |
1270 | + <monitors/> |
1271 | + </diagnostics> |
1272 | + </solver> |
1273 | + <initial_condition name="WholeMesh"> |
1274 | + <constant> |
1275 | + <real_value rank="0">0</real_value> |
1276 | + </constant> |
1277 | + </initial_condition> |
1278 | + <boundary_conditions name="BulkFormulaPSR"> |
1279 | + <surface_ids> |
1280 | + <integer_value shape="1" rank="1">38</integer_value> |
1281 | + </surface_ids> |
1282 | + <type name="bulk_formulae"/> |
1283 | + </boundary_conditions> |
1284 | + <output/> |
1285 | + <stat/> |
1286 | + <convergence> |
1287 | + <include_in_convergence/> |
1288 | + </convergence> |
1289 | + <detectors> |
1290 | + <include_in_detectors/> |
1291 | + </detectors> |
1292 | + <steady_state> |
1293 | + <include_in_steady_state/> |
1294 | + </steady_state> |
1295 | + <consistent_interpolation/> |
1296 | + </prognostic> |
1297 | + </scalar_field> |
1298 | + </material_phase> |
1299 | + <ocean_forcing> |
1300 | + <bulk_formulae> |
1301 | + <bulk_formulae> |
1302 | + <type name="NCAR"/> |
1303 | + </bulk_formulae> |
1304 | + <input_file file_name="1970_stationPapa_unacc.nc"/> |
1305 | + <input_file_type> |
1306 | + <type name="ERA40"> |
1307 | + <no_accumulation/> |
1308 | + </type> |
1309 | + </input_file_type> |
1310 | + <output_fluxes_diagnostics> |
1311 | + <vector_field name="MomentumFlux" rank="1"> |
1312 | + <diagnostic> |
1313 | + <algorithm name="Internal" material_phase_support="multiple"/> |
1314 | + <mesh name="VelocityMesh"/> |
1315 | + <output/> |
1316 | + <stat/> |
1317 | + <convergence> |
1318 | + <include_in_convergence/> |
1319 | + </convergence> |
1320 | + <detectors> |
1321 | + <include_in_detectors/> |
1322 | + </detectors> |
1323 | + <steady_state> |
1324 | + <include_in_steady_state/> |
1325 | + </steady_state> |
1326 | + </diagnostic> |
1327 | + </vector_field> |
1328 | + <scalar_field name="HeatFlux" rank="0"> |
1329 | + <diagnostic> |
1330 | + <algorithm name="Internal" material_phase_support="multiple"/> |
1331 | + <mesh name="VelocityMesh"/> |
1332 | + <output/> |
1333 | + <stat/> |
1334 | + <convergence> |
1335 | + <include_in_convergence/> |
1336 | + </convergence> |
1337 | + <detectors> |
1338 | + <include_in_detectors/> |
1339 | + </detectors> |
1340 | + <steady_state> |
1341 | + <include_in_steady_state/> |
1342 | + </steady_state> |
1343 | + </diagnostic> |
1344 | + </scalar_field> |
1345 | + <scalar_field name="SalinityFlux" rank="0"> |
1346 | + <diagnostic> |
1347 | + <algorithm name="Internal" material_phase_support="multiple"/> |
1348 | + <mesh name="VelocityMesh"/> |
1349 | + <output/> |
1350 | + <stat/> |
1351 | + <convergence> |
1352 | + <include_in_convergence/> |
1353 | + </convergence> |
1354 | + <detectors> |
1355 | + <include_in_detectors/> |
1356 | + </detectors> |
1357 | + <steady_state> |
1358 | + <include_in_steady_state/> |
1359 | + </steady_state> |
1360 | + </diagnostic> |
1361 | + </scalar_field> |
1362 | + <scalar_field name="PhotosyntheticRadiationDownward" rank="0"> |
1363 | + <diagnostic> |
1364 | + <algorithm name="Internal" material_phase_support="multiple"/> |
1365 | + <mesh name="VelocityMesh"/> |
1366 | + <output/> |
1367 | + <stat/> |
1368 | + <convergence> |
1369 | + <include_in_convergence/> |
1370 | + </convergence> |
1371 | + <detectors> |
1372 | + <include_in_detectors/> |
1373 | + </detectors> |
1374 | + <steady_state> |
1375 | + <include_in_steady_state/> |
1376 | + </steady_state> |
1377 | + </diagnostic> |
1378 | + </scalar_field> |
1379 | + </output_fluxes_diagnostics> |
1380 | + </bulk_formulae> |
1381 | + </ocean_forcing> |
1382 | +</fluidity_options> |
1383 | |
1384 | === added file 'tests/forcing_inst_vals/forcing_inst_vals.xml' |
1385 | --- tests/forcing_inst_vals/forcing_inst_vals.xml 1970-01-01 00:00:00 +0000 |
1386 | +++ tests/forcing_inst_vals/forcing_inst_vals.xml 2011-09-05 07:36:25 +0000 |
1387 | @@ -0,0 +1,56 @@ |
1388 | +<?xml version="1.0" encoding="UTF-8" ?> |
1389 | +<!DOCTYPE testproblem SYSTEM "regressiontest.dtd"> |
1390 | + |
1391 | +<testproblem> |
1392 | + <name>forcing</name> |
1393 | + <owner userid="jhill1"/> |
1394 | + <tags>flml forcing</tags> |
1395 | + <problem_definition length="short" nprocs="1"> |
1396 | + <command_line>fluidity -v2 -l forcing-ncar.flml; |
1397 | + fluidity -v2 -l forcing-ncar_inst.flml; |
1398 | + </command_line> |
1399 | + </problem_definition> |
1400 | + <variables> |
1401 | + <variable name="FinalTimeNcarOrig" language="python"> |
1402 | +import fluidity_tools |
1403 | +FinalTimeNcarOrig = fluidity_tools.stat_parser("forcing-ncar.stat")['ElapsedTime']['value'][-1] |
1404 | + </variable> |
1405 | + <variable name="FinalTemperatureIntegralNcarOrig" language="python"> |
1406 | +import fluidity_tools |
1407 | +FinalTemperatureIntegralNcarOrig = fluidity_tools.stat_parser("forcing-ncar.stat")['Fluid']['Temperature']['integral'][-1] |
1408 | + </variable> |
1409 | + <variable name="FinalSalinityMinNcarOrig" language="python"> |
1410 | +import fluidity_tools |
1411 | +FinalSalinityMinNcarOrig = fluidity_tools.stat_parser("forcing-ncar.stat")['Fluid']['Salinity']['min'][-1] |
1412 | + </variable> |
1413 | + <variable name="FinalTimeNcarInst" language="python"> |
1414 | +import fluidity_tools |
1415 | +FinalTimeNcarInst = fluidity_tools.stat_parser("forcing-ncar_inst.stat")['ElapsedTime']['value'][-1] |
1416 | + </variable> |
1417 | + <variable name="FinalTemperatureIntegralNcarInst" language="python"> |
1418 | +import fluidity_tools |
1419 | +FinalTemperatureIntegralNcarInst = fluidity_tools.stat_parser("forcing-ncar_inst.stat")['Fluid']['Temperature']['integral'][-1] |
1420 | + </variable> |
1421 | + <variable name="FinalSalinityMinNcarInst" language="python"> |
1422 | +import fluidity_tools |
1423 | +FinalSalinityMinNcarInst = fluidity_tools.stat_parser("forcing-ncar_inst.stat")['Fluid']['Salinity']['min'][-1] |
1424 | + </variable> |
1425 | + |
1426 | +</variables> |
1427 | + |
1428 | + |
1429 | + <pass_tests> |
1430 | + <test name="Ncar: Final time is 1440 seconds" language="python"> |
1431 | +assert FinalTimeNcarOrig ==1440 |
1432 | + </test> |
1433 | + <test name="Times match" language="python"> |
1434 | +assert (abs(FinalTimeNcarOrig - FinalTimeNcarInst)/FinalTimeNcarOrig < 1e-10) |
1435 | + </test> |
1436 | + <test name="Temperature matches" language="python"> |
1437 | +assert(abs(FinalTemperatureIntegralNcarOrig - FinalTemperatureIntegralNcarInst)/FinalTemperatureIntegralNcarOrig < 1e-10) |
1438 | + </test> |
1439 | + <test name="Salinity matches" language="python"> |
1440 | +assert (abs(FinalSalinityMinNcarOrig-FinalSalinityMinNcarInst)/FinalSalinityMinNcarOrig < 2e-10) |
1441 | + </test> |
1442 | + </pass_tests> |
1443 | +</testproblem> |
1444 | |
1445 | === added directory 'tests/forcing_inst_vals/src' |
1446 | === added file 'tests/forcing_inst_vals/src/column.geo' |
1447 | --- tests/forcing_inst_vals/src/column.geo 1970-01-01 00:00:00 +0000 |
1448 | +++ tests/forcing_inst_vals/src/column.geo 2011-09-05 07:36:25 +0000 |
1449 | @@ -0,0 +1,25 @@ |
1450 | +// Gmsh project created on Thu Mar 6 16:27:33 2008 |
1451 | +Point(1) = {-3.35835e+06,-2.35154e+06,4.88594e+06}; |
1452 | +Extrude {100.0,0,0} { |
1453 | + Point{1}; Layers{1}; |
1454 | +} |
1455 | +Extrude {0,100.0,0.0} { |
1456 | + Line{1}; Layers{1}; |
1457 | +} |
1458 | +Extrude {0.0,0.0,-100.0} { |
1459 | + Surface{5}; Layers{50}; |
1460 | +} |
1461 | +//Top |
1462 | +Physical Surface(38) = {5}; |
1463 | +//Bottom |
1464 | +Physical Surface(39) = {27}; |
1465 | +//North |
1466 | +Physical Surface(40) = {22}; |
1467 | +//South |
1468 | +Physical Surface(41) = {14}; |
1469 | +//West |
1470 | +Physical Surface(42) = {26}; |
1471 | +//East |
1472 | +Physical Surface(43) = {18}; |
1473 | +Physical Volume(44) = {1}; |
1474 | + |
Looks good to me. Ship it!