1 |
C $Header: /u/gcmpack/MITgcm/verification/lab_sea/code_ad_seaice_only/cost_hyd.F,v 1.1 2005/09/10 14:17:07 heimbach Exp $ |
2 |
|
3 |
#include "COST_CPPOPTIONS.h" |
4 |
|
5 |
|
6 |
subroutine cost_hyd( myiter, mytime, mythid ) |
7 |
|
8 |
c ================================================================== |
9 |
c SUBROUTINE cost_hyd |
10 |
c ================================================================== |
11 |
c |
12 |
c o Evaluate cost function contributions of temperature, salt, and |
13 |
c sea surface temperature contributions. |
14 |
c |
15 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
16 |
c |
17 |
c changed: Christian Eckert eckert@mit.edu 25-Feb-2000 |
18 |
c |
19 |
c - Restructured the code in order to create a package |
20 |
c for the MITgcmUV. |
21 |
c |
22 |
c ================================================================== |
23 |
c SUBROUTINE cost_hyd |
24 |
c ================================================================== |
25 |
|
26 |
implicit none |
27 |
|
28 |
c == global variables == |
29 |
#include "EEPARAMS.h" |
30 |
#include "SIZE.h" |
31 |
#include "PARAMS.h" |
32 |
#include "GRID.h" |
33 |
|
34 |
#include "cal.h" |
35 |
#include "ctrl.h" |
36 |
#include "ctrl_dummy.h" |
37 |
#include "ecco_cost.h" |
38 |
|
39 |
c == routine arguments == |
40 |
|
41 |
integer myiter |
42 |
_RL mytime |
43 |
integer mythid |
44 |
|
45 |
c == local variables == |
46 |
character*(max_len_mbuf) msgbuf |
47 |
|
48 |
integer nnzbar |
49 |
integer nnzobs |
50 |
_RL spminloc |
51 |
_RL spmaxloc |
52 |
_RL spzeroloc |
53 |
_RL localperiod |
54 |
|
55 |
c == end of interface == |
56 |
|
57 |
|
58 |
#ifdef ALLOW_SST_COST_CONTRIBUTION |
59 |
write(msgbuf,'(a)') 'ph-cost call cost_sst' |
60 |
call print_message( msgbuf, standardmessageunit, |
61 |
& SQUEEZE_RIGHT , mythid) |
62 |
nnzbar = nnztbar |
63 |
nnzobs = 1 |
64 |
cph( |
65 |
spminloc = -2.5 |
66 |
spmaxloc = 40. |
67 |
spzeroloc = 0. |
68 |
localperiod = 0. |
69 |
cph) |
70 |
call cost_generic( |
71 |
& nnzbar, tbarfile, tbar, xx_tbar_mean_dummy, |
72 |
& nnzobs, sstdatfile, sstdat, mult_sst, |
73 |
& nmonsrec, modelstartdate, localperiod, |
74 |
& maskC, wsst, |
75 |
& spminloc, spmaxloc, spzeroloc, |
76 |
& objf_sst, num_sst, |
77 |
& myiter, mytime, mythid ) |
78 |
cph call cost_sst ( myiter, mytime, mythid ) |
79 |
#endif |
80 |
|
81 |
#ifdef ALLOW_ARGO_THETA_COST_CONTRIBUTION |
82 |
write(msgbuf,'(a)') 'ph-cost call cost_argo_theta' |
83 |
call print_message( msgbuf, standardmessageunit, |
84 |
& SQUEEZE_RIGHT , mythid) |
85 |
call cost_argo_theta ( myiter, mytime, mythid ) |
86 |
#endif |
87 |
|
88 |
#ifdef ALLOW_CTDT_COST_CONTRIBUTION |
89 |
write(msgbuf,'(a)') 'ph-cost call cost_ctdt' |
90 |
call print_message( msgbuf, standardmessageunit, |
91 |
& SQUEEZE_RIGHT , mythid) |
92 |
call cost_ctdt ( myiter, mytime, mythid ) |
93 |
#endif |
94 |
|
95 |
#ifdef ALLOW_XBT_COST_CONTRIBUTION |
96 |
write(msgbuf,'(a)') 'ph-cost call cost_xbt' |
97 |
call print_message( msgbuf, standardmessageunit, |
98 |
& SQUEEZE_RIGHT , mythid) |
99 |
call cost_xbt ( myiter, mytime, mythid ) |
100 |
#endif |
101 |
|
102 |
#ifdef ALLOW_TMI_SST_COST_CONTRIBUTION |
103 |
write(msgbuf,'(a)') 'ph-cost call cost_tmi' |
104 |
call print_message( msgbuf, standardmessageunit, |
105 |
& SQUEEZE_RIGHT , mythid) |
106 |
nnzbar = nnztbar |
107 |
nnzobs = 1 |
108 |
spminloc = -1.8 |
109 |
spmaxloc = 40. |
110 |
spzeroloc = 0. |
111 |
localperiod = 0. |
112 |
call cost_generic( |
113 |
& nnzbar, tbarfile, tbar, xx_tbar_mean_dummy, |
114 |
& nnzobs, tmidatfile, tmidat, mult_tmi, |
115 |
& nmonsrec, tmistartdate, localperiod, |
116 |
& maskC, wsst, |
117 |
& spminloc, spmaxloc, spzeroloc, |
118 |
& objf_tmi, num_tmi, |
119 |
& myiter, mytime, mythid ) |
120 |
cph call cost_tmi( myiter, mytime, mythid ) |
121 |
#endif |
122 |
|
123 |
#ifdef ALLOW_SSS_COST_CONTRIBUTION |
124 |
write(msgbuf,'(a)') 'ph-cost call cost_sss' |
125 |
call print_message( msgbuf, standardmessageunit, |
126 |
& SQUEEZE_RIGHT , mythid) |
127 |
nnzbar = nnzsbar |
128 |
nnzobs = 1 |
129 |
spminloc = 20. |
130 |
spmaxloc = 40. |
131 |
spzeroloc = 0. |
132 |
localperiod = 0. |
133 |
call cost_generic( |
134 |
& nnzbar, sbarfile, sbar, xx_sbar_mean_dummy, |
135 |
& nnzobs, sssdatfile, sssdat, mult_sss, |
136 |
& nmonsrec, modelstartdate, localperiod, |
137 |
& maskC, wsss, |
138 |
& spminloc, spmaxloc, spzeroloc, |
139 |
& objf_sss, num_sss, |
140 |
& myiter, mytime, mythid ) |
141 |
cph call cost_sss ( myiter, mytime, mythid ) |
142 |
#endif |
143 |
|
144 |
#ifdef ALLOW_CTDS_COST_CONTRIBUTION |
145 |
write(msgbuf,'(a)') 'ph-cost call cost_ctds' |
146 |
call print_message( msgbuf, standardmessageunit, |
147 |
& SQUEEZE_RIGHT , mythid) |
148 |
call cost_ctds ( myiter, mytime, mythid ) |
149 |
#endif |
150 |
|
151 |
#ifdef ALLOW_ARGO_SALT_COST_CONTRIBUTION |
152 |
write(msgbuf,'(a)') 'ph-cost call cost_argo_salt' |
153 |
call print_message( msgbuf, standardmessageunit, |
154 |
& SQUEEZE_RIGHT , mythid) |
155 |
call cost_argo_salt ( myiter, mytime, mythid ) |
156 |
#endif |
157 |
|
158 |
#ifdef ALLOW_THETA0_COST_CONTRIBUTION |
159 |
write(msgbuf,'(a)') 'ph-cost call cost_theta0' |
160 |
call print_message( msgbuf, standardmessageunit, |
161 |
& SQUEEZE_RIGHT , mythid) |
162 |
call cost_theta0 ( myiter, mytime, mythid ) |
163 |
#endif |
164 |
|
165 |
#ifdef ALLOW_SALT0_COST_CONTRIBUTION |
166 |
write(msgbuf,'(a)') 'ph-cost call cost_salt0' |
167 |
call print_message( msgbuf, standardmessageunit, |
168 |
& SQUEEZE_RIGHT , mythid) |
169 |
call cost_salt0 ( myiter, mytime, mythid ) |
170 |
#endif |
171 |
|
172 |
#ifdef ALLOW_THETA_COST_CONTRIBUTION |
173 |
write(msgbuf,'(a)') 'ph-cost call cost_theta' |
174 |
call print_message( msgbuf, standardmessageunit, |
175 |
& SQUEEZE_RIGHT , mythid) |
176 |
call cost_theta ( myiter, mytime, mythid ) |
177 |
#endif |
178 |
|
179 |
#ifdef ALLOW_SALT_COST_CONTRIBUTION |
180 |
write(msgbuf,'(a)') 'ph-cost call cost_salt' |
181 |
call print_message( msgbuf, standardmessageunit, |
182 |
& SQUEEZE_RIGHT , mythid) |
183 |
call cost_salt ( myiter, mytime, mythid ) |
184 |
#endif |
185 |
|
186 |
end |