1 |
|
2 |
#include "PACKAGES_CONFIG.h" |
3 |
|
4 |
c ================================================================== |
5 |
c HEADER COST |
6 |
c ================================================================== |
7 |
c |
8 |
c o Header for model-data comparison. |
9 |
c |
10 |
c The individual cost function contributions are multiplied by |
11 |
c factors mult_"var" which allow to switch off these contributions |
12 |
c without removing them in the adjoint code. This is useful for |
13 |
c doing tests with the adjoint and perhaps useful in assimilation |
14 |
c experiments where individual contributions are successively |
15 |
c switched on. For future applications it would be better to place |
16 |
c the initialisation of the multipliers somewhere else, for example |
17 |
c in a namelist, which is read in at the start of the model. |
18 |
c |
19 |
c started: Christian Eckert eckert@mit.edu 24-Feb-1999 |
20 |
c changed: Christian Eckert eckert@mit.edu |
21 |
c heimbach@mit.edu 05-Nov-2003 Modularize cost package |
22 |
c |
23 |
c ================================================================== |
24 |
c HEADER COST |
25 |
c ================================================================== |
26 |
|
27 |
|
28 |
c The cost function, its contributions, and multipliers: |
29 |
c ====================================================== |
30 |
c |
31 |
c fc - Final cost function. |
32 |
c mult_"var" - multipliers for the individual cost |
33 |
c function contributions. |
34 |
|
35 |
common /cost_r/ |
36 |
& fc |
37 |
_RL fc |
38 |
|
39 |
common /cost_objf/ |
40 |
& objf_atl, |
41 |
& objf_test, |
42 |
& objf_tracer, |
43 |
& objf_entropy, |
44 |
& objf_t_misfit, |
45 |
& objf_eflux |
46 |
|
47 |
_RL objf_atl (nsx,nsy) |
48 |
_RL objf_test (nsx,nsy) |
49 |
_RL objf_tracer (nsx,nsy) |
50 |
_RL objf_entropy (nsx,nsy) |
51 |
_RL objf_t_misfit (nsx,nsy) |
52 |
_RL objf_eflux (nsx,nsy) |
53 |
|
54 |
#ifdef ALLOW_COST_STATE_FINAL |
55 |
common /cost_state_final_r/ |
56 |
& objf_state_final |
57 |
_RL objf_state_final (snx,sny,nsx,nsy) |
58 |
cph _RL objf_state_final (snx,sny,nr,nsx,nsy,2) |
59 |
#endif |
60 |
|
61 |
#ifdef ALLOW_COST_VECTOR |
62 |
common /cost_vector_r/ |
63 |
& objf_vector |
64 |
_RL objf_vector (snx,nsx,nsy) |
65 |
#endif |
66 |
|
67 |
common /cost_aux_r/ |
68 |
& mult_atl, |
69 |
& mult_test, |
70 |
& mult_tracer, |
71 |
& mult_entropy, |
72 |
& mult_t_misfit, |
73 |
& mult_eflux |
74 |
|
75 |
_RL mult_atl |
76 |
_RL mult_test |
77 |
_RL mult_tracer |
78 |
_RL mult_entropy |
79 |
_RL mult_t_misfit |
80 |
_RL mult_eflux |
81 |
|
82 |
#ifdef ALLOW_COST_TEST |
83 |
common /cost_test_i/ |
84 |
& iLocOut |
85 |
& , jLocOut |
86 |
& , kLocOut |
87 |
integer iLocOut |
88 |
integer jLocOut |
89 |
integer kLocOut |
90 |
#endif |
91 |
|
92 |
c ================================================================== |
93 |
c END OF HEADER COST |
94 |
c ================================================================== |
95 |
|
96 |
|