NOAA-SWPC / GSMWAM-IPE

Coupled NEMS app for WAM-IPE
5 stars 11 forks source link

Two-Way Coupling: Pass Analytical Coupling Fields from IPE to WAM #5

Open joeschoonover opened 6 years ago

joeschoonover commented 6 years ago

We are ready to begin passing data from IPE to WAM. We need to verify that that the IPE to WAM interpolation is functioning as expected.

Condition for satisfaction : Prove that the mediator is properly interpolating from the IPE grid to the WAM grid.

rmontuoro commented 6 years ago

Created two_way_coupling branch to test that the SWPC mediator is properly transferring and interpolating fields from IPE to WAM.

joeschoonover commented 6 years ago

One the WAM-side, there are arrays that will need to be filled in. These array can be learned from commits associated with issue NOAA-SWPC/WAM-IPE#58

rmontuoro commented 6 years ago

Performed preliminary 2-way coupling tests with full WAM-IPE model as follows:

WAM level 100 (average temperature: 184.018)

temp_neutral_100

WAM level 120 (average temperature: 741.915)

temp_neutral_120

WAM level 140 (average temperature: 1064.81)

temp_neutral_140

WAM level 145 (average temperature: 1067.64)

temp_neutral_145
rmontuoro commented 6 years ago

Additional tests performed by exporting constant Fields from WAM to IPE and back through the SWPC mediator. Constant values were 0 and 100. Absolute difference plots (WAM import-export) are included below.

Field = 0:

WAM level 100 - 95.54 km (mindiff = 0., maxdiff = 2.2e-309, non-zero: 297/13072)

test_zero_99

WAM level 120 - 145.17 km (mindiff = 0., maxdiff = 2.5e-309, non-zero: 21/13072)

test_zero_119

WAM level 140 - 305.04 km (mindiff = 0., maxdiff = 1.1e-309, non-zero: 12/13072)

test_zero_139

WAM level 145 - 359.60 km (mindiff = 0., maxdiff = 1.2e-309, non-zero: 12/13072)

test_zero_144

Field = 100:

WAM level 100 - 95.54 km (mindiff = -100., maxdiff = 0., non-zero: 319/13072)

test_const_99

WAM level 120 - 145.17 km (mindiff = -100., maxdiff = 0., non-zero: 21/13072)

test_const_119

WAM level 140 - 305.04 km (mindiff = -100., maxdiff = 0., non-zero: 12/13072)

test_const_139

WAM level 145 - 359.60 km (mindiff = -100., maxdiff = 0., non-zero: 12/13072)

test_const_144
rmontuoro commented 6 years ago

Updated two_way_coupling branch to include test code used for preliminary experiments above. From now on, this branch is only intended to be used for testing purposes.

rmontuoro commented 6 years ago

More tests performed by setting Fields to 0 and 100 in IPE and exporting them to WAM through the SWPC mediator. Absolute difference plots (WAM import-export) are identical to previous experiment. Results are summarized below.

Field = 0.

WAM Level min value max value non-zero
100 0. 9.83424e-311 298
120 0. 8.66691e-310 20
140 0. 8.48798e-314 11
145 0. 8.48798e-314 11

Field = 100.

WAM Level min value max value non-zero
100 -100. 0. 319
120 -100. 0. 21
140 -100. 0. 12
145 -100. 0. 12
rmontuoro commented 6 years ago

Additional 2-way coupling tests performed using a toy WAM model on a regular grid and evenly-spaced vertical levels. These tests are aimed at investigating the accuracy of 2-way coupling as fields are exported from WAM to IPE, then rerouted from IPE to WAM.

Tested WAM fields are built using the following analytical formula:

f(i, j, k) = ifield * sin(2*PI*i/NLONG) * (sin(4*PI*j/total_count(2)) + sin(8*PI*k/total_count(3)))

where:

Test WAM levels are:

WAM Level N. value (km)
1 90.000000
2 123.333333
3 156.666667
4 190.000000
5 223.333333
6 256.666667
7 290.000000
8 323.333333
9 356.666667
10 390.000000
11 423.333333
12 456.666667
13 490.000000
14 523.333333
15 556.666667
16 590.000000
17 623.333333
18 656.666667
19 690.000000
20 723.333333
21 756.666667
22 790.000000
23 823.333333
24 856.666667
25 890.000000

Intermediate levels in the SWPC mediator are provided by WAM and set equal to the WAM levels.

WAM Level 1

WAM Level 3

rmontuoro commented 6 years ago

Here's a section of the IPE mesh: visit0007

joeschoonover commented 5 years ago

Posting this figure on behalf of @oehmke filled_equator0000.jpeg