/[MITgcm]/MITgcm/pkg/cost/cost.h
ViewVC logotype

Contents of /MITgcm/pkg/cost/cost.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.17 - (show annotations) (download)
Fri Aug 10 22:57:20 2012 UTC (11 years, 10 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint64, checkpoint63r, checkpoint63s, checkpoint64p, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f
Changes since 1.16: +4 -2 lines
File MIME type: text/plain
- add global mean contributions (via the newly added
  objfc) to fc after the cost_final.F global sum.

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost.h,v 1.16 2008/01/17 20:53:08 dfer Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5
6 c ==================================================================
7 c HEADER COST
8 c ==================================================================
9 c
10 c o Header for model-data comparison.
11 c
12 c The individual cost function contributions are multiplied by
13 c factors mult_"var" which allow to switch off these contributions
14 c without removing them in the adjoint code. This is useful for
15 c doing tests with the adjoint and perhaps useful in assimilation
16 c experiments where individual contributions are successively
17 c switched on. For future applications it would be better to place
18 c the initialisation of the multipliers somewhere else, for example
19 c in a namelist, which is read in at the start of the model.
20 c
21 c started: Christian Eckert eckert@mit.edu 24-Feb-1999
22 c changed: Christian Eckert eckert@mit.edu
23 c heimbach@mit.edu 05-Nov-2003 Modularize cost package
24 c
25 c ==================================================================
26 c HEADER COST
27 c ==================================================================
28
29
30 c The cost function, its contributions, and multipliers:
31 c ======================================================
32 c
33 c fc - Final cost function.
34 c glofc - contributions from global mean constraints
35 c mult_"var" - multipliers for the individual cost
36 c function contributions.
37
38 common /cost_r/
39 & fc, glofc
40 _RL fc
41 _RL glofc
42
43 common /cost_objf/
44 & objf_atl,
45 & objf_test,
46 & objf_tracer,
47 & objf_entropy,
48 & objf_t_misfit,
49 #ifdef ALLOW_COST_TRANSPORT
50 & objf_transport,
51 #endif
52 #ifdef ALLOW_COST_DEPTH
53 & objf_depth,
54 #endif
55 & objf_eflux
56 cHFLUXM_CONTROL
57 & ,objf_hflux_tut
58 & ,objf_temp_tut
59 cHFLUXM_CONTROL
60
61 _RL objf_atl (nsx,nsy)
62 _RL objf_test (nsx,nsy)
63 _RL objf_tracer (nsx,nsy)
64 _RL objf_entropy (nsx,nsy)
65 _RL objf_t_misfit (nsx,nsy)
66 _RL objf_eflux (nsx,nsy)
67 #ifdef ALLOW_COST_TRANSPORT
68 _RL objf_transport (nsx,nsy)
69 #endif
70 #ifdef ALLOW_COST_DEPTH
71 _RL objf_depth (nsx,nsy)
72 #endif
73 cHFLUXM_CONTROL
74 _RL objf_hflux_tut (nsx,nsy)
75 _RL objf_temp_tut (nsx,nsy)
76 cHFLUXM_CONTROL
77
78 common /cost_param_r/
79 & lastinterval
80 _RL lastinterval
81
82 #ifdef ALLOW_COST_STATE_FINAL
83 common /cost_state_final_r/
84 & objf_state_final
85 cph _RL objf_state_final (snx,sny,nsx,nsy)
86 _RL objf_state_final (snx,sny,nsx,nsy,4*Nr+1)
87 #endif
88
89 #ifdef ALLOW_COST_VECTOR
90 common /cost_vector_r/
91 & objf_vector
92 _RL objf_vector (snx,nsx,nsy)
93 #endif
94
95 common /cost_aux_r/
96 & mult_atl,
97 & mult_test,
98 & mult_tracer,
99 & mult_entropy,
100 & mult_t_misfit,
101 & mult_eflux,
102 & multTheta,
103 & multSalt,
104 & multUvel,
105 & multVvel,
106 #ifdef ALLOW_COST_TRANSPORT
107 & mult_transport,
108 #endif
109 #ifdef ALLOW_COST_DEPTH
110 & mult_depth,
111 #endif
112 & multEtan
113 cHFLUXM_CONTROL
114 & ,mult_hflux_tut
115 & ,mult_temp_tut
116 cHFLUXM_CONTROL
117
118 _RL mult_atl
119 _RL mult_test
120 _RL mult_tracer
121 _RL mult_entropy
122 _RL mult_t_misfit
123 _RL mult_eflux
124 _RL multTheta
125 _RL multSalt
126 _RL multUvel
127 _RL multVvel
128 _RL multEtan
129 #ifdef ALLOW_COST_TRANSPORT
130 _RL mult_transport
131 #endif
132 #ifdef ALLOW_COST_DEPTH
133 _RL mult_depth
134 #endif
135 cHFLUXM_CONTROL
136 _RL mult_hflux_tut
137 _RL mult_temp_tut
138 cHFLUXM_CONTROL
139
140 #ifdef ALLOW_COST_TEST
141 common /cost_test_i/
142 & iLocOut
143 & , jLocOut
144 & , kLocOut
145 integer iLocOut
146 integer jLocOut
147 integer kLocOut
148 #endif
149
150 #ifdef ALLOW_COST
151 COMMON /COST_MEAN_R/
152 & cMeanTheta, cMeanUVel, cMeanVVel,
153 & cMeanThetaUVel, cMeanThetaVVel
154 _RL cMeanTheta(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
155 _RL cMeanUVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
156 _RL cMeanVVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
157 _RL cMeanThetaUVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
158 _RL cMeanThetaVVel(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
159 #endif
160
161 c ==================================================================
162 c END OF HEADER COST
163 c ==================================================================
164
165

  ViewVC Help
Powered by ViewVC 1.1.22