/[MITgcm]/MITgcm/pkg/ecco/cost_hyd.F
ViewVC logotype

Contents of /MITgcm/pkg/ecco/cost_hyd.F

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


Revision 1.15 - (show annotations) (download)
Wed May 13 19:27:20 2009 UTC (15 years ago) by zhc
Branch: MAIN
CVS Tags: checkpoint61o, checkpoint61p
Changes since 1.14: +3 -3 lines
daily sst

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_hyd.F,v 1.14 2009/05/13 13:39:38 heimbach Exp $
2 C $Name: $
3
4 #include "COST_CPPOPTIONS.h"
5
6
7 subroutine cost_hyd( myiter, mytime, mythid )
8
9 c ==================================================================
10 c SUBROUTINE cost_hyd
11 c ==================================================================
12 c
13 c o Evaluate cost function contributions of temperature, salt, and
14 c sea surface temperature contributions.
15 c
16 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
17 c
18 c changed: Christian Eckert eckert@mit.edu 25-Feb-2000
19 c
20 c - Restructured the code in order to create a package
21 c for the MITgcmUV.
22 c
23 c ==================================================================
24 c SUBROUTINE cost_hyd
25 c ==================================================================
26
27 implicit none
28
29 c == global variables ==
30 #include "EEPARAMS.h"
31 #include "SIZE.h"
32 #include "PARAMS.h"
33 #include "GRID.h"
34
35 #include "cal.h"
36 #include "ctrl.h"
37 #include "ctrl_dummy.h"
38 #include "ecco_cost.h"
39 #ifdef ALLOW_SEAICE
40 # include "SEAICE_COST.h"
41 #endif
42
43 c == routine arguments ==
44
45 integer myiter
46 _RL mytime
47 integer mythid
48
49 c == local variables ==
50 character*(max_len_mbuf) msgbuf
51
52 integer nnzbar
53 integer nnzobs
54 integer nrecloc
55 _RL spminloc
56 _RL spmaxloc
57 _RL spzeroloc
58 _RL localperiod
59
60 c == end of interface ==
61
62
63 #if (defined (ALLOW_SST_COST_CONTRIBUTION))
64 write(msgbuf,'(a)') 'ph-cost call cost_sst'
65 call print_message( msgbuf, standardmessageunit,
66 & SQUEEZE_RIGHT , mythid)
67 nnzbar = nnztbar
68 nnzobs = 1
69 spminloc = -1.8
70 spmaxloc = 40.
71 spzeroloc = 0.
72 localperiod = 0.
73 call cost_generic(
74 & nnzbar, tbarfile, tbar, xx_tbar_mean_dummy,
75 & nnzobs, sstdatfile, sstdat, mult_sst,
76 & nmonsrec, modelstartdate, localperiod,
77 & maskC, wsst,
78 & spminloc, spmaxloc, spzeroloc,
79 & objf_sst, num_sst,
80 & myiter, mytime, mythid )
81 c
82 #elif (defined (ALLOW_DAILYSST_COST_CONTRIBUTION))
83 c
84 write(msgbuf,'(a)') 'ph-cost call cost_sst'
85 call print_message( msgbuf, standardmessageunit,
86 & SQUEEZE_RIGHT , mythid)
87 nnzbar = nnztbar
88 nnzobs = 1
89 nrecloc = ndaysrec
90 spminloc = -2.
91 spmaxloc = 40.
92 spzeroloc = 0.
93 localperiod = 86400.
94 call cost_generic(
95 & nnzbar, sstbarfile, sstbar, xx_sstbar_mean_dummy,
96 & nnzobs, sstdatfile, sstdat, mult_sst,
97 & nrecloc, modelstartdate, localperiod,
98 & maskC, wsst,
99 & spminloc, spmaxloc, spzeroloc,
100 & objf_sst, num_sst,
101 & myiter, mytime, mythid )
102 cph call cost_sst ( myiter, mytime, mythid )
103 #endif
104
105 #ifdef ALLOW_BP_COST_CONTRIBUTION
106 write(msgbuf,'(a)') 'ph-cost call cost_bp'
107 call print_message( msgbuf, standardmessageunit,
108 & SQUEEZE_RIGHT , mythid)
109 nnzbar = nnztbar
110 nnzobs = 1
111 spminloc = ???
112 spmaxloc = ???
113 spzeroloc = 0.
114 localperiod = 0.
115 call cost_generic(
116 & nnzbar, bpbarfile, bpbar, xx_bpbar_mean_dummy,
117 & nnzobs, bpdatfile, bpdat, mult_bp,
118 & nmonsrec, modelstartdate, localperiod,
119 & maskC, wbp,
120 & spminloc, spmaxloc, spzeroloc,
121 & objf_bp, num_bp,
122 & myiter, mytime, mythid )
123 #endif
124
125 #ifdef ALLOW_ARGO_THETA_COST_CONTRIBUTION
126 write(msgbuf,'(a)') 'ph-cost call cost_argo_theta'
127 call print_message( msgbuf, standardmessageunit,
128 & SQUEEZE_RIGHT , mythid)
129 call cost_argo_theta ( myiter, mytime, mythid )
130 #endif
131
132 #ifdef ALLOW_CTDT_COST_CONTRIBUTION
133 write(msgbuf,'(a)') 'ph-cost call cost_ctdt'
134 call print_message( msgbuf, standardmessageunit,
135 & SQUEEZE_RIGHT , mythid)
136 call cost_ctdt ( myiter, mytime, mythid )
137 #endif
138
139 #ifdef ALLOW_XBT_COST_CONTRIBUTION
140 write(msgbuf,'(a)') 'ph-cost call cost_xbt'
141 call print_message( msgbuf, standardmessageunit,
142 & SQUEEZE_RIGHT , mythid)
143 call cost_xbt ( myiter, mytime, mythid )
144 #endif
145
146 #ifdef ALLOW_TMI_SST_COST_CONTRIBUTION
147 write(msgbuf,'(a)') 'ph-cost call cost_tmi'
148 call print_message( msgbuf, standardmessageunit,
149 & SQUEEZE_RIGHT , mythid)
150 nnzbar = nnztbar
151 nnzobs = 1
152 spminloc = -1.8
153 spmaxloc = 40.
154 spzeroloc = 0.
155 localperiod = 0.
156 call cost_generic(
157 & nnzbar, tbarfile, tbar, xx_tbar_mean_dummy,
158 & nnzobs, tmidatfile, tmidat, mult_tmi,
159 & nmonsrec, tmistartdate, localperiod,
160 & maskC, wsst,
161 & spminloc, spmaxloc, spzeroloc,
162 & objf_tmi, num_tmi,
163 & myiter, mytime, mythid )
164 cph call cost_tmi( myiter, mytime, mythid )
165 #endif
166
167 #ifdef ALLOW_SSS_COST_CONTRIBUTION
168 write(msgbuf,'(a)') 'ph-cost call cost_sss'
169 call print_message( msgbuf, standardmessageunit,
170 & SQUEEZE_RIGHT , mythid)
171 nnzbar = nnzsbar
172 nnzobs = 1
173 spminloc = 20.
174 spmaxloc = 40.
175 spzeroloc = 0.
176 localperiod = 0.
177 call cost_generic(
178 & nnzbar, sbarfile, sbar, xx_sbar_mean_dummy,
179 & nnzobs, sssdatfile, sssdat, mult_sss,
180 & nmonsrec, modelstartdate, localperiod,
181 & maskC, wsss,
182 & spminloc, spmaxloc, spzeroloc,
183 & objf_sss, num_sss,
184 & myiter, mytime, mythid )
185 cph call cost_sss ( myiter, mytime, mythid )
186 #endif
187
188 #ifdef ALLOW_CTDS_COST_CONTRIBUTION
189 write(msgbuf,'(a)') 'ph-cost call cost_ctds'
190 call print_message( msgbuf, standardmessageunit,
191 & SQUEEZE_RIGHT , mythid)
192 call cost_ctds ( myiter, mytime, mythid )
193 #endif
194
195 #ifdef ALLOW_ARGO_SALT_COST_CONTRIBUTION
196 write(msgbuf,'(a)') 'ph-cost call cost_argo_salt'
197 call print_message( msgbuf, standardmessageunit,
198 & SQUEEZE_RIGHT , mythid)
199 call cost_argo_salt ( myiter, mytime, mythid )
200 #endif
201
202 #ifdef ALLOW_THETA0_COST_CONTRIBUTION
203 write(msgbuf,'(a)') 'ph-cost call cost_theta0'
204 call print_message( msgbuf, standardmessageunit,
205 & SQUEEZE_RIGHT , mythid)
206 call cost_theta0 ( myiter, mytime, mythid )
207 #endif
208
209 #ifdef ALLOW_SALT0_COST_CONTRIBUTION
210 write(msgbuf,'(a)') 'ph-cost call cost_salt0'
211 call print_message( msgbuf, standardmessageunit,
212 & SQUEEZE_RIGHT , mythid)
213 call cost_salt0 ( myiter, mytime, mythid )
214 #endif
215
216 #ifdef ALLOW_THETA_COST_CONTRIBUTION
217 write(msgbuf,'(a)') 'ph-cost call cost_theta'
218 call print_message( msgbuf, standardmessageunit,
219 & SQUEEZE_RIGHT , mythid)
220 call cost_theta ( myiter, mytime, mythid )
221 #endif
222
223 #ifdef ALLOW_SALT_COST_CONTRIBUTION
224 write(msgbuf,'(a)') 'ph-cost call cost_salt'
225 call print_message( msgbuf, standardmessageunit,
226 & SQUEEZE_RIGHT , mythid)
227 call cost_salt ( myiter, mytime, mythid )
228 #endif
229
230 #ifdef ALLOW_TRANSPORT_COST_CONTRIBUTION
231 write(msgbuf,'(a)') 'ph-cost call cost_gen_transport'
232 call print_message( msgbuf, standardmessageunit,
233 & SQUEEZE_RIGHT , mythid)
234 call cost_gen_transport ( myiter, mytime, mythid )
235 #endif
236
237 #if (defined (ALLOW_PROFILES) && defined (ALLOW_PROFILES_CONTRIBUTION))
238 CALL cost_profiles( myiter, mytime, mythid)
239 #endif
240
241 #ifdef ALLOW_SEAICE_COST_SMR_AREA
242 # ifdef ALLOW_SEAICE_COST_AREASST
243
244 write(msgbuf,'(a)') 'ph-cost call seaice_cost_areasst'
245 call print_message( msgbuf, standardmessageunit,
246 & SQUEEZE_RIGHT , mythid)
247 nnzbar = 1
248 nnzobs = 1
249 nrecloc = ndaysrec
250 spminloc = 0.
251 spmaxloc = 1.
252 spzeroloc = -9999.
253 localperiod = 86400.
254 call seaice_cost_areasst(
255 & nnzbar, smrareabarfile, smrareabar, xx_smrareabar_mean_dummy,
256 & nnzobs, smrareadatfile, smrareadat, mult_smrarea,
257 & nrecloc, modelstartdate, localperiod,
258 & maskC, wsmrarea,
259 & spminloc, spmaxloc, spzeroloc,
260 & objf_smrarea, num_smrarea,
261 & myiter, mytime, mythid )
262
263 write(msgbuf,'(a,1P2E18.10)')
264 & 'ph-cost seaice_cost_areasst ',
265 & objf_smrarea(1,1), num_smrarea(1,1)
266 call print_message( msgbuf, standardmessageunit,
267 & SQUEEZE_RIGHT , mythid)
268
269 # endif /* ALLOW_SEAICE_COST_AREASST */
270 #endif
271
272 end

  ViewVC Help
Powered by ViewVC 1.1.22