/[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.20 - (show annotations) (download)
Sat Feb 6 11:30:16 2010 UTC (14 years, 4 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62t
Changes since 1.19: +5 -5 lines
More code for GENCOST.

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_hyd.F,v 1.19 2010/02/06 02:43:03 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, mult_sst,
76 & nmonsrec, modelstartdate, localperiod,
77 & 'C', 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 = 1
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, mult_sst,
97 & nrecloc, modelstartdate, localperiod,
98 & 'C', 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_ARGO_THETA_COST_CONTRIBUTION
106 write(msgbuf,'(a)') 'ph-cost call cost_argo_theta'
107 call print_message( msgbuf, standardmessageunit,
108 & SQUEEZE_RIGHT , mythid)
109 call cost_argo_theta ( myiter, mytime, mythid )
110 #endif
111
112 #ifdef ALLOW_CTDT_COST_CONTRIBUTION
113 write(msgbuf,'(a)') 'ph-cost call cost_ctdt'
114 call print_message( msgbuf, standardmessageunit,
115 & SQUEEZE_RIGHT , mythid)
116 call cost_ctdt ( myiter, mytime, mythid )
117 #endif
118
119 #ifdef ALLOW_XBT_COST_CONTRIBUTION
120 write(msgbuf,'(a)') 'ph-cost call cost_xbt'
121 call print_message( msgbuf, standardmessageunit,
122 & SQUEEZE_RIGHT , mythid)
123 call cost_xbt ( myiter, mytime, mythid )
124 #endif
125
126 #ifdef ALLOW_TMI_SST_COST_CONTRIBUTION
127 write(msgbuf,'(a)') 'ph-cost call cost_tmi'
128 call print_message( msgbuf, standardmessageunit,
129 & SQUEEZE_RIGHT , mythid)
130 nnzbar = nnztbar
131 nnzobs = 1
132 spminloc = -1.8
133 spmaxloc = 40.
134 spzeroloc = 0.
135 localperiod = 0.
136 call cost_generic(
137 & nnzbar, tbarfile, tbar, xx_tbar_mean_dummy,
138 & nnzobs, tmidatfile, mult_tmi,
139 & nmonsrec, tmistartdate, localperiod,
140 & 'C', wsst,
141 & spminloc, spmaxloc, spzeroloc,
142 & objf_tmi, num_tmi,
143 & myiter, mytime, mythid )
144 cph call cost_tmi( myiter, mytime, mythid )
145 #endif
146
147 #ifdef ALLOW_SSS_COST_CONTRIBUTION
148 write(msgbuf,'(a)') 'ph-cost call cost_sss'
149 call print_message( msgbuf, standardmessageunit,
150 & SQUEEZE_RIGHT , mythid)
151 nnzbar = nnzsbar
152 nnzobs = 1
153 spminloc = 20.
154 spmaxloc = 40.
155 spzeroloc = 0.
156 localperiod = 0.
157 call cost_generic(
158 & nnzbar, sbarfile, sbar, xx_sbar_mean_dummy,
159 & nnzobs, sssdatfile, mult_sss,
160 & nmonsrec, modelstartdate, localperiod,
161 & 'C', wsss,
162 & spminloc, spmaxloc, spzeroloc,
163 & objf_sss, num_sss,
164 & myiter, mytime, mythid )
165 cph call cost_sss ( myiter, mytime, mythid )
166 #endif
167
168 #ifdef ALLOW_CTDS_COST_CONTRIBUTION
169 write(msgbuf,'(a)') 'ph-cost call cost_ctds'
170 call print_message( msgbuf, standardmessageunit,
171 & SQUEEZE_RIGHT , mythid)
172 call cost_ctds ( myiter, mytime, mythid )
173 #endif
174
175 #ifdef ALLOW_ARGO_SALT_COST_CONTRIBUTION
176 write(msgbuf,'(a)') 'ph-cost call cost_argo_salt'
177 call print_message( msgbuf, standardmessageunit,
178 & SQUEEZE_RIGHT , mythid)
179 call cost_argo_salt ( myiter, mytime, mythid )
180 #endif
181
182 #ifdef ALLOW_THETA0_COST_CONTRIBUTION
183 write(msgbuf,'(a)') 'ph-cost call cost_theta0'
184 call print_message( msgbuf, standardmessageunit,
185 & SQUEEZE_RIGHT , mythid)
186 call cost_theta0 ( myiter, mytime, mythid )
187 #endif
188
189 #ifdef ALLOW_SALT0_COST_CONTRIBUTION
190 write(msgbuf,'(a)') 'ph-cost call cost_salt0'
191 call print_message( msgbuf, standardmessageunit,
192 & SQUEEZE_RIGHT , mythid)
193 call cost_salt0 ( myiter, mytime, mythid )
194 #endif
195
196 #ifdef ALLOW_THETA_COST_CONTRIBUTION
197 write(msgbuf,'(a)') 'ph-cost call cost_theta'
198 call print_message( msgbuf, standardmessageunit,
199 & SQUEEZE_RIGHT , mythid)
200 call cost_theta ( myiter, mytime, mythid )
201 #endif
202
203 #ifdef ALLOW_SALT_COST_CONTRIBUTION
204 write(msgbuf,'(a)') 'ph-cost call cost_salt'
205 call print_message( msgbuf, standardmessageunit,
206 & SQUEEZE_RIGHT , mythid)
207 call cost_salt ( myiter, mytime, mythid )
208 #endif
209
210 #ifdef ALLOW_TRANSPORT_COST_CONTRIBUTION
211 write(msgbuf,'(a)') 'ph-cost call cost_gen_transport'
212 call print_message( msgbuf, standardmessageunit,
213 & SQUEEZE_RIGHT , mythid)
214 call cost_gen_transport ( myiter, mytime, mythid )
215 #endif
216
217 #if (defined (ALLOW_PROFILES) && defined (ALLOW_PROFILES_CONTRIBUTION))
218 CALL cost_profiles( myiter, mytime, mythid)
219 #endif
220
221 #ifdef ALLOW_SEAICE_COST_SMR_AREA
222 # ifdef ALLOW_SEAICE_COST_AREASST
223 cph this block out of date;
224 cph similar call moved to seaice_cost_driver and
225 cph and extended using I. Fenty SST, SSS extensions
226
227 write(msgbuf,'(a)') 'ph-cost call seaice_cost_areasst'
228 call print_message( msgbuf, standardmessageunit,
229 & SQUEEZE_RIGHT , mythid)
230 nnzbar = 1
231 nnzobs = 1
232 nrecloc = ndaysrec
233 spminloc = 0.
234 spmaxloc = 1.
235 spzeroloc = -9999.
236 localperiod = 86400.
237 call seaice_cost_areasst(
238 & nnzbar, smrareabarfile, smrareabar, xx_smrareabar_mean_dummy,
239 & nnzobs, smrareadatfile, smrareadat, mult_smrarea,
240 & nrecloc, modelstartdate, localperiod,
241 & maskC, wsmrarea,
242 & spminloc, spmaxloc, spzeroloc,
243 & objf_smrarea, num_smrarea,
244 & myiter, mytime, mythid )
245
246 write(msgbuf,'(a,1P2E18.10)')
247 & 'ph-cost seaice_cost_areasst ',
248 & objf_smrarea(1,1), num_smrarea(1,1)
249 call print_message( msgbuf, standardmessageunit,
250 & SQUEEZE_RIGHT , mythid)
251
252 # endif /* ALLOW_SEAICE_COST_AREASST */
253 #endif
254
255 end

  ViewVC Help
Powered by ViewVC 1.1.22