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