/[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.32 - (show annotations) (download)
Thu Oct 2 22:26:17 2014 UTC (9 years, 8 months ago) by gforget
Branch: MAIN
Changes since 1.31: +13 -17 lines
- ecco.h, ecco_readparms.F, cost_generic.F, cost_gencost_all.F, cost_hyd.F :
  added run time params and/or passed as arguments : gencost_posproc,
  gencost_scalefile, gencost_nrecperiod, gencost_outputlevel.
- cost_generic.F, cost_genread.F :
   added preproc code ('climmon ') to replace GENERIC_BAR_MONTH
- cost_genread.F : fix array dimension
- ecco_cost_init_fixed.F : re-activate ecco_summary
- ecco_summary.F : report gencost variables

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

  ViewVC Help
Powered by ViewVC 1.1.22