1 |
jmc |
1.1 |
Setup: |
2 |
|
|
----- |
3 |
|
|
|
4 |
|
|
The experiment is in verification/carbon/. |
5 |
|
|
The code/ directory has the extra and modified code to |
6 |
|
|
carry a passive tracer (variables: tr1, gTr1, gTr1Nm1). |
7 |
|
|
Additional mod's are in pkg/ctrl/ |
8 |
|
|
|
9 |
|
|
The tracer fields is initialised at the surface (ini_tr1.F) |
10 |
|
|
and then carried around by the flow field. |
11 |
|
|
The cost funciton is cost_tracer.F |
12 |
|
|
It basically accumulates all tracers reaching the surface, |
13 |
|
|
|
14 |
|
|
The controls so far are |
15 |
|
|
initial temp./salinity and surface fluxes, |
16 |
|
|
also initial tracer (tr1) distribution |
17 |
|
|
(see adjoint/makefile). |
18 |
|
|
|
19 |
|
|
I added the common block /adtr1/ to addummy_in_stepping |
20 |
|
|
to be able to monitor adtr1 in addition to adtheta, adsalt, ... |
21 |
|
|
|
22 |
|
|
The model picks up from a 400 year spinup. |
23 |
|
|
In a test phase it performs a 1 year forward/adjoint run |
24 |
|
|
(timestep is 1 day). |
25 |
|
|
dumpFreq is set to 30 days, yielding adjoint fields of |
26 |
|
|
theta, salt, uvel, vvel, tr1 |
27 |
|
|
gtnm1,gsnm1, gunm1, gvnm1, gtr1nm1 |
28 |
|
|
|
29 |
|
|
If you plot the adjoint fields, e.g. at initial timestep index 144000 |
30 |
|
|
you will see that: |
31 |
|
|
ADJtheta.0000144000.001.001.data |
32 |
|
|
ADJsalt |
33 |
|
|
ADJuvel |
34 |
|
|
ADJvvel |
35 |
|
|
have a checkerboard structure, whereas |
36 |
|
|
ADJtr1.0000144000.001.001.data |
37 |
|
|
seems to look ok. |
38 |
|
|
|
39 |
|
|
I had the checkerboard structure also for a simpler |
40 |
|
|
adjoint test case (see verification/vero/). |
41 |
|
|
This is basically a box setup, |
42 |
|
|
cost function is final temp. at one grid point. |
43 |
|
|
The checkerboard structure seems to disappear, if you |
44 |
|
|
set in "data" |
45 |
|
|
tAlpha = 0. |
46 |
|
|
and take a linear eqn. of state |
47 |
|
|
eosType='LINEAR' |