1 | The ropp\_fm\_ecmwf\_state2state subroutine maps the state vector x\%state into the state variables x\%temp, x\%shum, x\%press\_sfc x\%press and x\%geop.
|
---|
2 |
|
---|
3 | Calculation of full level pressure and geopotential is following
|
---|
4 |
|
---|
5 | @article{simmons_energy_1981,
|
---|
6 | title = {An energy and angular-momentum conserving vertical finite-difference scheme and hybrid vertical coordinates},
|
---|
7 | volume = {109},
|
---|
8 | journal = {mwr},
|
---|
9 | author = {Simmons, A. J. and Burridge, D. M.},
|
---|
10 | year = {1981},
|
---|
11 | pages = {758--766}
|
---|
12 | }
|
---|
13 | equation 3.18.
|
---|
14 |
|
---|
15 | The ropp\_fm\_ecmwf\_state2state\_tl(x, x\_tl) subroutine propagates a perturbation of the state vector x\_tl\%state to the state variables of x\_tl.
|
---|
16 |
|
---|
17 | The ropp\_fm\_ecmwf\_state2state\_ad(x, x\_ad) subroutine propagates a perturbation of the state variables of x\_ad to the adjoint x\_ad\%state.
|
---|
18 |
|
---|
19 | Tests:
|
---|
20 | The t_\fascod\_ecmwf\_tl and t\_fascod\_ecmwf\_ad programs test the ad/tl implementation by mapping a perturbation from state-vector to refractivty space and bending angle space, ie. they test refrac\_1d and bandle\_1d as well as the state2state subroutines. The TL test only verifies that <f(x+dx)-f(x), f\_tl(dx)>/|f(x+dx)-f(x)| is close to unity when |f(x+dx)-f(x) - f\_tl(dx)|/|f(x+dx)-f(x)| is at minimum. The t\_fascod\_ecmwf\_ad propes the consistency of ad and tl code to $10^-8$ relative difference.
|
---|
21 |
|
---|
22 |
|
---|
23 | ./t\_fascod\_ecmwf\_tl
|
---|
24 |
|
---|
25 | TL: x\%non\_ideal, x\%new\_ref\_op, x\%new\_bangle\_op = F F F
|
---|
26 |
|
---|
27 | Checking REFRACTIVITY TL FASCOD_TRO
|
---|
28 | |dy|/|dy_init| cos_angle 100*rel diff
|
---|
29 | 1.0000000000E+00 7.7748352054E-01 8.9484237172E+01
|
---|
30 | 1.0000000000E-01 8.7302799306E-01 5.5141499049E+01
|
---|
31 | 1.0000000000E-02 9.9654791218E-01 8.3651384082E+00
|
---|
32 | 1.0000000000E-03 9.9995704249E-01 9.2708766520E-01
|
---|
33 | 1.0000000000E-04 9.9999956976E-01 9.2784559077E-02
|
---|
34 | 1.0000000000E-05 9.9999999570E-01 9.2792156723E-03
|
---|
35 | 1.0000000000E-06 9.9999999996E-01 9.2796796506E-04
|
---|
36 | 1.0000000000E-07 1.0000000000E+00 9.3748021206E-05
|
---|
37 | 1.0000000000E-08 1.0000000000E+00 7.3099526302E-05
|
---|
38 | 1.0000000000E-09 9.9999999995E-01 1.0025458375E-03
|
---|
39 | 1.0000000000E-10 1.0000000000E+00 3.3108763310E-05
|
---|
40 | 1.0000000000E-11 9.9999999999E-01 3.3880138137E-04
|
---|
41 | 1.0000000000E-12 9.9999999948E-01 3.3074131786E-03
|
---|
42 | 1.0000000000E-13 9.9999993327E-01 3.6535174995E-02
|
---|
43 | 1.0000000000E-14 9.9999234297E-01 3.9197448204E-01
|
---|
44 | Refractivity TL check passed
|
---|
45 |
|
---|
46 | Checking BENDING ANGLE TL FASCOD_TRO
|
---|
47 | |dy|/|dy_init| cos_angle 100*rel diff
|
---|
48 | 1.0000000000E+00 -9.1670648299E-02 1.0000000007E+02
|
---|
49 | 1.0000000000E-01 -1.1552789005E-01 1.0000000001E+02
|
---|
50 | 1.0000000000E-02 -9.8650088270E-02 1.0000000000E+02
|
---|
51 | 1.0000000000E-03 1.0856024113E-01 9.9999999999E+01
|
---|
52 | 1.0000000000E-04 9.9267812339E-01 1.2107567411E+01
|
---|
53 | 1.0000000000E-05 9.9995016445E-01 1.0710929189E+00
|
---|
54 | 1.0000000000E-06 9.9999949644E-01 1.0757195599E-01
|
---|
55 | 1.0000000000E-07 9.9999999487E-01 1.0848793386E-02
|
---|
56 | 1.0000000000E-08 9.9999999970E-01 2.5520329384E-03
|
---|
57 | 1.0000000000E-09 9.9999999954E-01 3.0514677289E-03
|
---|
58 | 1.0000000000E-10 9.9999946877E-01 1.0316923792E-01
|
---|
59 | 1.0000000000E-11 9.9998816478E-01 5.3470767757E-01
|
---|
60 | 1.0000000000E-12 9.9974796056E-01 2.2597030568E+00
|
---|
61 | 1.0000000000E-13 9.6657556387E-01 2.6119611187E+01
|
---|
62 | 1.0000000000E-14 5.7171199596E-01 8.2231672109E+01
|
---|
63 | Bending angle TL check passed
|
---|
64 | ****************************
|
---|
65 | ********** PASS **********
|
---|
66 | ****************************
|
---|
67 |
|
---|
68 |
|
---|
69 | ./t\_fascod\_ecmwf\_ad
|
---|
70 |
|
---|
71 | AD: x\%non\_ideal, x\%new\_ref\_op, x\%new\_bangle\_op = F F F
|
---|
72 |
|
---|
73 | Checking REFRACTIVITY AD FASCOD_TRO
|
---|
74 | norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 = 364528929.066 364528928.849 1.0000000 0.59628E-09
|
---|
75 |
|
---|
76 | Checking BENDING ANGLE AD FASCOD_TRO
|
---|
77 | norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 = -9.025 -9.025 1.0000000 -0.36748E-09
|
---|
78 |
|
---|
79 | Checking REFRACTIVITY AD FASCOD_MLS
|
---|
80 | norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 = 325588949.035 325588948.809 1.0000000 0.69328E-09
|
---|
81 |
|
---|
82 | Checking BENDING ANGLE AD FASCOD_MLS
|
---|
83 | norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 = 75.279 75.279 1.0000000 0.73677E-09
|
---|
84 |
|
---|
85 | Checking REFRACTIVITY AD FASCOD_MLW
|
---|
86 | norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 = 431837535.061 431837532.947 1.0000000 0.48936E-08
|
---|
87 |
|
---|
88 | Checking BENDING ANGLE AD FASCOD_MLW
|
---|
89 | norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 = -79.704 -79.704 1.0000000 -0.19451E-09
|
---|
90 |
|
---|
91 | Checking REFRACTIVITY AD FASCOD_SAS
|
---|
92 | norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 = 372208695.410 372208692.403 1.0000000 0.80779E-08
|
---|
93 |
|
---|
94 | Checking BENDING ANGLE AD FASCOD_SAS
|
---|
95 | norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 = 25.611 25.611 1.0000000 -0.79416E-09
|
---|
96 |
|
---|
97 | Checking REFRACTIVITY AD FASCOD_SAW
|
---|
98 | norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 = 409038225.382 409038225.287 1.0000000 0.23228E-09
|
---|
99 |
|
---|
100 | Checking BENDING ANGLE AD FASCOD_SAW
|
---|
101 | norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 = 8.828 8.828 1.0000000 -0.49963E-09
|
---|
102 | ****************************
|
---|
103 | ********** PASS **********
|
---|
104 | ****************************
|
---|
105 |
|
---|