1 |
|
2 |
c ================================================================== |
3 |
c HEADER AVERAGES |
4 |
c ================================================================== |
5 |
c |
6 |
c o Header for averaged temperature, salinity, and surface pressure |
7 |
c fields and counters associated with the averaging. |
8 |
c |
9 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
10 |
c changed: Christian Eckert eckert@mit.edu 01-Mar-2000 |
11 |
c - Restructured the code in order to create a package |
12 |
c for the MITgcmUV. |
13 |
c added sea-ice term: menemenlis@jpl.nasa.gov 26-Feb-2003 |
14 |
c |
15 |
c ================================================================== |
16 |
c HEADER AVERAGES |
17 |
c ================================================================== |
18 |
|
19 |
c Averaging counters: |
20 |
c =================== |
21 |
c |
22 |
c sum1day - counter for the daily averaging |
23 |
c sum1mon - counter for the monthly averaging |
24 |
c dayrec - number of averaged surface pressure records. |
25 |
c monrec - number of averaged theta and salinity records. |
26 |
|
27 |
common /average_i/ |
28 |
& sum1day,sum1mon, |
29 |
& dayrec,monrec |
30 |
integer sum1day |
31 |
integer sum1mon |
32 |
integer dayrec |
33 |
integer monrec |
34 |
|
35 |
|
36 |
c Averaged Fields: |
37 |
c ================ |
38 |
c |
39 |
c tbar - contains the averaged temperature field after the call |
40 |
c to subroutine POST_MONTHLY. Before, it accumulates the |
41 |
c intantaneous temperatures. |
42 |
c sbar - contains the averaged salinity field after the call |
43 |
c to subroutine POST_MONTHLY. Before, it accumulates the |
44 |
c intantaneous salinities. |
45 |
c psbar - contains the averaged surface pressure field after the call |
46 |
c to subroutine POST_DAILY. Before, it accumulates the |
47 |
c intantaneous surface pressure field. |
48 |
c ubar - contains the averaged zonal velocity component for the |
49 |
c whole integration period. Before, it accumulates the |
50 |
c intantaneous field. |
51 |
c vbar - contains the averaged zonal velocity component for the |
52 |
c whole integration period. Before, it accumulates the |
53 |
c intantaneous field. |
54 |
c tauxbar - contains the averaged zonal velocity component for the |
55 |
c whole integration period. Before, it accumulates the |
56 |
c intantaneous field. |
57 |
c tauybar - contains the averaged zonal velocity component for the |
58 |
c whole integration period. Before, it accumulates the |
59 |
c intantaneous field. |
60 |
c hfluxbar - contains the averaged zonal velocity component for the |
61 |
c whole integration period. Before, it accumulates the |
62 |
c intantaneous field. |
63 |
c sfluxbar - contains the averaged zonal velocity component for the |
64 |
c whole integration period. Before, it accumulates the |
65 |
c intantaneous field. |
66 |
|
67 |
common /averages_r/ |
68 |
& tbar, |
69 |
& sbar, |
70 |
& psbar, |
71 |
& ubar, |
72 |
& vbar, |
73 |
& wbar, |
74 |
& tauxbar, |
75 |
& tauybar, |
76 |
& hfluxbar, |
77 |
& sfluxbar, |
78 |
& Slmean, |
79 |
& Tlmean, |
80 |
& wlmean, |
81 |
& Sfmean, |
82 |
& Tfmean, |
83 |
& wfmean, |
84 |
& sbar_gen, |
85 |
& tbar_gen |
86 |
|
87 |
#if (defined (ALLOW_THETA_COST_CONTRIBUTION) || \ |
88 |
defined (ALLOW_SST_COST_CONTRIBUTION) || \ |
89 |
defined (ALLOW_CTDT_COST_CONTRIBUTION) || \ |
90 |
defined (ALLOW_CTDTCLIM_COST_CONTRIBUTION) || \ |
91 |
defined (ALLOW_XBT_COST_CONTRIBUTION) || \ |
92 |
defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \ |
93 |
defined (ALLOW_OBCS_COST_CONTRIBUTION)) |
94 |
_RL tbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
95 |
#else |
96 |
_RL tbar |
97 |
#endif |
98 |
|
99 |
#if (defined (ALLOW_SALT_COST_CONTRIBUTION) || \ |
100 |
defined (ALLOW_SSS_COST_CONTRIBUTION) || \ |
101 |
defined (ALLOW_CTDS_COST_CONTRIBUTION) || \ |
102 |
defined (ALLOW_CTDSCLIM_COST_CONTRIBUTION) || \ |
103 |
defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \ |
104 |
defined (ALLOW_OBCS_COST_CONTRIBUTION)) |
105 |
_RL sbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
106 |
#else |
107 |
_RL sbar |
108 |
#endif |
109 |
|
110 |
#ifdef GENERIC_BAR_MONTH |
111 |
_RL tbar_gen (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
112 |
_RL sbar_gen (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
113 |
#else |
114 |
_RL tbar_gen |
115 |
_RL sbar_gen |
116 |
#endif |
117 |
|
118 |
#ifdef ALLOW_SSH_COST_CONTRIBUTION |
119 |
_RL psbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
120 |
#else |
121 |
_RL psbar |
122 |
#endif |
123 |
|
124 |
#if (defined (ALLOW_DRIFTER_COST_CONTRIBUTION) || \ |
125 |
defined (ALLOW_CURMTR_COST_CONTRIBUTION)) |
126 |
_RL ubar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
127 |
_RL vbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
128 |
#else |
129 |
_RL ubar |
130 |
_RL vbar |
131 |
#endif |
132 |
|
133 |
#ifdef ALLOW_DRIFTW_COST_CONTRIBUTION |
134 |
_RL wbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
135 |
#else |
136 |
_RL wbar |
137 |
#endif |
138 |
|
139 |
#ifdef ALLOW_DRIFT_COST_CONTRIBUTION |
140 |
_RL Tlmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
141 |
_RL Slmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
142 |
_RL Tfmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
143 |
_RL Sfmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
144 |
#else |
145 |
_RL Tlmean |
146 |
_RL Slmean |
147 |
_RL Tfmean |
148 |
_RL Sfmean |
149 |
#endif |
150 |
|
151 |
#ifdef ALLOW_DRIFTW_COST_CONTRIBUTION |
152 |
_RL wlmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
153 |
_RL wfmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
154 |
#else |
155 |
_RL wlmean |
156 |
_RL wfmean |
157 |
#endif |
158 |
|
159 |
#ifdef ALLOW_SCAT_COST_CONTRIBUTION |
160 |
_RL tauxbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
161 |
_RL tauybar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
162 |
#else |
163 |
_RL tauxbar |
164 |
_RL tauybar |
165 |
#endif |
166 |
|
167 |
#ifdef ALLOW_MEAN_HFLUX_COST_CONTRIBUTION |
168 |
_RL hfluxbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
169 |
#else |
170 |
_RL hfluxbar |
171 |
#endif |
172 |
|
173 |
#ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION |
174 |
_RL sfluxbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
175 |
#else |
176 |
_RL sfluxbar |
177 |
#endif |
178 |
|
179 |
|
180 |
common /averages_c/ |
181 |
& tbarfile, |
182 |
& sbarfile, |
183 |
& psbarfile, |
184 |
& ubarfile, |
185 |
& vbarfile, |
186 |
& wbarfile, |
187 |
& tauxbarfile, |
188 |
& tauybarfile, |
189 |
& hfluxbarfile, |
190 |
& sfluxbarfile |
191 |
character*(MAX_LEN_FNAM) tbarfile |
192 |
character*(MAX_LEN_FNAM) sbarfile |
193 |
character*(MAX_LEN_FNAM) psbarfile |
194 |
character*(MAX_LEN_FNAM) ubarfile |
195 |
character*(MAX_LEN_FNAM) vbarfile |
196 |
character*(MAX_LEN_FNAM) wbarfile |
197 |
character*(MAX_LEN_FNAM) tauxbarfile |
198 |
character*(MAX_LEN_FNAM) tauybarfile |
199 |
character*(MAX_LEN_FNAM) hfluxbarfile |
200 |
character*(MAX_LEN_FNAM) sfluxbarfile |
201 |
|
202 |
c file precision and field type |
203 |
|
204 |
common /prec_type_cost/ |
205 |
& cost_iprec, |
206 |
& cost_yftype |
207 |
|
208 |
integer cost_iprec |
209 |
character*(2) cost_yftype |
210 |
|
211 |
c ================================================================== |
212 |
c END OF HEADER AVERAGES |
213 |
c ================================================================== |
214 |
|
215 |
|
216 |
|
217 |
c ================================================================== |
218 |
c HEADER COST |
219 |
c ================================================================== |
220 |
c |
221 |
c o Header for model-data comparison. |
222 |
c |
223 |
c The individual cost function contributions are multiplied by |
224 |
c factors mult_"var" which allow to switch off these contributions |
225 |
c without removing them in the adjoint code. This is useful for |
226 |
c doing tests with the adjoint and perhaps useful in assimilation |
227 |
c experiments where individual contributions are successively |
228 |
c switched on. For future applications it would be better to place |
229 |
c the initialisation of the multipliers somewhere else, for example |
230 |
c in a namelist, which is read in at the start of the model. |
231 |
c |
232 |
c started: Christian Eckert eckert@mit.edu 24-Feb-1999 |
233 |
c |
234 |
c changed: Christian Eckert eckert@mit.edu |
235 |
c |
236 |
c |
237 |
c ================================================================== |
238 |
c HEADER COST |
239 |
c ================================================================== |
240 |
|
241 |
|
242 |
c The cost function, its contributions, and multipliers: |
243 |
c ====================================================== |
244 |
c |
245 |
c fc - Final cost function. |
246 |
c objf_hflux - Heat flux contribution. |
247 |
c objf_sflux - Salt flux contribution. |
248 |
c objf_tauu - Zonal wind stress contribution. |
249 |
c objf_tauv - Meridional wind stress contribution. |
250 |
c objf_hfluxm - time-mean Heat flux contribution. |
251 |
c objf_sfluxm - time-mean Salt flux contribution. |
252 |
c objf_tauum - time-mean Zonal wind stress contribution. |
253 |
c objf_tauvm - time-mean Meridional wind stress contribution. |
254 |
c objf_hfluxmm - Global time-mean Heat flux contribution. |
255 |
c objf_sfluxmm - Global time-mean Salt flux contribution. |
256 |
c objf_hmean - Mean sea surface height contribution. |
257 |
c objf_h - Residual sea surface height contribution. |
258 |
c objf_temp - Temperature contribution. |
259 |
c objf_salt - Salinity contribution. |
260 |
c objf_temp0 - Initial conditions Temperature contribution. |
261 |
c objf_salt0 - Initial conditions Salinity contribution. |
262 |
c objf_tmi - Sea surface temperature contribution. |
263 |
c objf_sst - Sea surface temperature contribution. |
264 |
c objf_sss - Sea surface salinity contribution. |
265 |
c objf_atl - Meridional heat transport in the N-Atlantic |
266 |
c objf_ctdt - Temperature measurements from Woce CTD |
267 |
c objf_ctds - Salinity measurements from Woce CTD |
268 |
c objf_ctdtclim - Temperature from Woce CTD without timetag |
269 |
c objf_ctdsclim - Salinity from Woce CTD without timetag |
270 |
c objf_xbt - XBT temperature data |
271 |
c objf_argot - ARGO temperature profiles |
272 |
c objf_argos - ARGO salt profiles |
273 |
c objf_scatxm - time-mean zonal SCAT contribution |
274 |
c objf_scatym - time-mean meridional SCAT contribution |
275 |
c objf_scatx - zonal SCAT contribution |
276 |
c objf_scaty - meridional SCAT contribution |
277 |
c objf_ice - sea-ice volume |
278 |
c objf_kapgm - kappa GM contribution |
279 |
c objf_diffkr - diffusion contribution |
280 |
c objf_theta_ini_fin - final vs. initial theta misfit |
281 |
c objf_salt_ini_fin - final vs. initial salt misfit |
282 |
c |
283 |
c mult_"var" - multipliers for the individual cost |
284 |
c function contributions. |
285 |
|
286 |
common /cost_r/ |
287 |
& fc, |
288 |
& objf_hflux, |
289 |
& objf_hfluxm, |
290 |
& objf_hfluxmm, |
291 |
& objf_sflux, |
292 |
& objf_sfluxm, |
293 |
& objf_sfluxmm, |
294 |
& objf_tauu, |
295 |
& objf_tauum, |
296 |
& objf_tauv, |
297 |
& objf_tauvm, |
298 |
& objf_hmean, |
299 |
& objf_h, |
300 |
& objf_temp, |
301 |
& objf_salt, |
302 |
& objf_temp0, |
303 |
& objf_salt0, |
304 |
& objf_tmi, |
305 |
& objf_sst, |
306 |
& objf_sss, |
307 |
& objf_atl, |
308 |
& objf_ctdt, |
309 |
& objf_ctds, |
310 |
& objf_ctdtclim, |
311 |
& objf_ctdsclim, |
312 |
& objf_xbt, |
313 |
& objf_argot, |
314 |
& objf_argos, |
315 |
& objf_drift, |
316 |
& objf_tdrift, |
317 |
& objf_sdrift, |
318 |
& objf_wdrift, |
319 |
& objf_scatx, |
320 |
& objf_scaty, |
321 |
& objf_scatxm, |
322 |
& objf_scatym, |
323 |
& objf_atemp, |
324 |
& objf_aqh, |
325 |
& objf_uwind, |
326 |
& objf_vwind, |
327 |
& objf_obcsn, |
328 |
& objf_obcss, |
329 |
& objf_obcsw, |
330 |
& objf_obcse, |
331 |
& objf_obcsvol, |
332 |
& objf_curmtr, |
333 |
& objf_ageos, |
334 |
& objf_ice, |
335 |
& objf_diffkr, |
336 |
& objf_theta_ini_fin, |
337 |
& objf_salt_ini_fin |
338 |
_RL fc |
339 |
_RL objf_hmean |
340 |
_RL objf_obcsvol |
341 |
_RL objf_hflux (nsx,nsy) |
342 |
_RL objf_hfluxm (nsx,nsy) |
343 |
_RL objf_hfluxmm(nsx,nsy) |
344 |
_RL objf_sflux (nsx,nsy) |
345 |
_RL objf_sfluxm (nsx,nsy) |
346 |
_RL objf_sfluxmm(nsx,nsy) |
347 |
_RL objf_tauu (nsx,nsy) |
348 |
_RL objf_tauum (nsx,nsy) |
349 |
_RL objf_tauv (nsx,nsy) |
350 |
_RL objf_tauvm (nsx,nsy) |
351 |
_RL objf_h (nsx,nsy) |
352 |
_RL objf_temp (nsx,nsy) |
353 |
_RL objf_salt (nsx,nsy) |
354 |
_RL objf_temp0(nsx,nsy) |
355 |
_RL objf_salt0(nsx,nsy) |
356 |
_RL objf_tmi (nsx,nsy) |
357 |
_RL objf_sst (nsx,nsy) |
358 |
_RL objf_sss (nsx,nsy) |
359 |
_RL objf_atl (nsx,nsy) |
360 |
_RL objf_ctdt (nsx,nsy) |
361 |
_RL objf_ctds (nsx,nsy) |
362 |
_RL objf_ctdtclim (nsx,nsy) |
363 |
_RL objf_ctdsclim (nsx,nsy) |
364 |
_RL objf_xbt (nsx,nsy) |
365 |
_RL objf_argot(nsx,nsy) |
366 |
_RL objf_argos(nsx,nsy) |
367 |
_RL objf_drift(nsx,nsy) |
368 |
_RL objf_tdrift(nsx,nsy) |
369 |
_RL objf_sdrift(nsx,nsy) |
370 |
_RL objf_wdrift(nsx,nsy) |
371 |
_RL objf_scatx(nsx,nsy) |
372 |
_RL objf_scaty(nsx,nsy) |
373 |
_RL objf_scatxm(nsx,nsy) |
374 |
_RL objf_scatym(nsx,nsy) |
375 |
_RL objf_atemp(nsx,nsy) |
376 |
_RL objf_aqh (nsx,nsy) |
377 |
_RL objf_uwind(nsx,nsy) |
378 |
_RL objf_vwind(nsx,nsy) |
379 |
_RL objf_obcsn(nsx,nsy) |
380 |
_RL objf_obcss(nsx,nsy) |
381 |
_RL objf_obcsw(nsx,nsy) |
382 |
_RL objf_obcse(nsx,nsy) |
383 |
_RL objf_curmtr(nsx,nsy) |
384 |
_RL objf_ageos(nsx,nsy) |
385 |
_RL objf_ice (nsx,nsy) |
386 |
_RL objf_kapgm(nsx,nsy) |
387 |
_RL objf_diffkr(nsx,nsy) |
388 |
_RL objf_theta_ini_fin(nsx,nsy) |
389 |
_RL objf_salt_ini_fin(nsx,nsy) |
390 |
|
391 |
common /cost_aux_r/ |
392 |
& mult_hflux, |
393 |
& mult_sflux, |
394 |
& mult_tauu, |
395 |
& mult_tauv, |
396 |
& mult_hmean, |
397 |
& mult_h, |
398 |
& mult_temp, |
399 |
& mult_salt, |
400 |
& mult_temp0, |
401 |
& mult_salt0, |
402 |
& mult_tmi, |
403 |
& mult_sst, |
404 |
& mult_sss, |
405 |
& mult_atl, |
406 |
& mult_ctdt, |
407 |
& mult_ctds, |
408 |
& mult_ctdtclim, |
409 |
& mult_ctdsclim, |
410 |
& mult_xbt, |
411 |
& mult_argot, |
412 |
& mult_argos, |
413 |
& mult_drift, |
414 |
& mult_tdrift, |
415 |
& mult_sdrift, |
416 |
& mult_wdrift, |
417 |
& mult_scatx, |
418 |
& mult_scaty, |
419 |
& mult_atemp, |
420 |
& mult_aqh, |
421 |
& mult_uwind, |
422 |
& mult_vwind, |
423 |
& mult_obcsn, |
424 |
& mult_obcss, |
425 |
& mult_obcsw, |
426 |
& mult_obcse, |
427 |
& mult_obcsvol, |
428 |
& mult_curmtr, |
429 |
& mult_ageos, |
430 |
& mult_ice, |
431 |
& mult_kapgm, |
432 |
& mult_diffkr, |
433 |
& mult_ini_fin |
434 |
_RL mult_hflux |
435 |
_RL mult_sflux |
436 |
_RL mult_tauu |
437 |
_RL mult_tauv |
438 |
_RL mult_hmean |
439 |
_RL mult_h |
440 |
_RL mult_temp |
441 |
_RL mult_salt |
442 |
_RL mult_temp0 |
443 |
_RL mult_salt0 |
444 |
_RL mult_tmi |
445 |
_RL mult_sst |
446 |
_RL mult_sss |
447 |
_RL mult_atl |
448 |
_RL mult_ctdt |
449 |
_RL mult_ctds |
450 |
_RL mult_ctdtclim |
451 |
_RL mult_ctdsclim |
452 |
_RL mult_xbt |
453 |
_RL mult_argot |
454 |
_RL mult_argos |
455 |
_RL mult_drift |
456 |
_RL mult_tdrift |
457 |
_RL mult_sdrift |
458 |
_RL mult_wdrift |
459 |
_RL mult_scatx |
460 |
_RL mult_scaty |
461 |
_RL mult_atemp |
462 |
_RL mult_aqh |
463 |
_RL mult_uwind |
464 |
_RL mult_vwind |
465 |
_RL mult_obcsn |
466 |
_RL mult_obcss |
467 |
_RL mult_obcsw |
468 |
_RL mult_obcse |
469 |
_RL mult_obcsvol |
470 |
_RL mult_curmtr |
471 |
_RL mult_ageos |
472 |
_RL mult_ice |
473 |
_RL mult_kapgm |
474 |
_RL mult_diffkr |
475 |
_RL mult_ini_fin |
476 |
|
477 |
|
478 |
c Record counters relevant for the cost function evaluation. |
479 |
c ========================================================== |
480 |
c |
481 |
c nmonsrec - number of monthly records that will be generated by |
482 |
c the current model integration. |
483 |
c ndaysrec - number of daily records that will be generated by |
484 |
c the current model integration. |
485 |
|
486 |
common /cost_i/ |
487 |
& nmonsrec, |
488 |
& ndaysrec |
489 |
integer nmonsrec |
490 |
integer ndaysrec |
491 |
|
492 |
|
493 |
c Data files for the weights used in the cost function: |
494 |
c ===================================================== |
495 |
c |
496 |
c hflux_errfile - heat flux error. |
497 |
c sflux_errfile - salt flux error. |
498 |
c tauu_errfile - zonal wind stress error. |
499 |
c tauum_errfile - zonal wind stress error. |
500 |
c tauv_errfile - meridional wind stress error. |
501 |
c tauvm_errfile - meridional wind stress error. |
502 |
c tscatx_errfile - zonal wind stress error. |
503 |
c tscaty_errfile - meridional wind stress error. |
504 |
c data_errfile - weights for theta, salt, and SST |
505 |
c geoid_errfile - geoid error. |
506 |
c geoid_covariancefile - geoid error covariance. |
507 |
c ssh_errfile - sea surface height error. |
508 |
c ctdt_errfile - CTD temperature error. |
509 |
c ctds_errfile - CTD salinity error. |
510 |
c drift_errfile - drifter error. |
511 |
c salterrfile - representation error due unresolved eddies |
512 |
c temperrfile - representation error due unresolved eddies |
513 |
c velerrfile - representation error |
514 |
|
515 |
common /cost_c/ |
516 |
& hflux_errfile, |
517 |
& hfluxm_errfile, |
518 |
& sflux_errfile, |
519 |
& sfluxm_errfile, |
520 |
& tauu_errfile, |
521 |
& tauum_errfile, |
522 |
& tauv_errfile, |
523 |
& tauvm_errfile, |
524 |
& scatx_errfile, |
525 |
& scaty_errfile, |
526 |
& data_errfile, |
527 |
& geoid_errfile, |
528 |
& geoid_covariancefile, |
529 |
& ssh_errfile, |
530 |
& ctdt_errfile, |
531 |
& ctds_errfile, |
532 |
& drift_errfile, |
533 |
& udrifterrfile, |
534 |
& vdrifterrfile, |
535 |
& salterrfile, |
536 |
& temperrfile, |
537 |
& velerrfile, |
538 |
& atemp_errfile, |
539 |
& aqh_errfile, |
540 |
& uwind_errfile, |
541 |
& vwind_errfile |
542 |
character*(MAX_LEN_FNAM) hflux_errfile |
543 |
character*(MAX_LEN_FNAM) sflux_errfile |
544 |
character*(MAX_LEN_FNAM) tauu_errfile |
545 |
character*(MAX_LEN_FNAM) tauv_errfile |
546 |
character*(MAX_LEN_FNAM) hfluxm_errfile |
547 |
character*(MAX_LEN_FNAM) sfluxm_errfile |
548 |
character*(MAX_LEN_FNAM) tauum_errfile |
549 |
character*(MAX_LEN_FNAM) tauvm_errfile |
550 |
character*(MAX_LEN_FNAM) scatx_errfile |
551 |
character*(MAX_LEN_FNAM) scaty_errfile |
552 |
character*(MAX_LEN_FNAM) data_errfile |
553 |
character*(MAX_LEN_FNAM) geoid_errfile |
554 |
character*(MAX_LEN_FNAM) geoid_covariancefile |
555 |
character*(MAX_LEN_FNAM) ssh_errfile |
556 |
character*(MAX_LEN_FNAM) ctdt_errfile |
557 |
character*(MAX_LEN_FNAM) ctds_errfile |
558 |
character*(MAX_LEN_FNAM) drift_errfile |
559 |
character*(MAX_LEN_FNAM) udrifterrfile |
560 |
character*(MAX_LEN_FNAM) vdrifterrfile |
561 |
character*(MAX_LEN_FNAM) salterrfile |
562 |
character*(MAX_LEN_FNAM) temperrfile |
563 |
character*(MAX_LEN_FNAM) velerrfile |
564 |
character*(MAX_LEN_FNAM) atemp_errfile |
565 |
character*(MAX_LEN_FNAM) aqh_errfile |
566 |
character*(MAX_LEN_FNAM) uwind_errfile |
567 |
character*(MAX_LEN_FNAM) vwind_errfile |
568 |
|
569 |
|
570 |
c Arrays where the weights are stored: |
571 |
c ==================================== |
572 |
c |
573 |
c cosphi - cosine of latitude. |
574 |
c whflux - weight for heat flux. |
575 |
c wsflux - weight for salt flux. |
576 |
c wtauu - weight for zonal wind stress. |
577 |
c wtauu - weight for meridional wind stress. |
578 |
c wscatx - weight for zonal scat stress. |
579 |
c wscaty - weight for meridional scat stress. |
580 |
c wtheta - weight for temperature. |
581 |
c wtheta2 - representation error due to unresolved eddies |
582 |
c wsst - weight for sea surface temperature. |
583 |
c wsss - weight for sea surface salinity. |
584 |
c wsalt - weight for salinity. |
585 |
c wsalt2 - representation error due to unresolved eddies |
586 |
c wtp - weight for TOPEX/POSEIDON data. |
587 |
c wers - weight for ERS data. |
588 |
c wp - weight for geoid. |
589 |
c wctdt - weight for CTD temperature. |
590 |
c wctds - weight for CTD salinity. |
591 |
c wudrift - weight for mean zonal velocity from drifters. |
592 |
c wvdrift - weight for mean meridional velocity from drifters. |
593 |
c wcurrent - weight for |
594 |
c wbaro - weight for barotropic velocity adjustments. |
595 |
|
596 |
common /cost_weights_r/ |
597 |
& frame, |
598 |
& cosphi, |
599 |
& whflux,wsflux,wtauu,wtauv, |
600 |
& watemp,waqh,wuwind,wvwind, |
601 |
& wscatx,wscaty, |
602 |
& wtheta,wtheta2,wthetaLev, |
603 |
& wsalt,wsalt2,wsaltLev, |
604 |
& wsst,wsss, |
605 |
& wtp,wers, |
606 |
& wp, |
607 |
& wctdt,wctds, |
608 |
& wudrift,wvdrift, |
609 |
& whfluxmm,wsfluxmm, |
610 |
& wcurrent,wcurrent2, |
611 |
& wcurrentLev,wbaro |
612 |
|
613 |
_RL frame (1-olx:snx+olx,1-oly:sny+oly ) |
614 |
_RL cosphi (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
615 |
_RL whflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
616 |
_RL whfluxm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
617 |
_RL whfluxmm(1-olx:snx+olx,1-oly:sny+oly) |
618 |
_RL wsflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
619 |
_RL wsfluxm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
620 |
_RL wsfluxmm(1-olx:snx+olx,1-oly:sny+oly) |
621 |
_RL wtauu (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
622 |
_RL wtauv (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
623 |
_RL wtauum (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
624 |
_RL wtauvm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
625 |
_RL wscatx (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
626 |
_RL wscaty (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
627 |
_RL watemp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
628 |
_RL waqh (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
629 |
_RL wuwind (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
630 |
_RL wvwind (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
631 |
_RL wtheta ( nr,nsx,nsy) |
632 |
_RL wsalt ( nr,nsx,nsy) |
633 |
_RL wtheta2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
634 |
_RL wsalt2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
635 |
_RL wthetaLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
636 |
_RL wsaltLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
637 |
_RL wsst (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
638 |
_RL wsss (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
639 |
_RL wtp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
640 |
_RL wers (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
641 |
_RL wp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
642 |
_RL wctdt ( nr,nsx,nsy) |
643 |
_RL wctds ( nr,nsx,nsy) |
644 |
_RL wudrift (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
645 |
_RL wvdrift (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
646 |
_RL wcurrent( nr,nsx,nsy) |
647 |
_RL wcurrent2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
648 |
_RL wcurrentLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
649 |
_RL wbaro |
650 |
|
651 |
#if (defined (ALLOW_OBCSN_COST_CONTRIBUTION) || \ |
652 |
defined (ALLOW_OBCSN_CONTROL)) |
653 |
common /cost_weights_obcsn/ |
654 |
& wobcsn, wobcsnLev |
655 |
_RL wobcsn ( nr,nobcs) |
656 |
_RL wobcsnLev (1-olx:snx+olx,nr,nsx,nsy,nobcs) |
657 |
#endif |
658 |
#if (defined (ALLOW_OBCSS_COST_CONTRIBUTION) || \ |
659 |
defined (ALLOW_OBCSS_CONTROL)) |
660 |
common /cost_weights_obcss/ |
661 |
& wobcss, wobcssLev |
662 |
_RL wobcss ( nr,nobcs) |
663 |
_RL wobcssLev (1-olx:snx+olx,nr,nsx,nsy,nobcs) |
664 |
#endif |
665 |
#if (defined (ALLOW_OBCSW_COST_CONTRIBUTION) || \ |
666 |
defined (ALLOW_OBCSW_CONTROL)) |
667 |
common /cost_weights_obcsw/ |
668 |
& wobcsw, wobcswLev |
669 |
_RL wobcsw ( nr,nobcs) |
670 |
_RL wobcswLev (1-oly:sny+oly,nr,nsx,nsy,nobcs) |
671 |
#endif |
672 |
#if (defined (ALLOW_OBCSE_COST_CONTRIBUTION) || \ |
673 |
defined (ALLOW_OBCSE_CONTROL)) |
674 |
common /cost_weights_obcse/ |
675 |
& wobcse, wobcseLev |
676 |
_RL wobcse ( nr,nobcs) |
677 |
_RL wobcseLev (1-oly:sny+oly,nr,nsx,nsy,nobcs) |
678 |
#endif |
679 |
|
680 |
c Arrays that contain observations for the model-data comparison: |
681 |
c =============================================================== |
682 |
c |
683 |
c tdat - reference temperature data. |
684 |
c scatxdat - reference zonal wind stress. |
685 |
c scatydat - reference meridional wind stress. |
686 |
c tmidat - reference TMI sea surface temperature data. |
687 |
c sstdat - reference sea surface temperature data. |
688 |
c sssdat - reference sea surface temperature data. |
689 |
c tauxmask - mask for reference wind stress data. |
690 |
c tauymask - mask for reference wind stress data. |
691 |
c scatxmask - mask for scat wind stress data. |
692 |
c scatymask - mask for scat wind stress data. |
693 |
c tmimask - mask for reference sea surface temperature data. |
694 |
c sstmask - mask for reference sea surface temperature data. |
695 |
c sssmask - mask for reference sea surface temperature data. |
696 |
c sdat - reference salinity data. |
697 |
c tpmean - reference mean sea surface height data. |
698 |
c tpmeanmask - mask for reference mean sea surface height data. |
699 |
c tpobs - TOPEX/POSEIDON data. |
700 |
c tpmask - mask for TOPEX/POSEIDON data. |
701 |
c ersobs - ERS data. |
702 |
c ersmask - mask for ERS data. |
703 |
c ctdtobs - CTD temperature data |
704 |
c ctdsobs - CTD salinity data |
705 |
c xbtobs - XBT data |
706 |
c argot - ARGO temperature data |
707 |
c argos - ARGO salt data |
708 |
c udriftdat - drifters zonal velocities |
709 |
c vdriftdat - drifters meridional velocities |
710 |
|
711 |
common /cost_data_r/ |
712 |
& tdat, |
713 |
& scatxdat, |
714 |
& scatydat, |
715 |
& tmidat, |
716 |
& sstdat, |
717 |
& sssdat, |
718 |
& tmimask, |
719 |
& sstmask, |
720 |
& sssmask, |
721 |
& tauxmask, |
722 |
& tauymask, |
723 |
& scatxmask, |
724 |
& scatymask, |
725 |
& sdat, |
726 |
& tpmean, |
727 |
& tpmeanmask, |
728 |
& tpobs, |
729 |
& tpmask, |
730 |
& ersobs, |
731 |
& ersmask, |
732 |
& ctdtobs, |
733 |
& ctdsobs, |
734 |
& xbtobs, |
735 |
& argotobs, |
736 |
& argosobs, |
737 |
& udriftdat, |
738 |
& vdriftdat, |
739 |
& curmtruobs, |
740 |
& curmtrvobs |
741 |
|
742 |
_RL tdat (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
743 |
_RL scatxdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
744 |
_RL scatydat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
745 |
_RL tmidat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
746 |
_RL sstdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
747 |
_RL sssdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
748 |
_RL tauxmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
749 |
_RL tauymask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
750 |
_RL scatxmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
751 |
_RL scatymask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
752 |
_RL tmimask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
753 |
_RL sstmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
754 |
_RL sssmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
755 |
_RL sdat (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
756 |
_RL tpmean (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
757 |
_RL tpmeanmask(1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
758 |
_RL tpobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
759 |
_RL tpmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
760 |
_RL ersobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
761 |
_RL ersmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
762 |
_RL ctdtobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
763 |
_RL ctdsobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
764 |
_RL xbtobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
765 |
_RL argotobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
766 |
_RL argosobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
767 |
_RL udriftdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
768 |
_RL vdriftdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy) |
769 |
_RL curmtruobs(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
770 |
_RL curmtrvobs(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
771 |
|
772 |
c Files that contain obervations: |
773 |
c =============================== |
774 |
c |
775 |
c tdatfile - reference data file for temperature. |
776 |
c sdatfile - reference data file for salinity. |
777 |
c scatxdatfile - reference data file for zonal wind stress. |
778 |
c scatydatfile - reference data file for meridional wind stress. |
779 |
c tmidatfile - reference data file for TMI sea surface temp. |
780 |
c sstdatfile - reference data file for sea surface temperature. |
781 |
c topexmeanfile - reference data file for mean sea surface height. |
782 |
c topexfile - reference data file for sea surface height data |
783 |
c (TOPEX/POSEIDON). |
784 |
c ersfile - reference data file for sea surface height data |
785 |
c (ERS). |
786 |
c ctdtfile, ctdsfile- reference data file for temperature and salinity |
787 |
c from CTD |
788 |
c ctdtclimfile, ctdsclimfile- reference data file for temperature |
789 |
c and salinity from CTD with out timetag |
790 |
c xbtfile - reference data file for xbt |
791 |
c ARGOtfile - reference data file for ARGO |
792 |
c ARGOsfile - reference data file for ARGO |
793 |
c driftfile - reference data file for drifter's mean velocities |
794 |
|
795 |
common /cost_data_c/ |
796 |
& tdatfile, |
797 |
& sdatfile, |
798 |
& scatxdatfile, |
799 |
& scatydatfile, |
800 |
& tmidatfile, |
801 |
& sstdatfile, |
802 |
& sssdatfile, |
803 |
& topexmeanfile, |
804 |
& topexfile, |
805 |
& ersfile, |
806 |
& ctdtfile, |
807 |
& ctdsfile, |
808 |
& ctdtclimfile, |
809 |
& ctdsclimfile, |
810 |
& xbtfile, |
811 |
& argotfile, |
812 |
& argosfile, |
813 |
& udriftfile, |
814 |
& vdriftfile, |
815 |
& curmtrufile, |
816 |
& curmtrvfile |
817 |
|
818 |
character*(MAX_LEN_FNAM) tdatfile |
819 |
character*(MAX_LEN_FNAM) sdatfile |
820 |
character*(MAX_LEN_FNAM) scatxdatfile |
821 |
character*(MAX_LEN_FNAM) scatydatfile |
822 |
character*(MAX_LEN_FNAM) tmidatfile |
823 |
character*(MAX_LEN_FNAM) sstdatfile |
824 |
character*(MAX_LEN_FNAM) sssdatfile |
825 |
character*(MAX_LEN_FNAM) topexmeanfile |
826 |
character*(MAX_LEN_FNAM) topexfile |
827 |
character*(MAX_LEN_FNAM) ersfile |
828 |
character*(MAX_LEN_FNAM) ctdtfile |
829 |
character*(MAX_LEN_FNAM) ctdsfile |
830 |
character*(MAX_LEN_FNAM) ctdtclimfile |
831 |
character*(MAX_LEN_FNAM) ctdsclimfile |
832 |
character*(MAX_LEN_FNAM) xbtfile |
833 |
character*(MAX_LEN_FNAM) argotfile |
834 |
character*(MAX_LEN_FNAM) argosfile |
835 |
character*(MAX_LEN_FNAM) argofile |
836 |
character*(MAX_LEN_FNAM) udriftfile |
837 |
character*(MAX_LEN_FNAM) vdriftfile |
838 |
character*(MAX_LEN_FNAM) curmtrufile |
839 |
character*(MAX_LEN_FNAM) curmtrvfile |
840 |
|
841 |
c Flags used in the model-data comparison: |
842 |
c ======================================== |
843 |
c |
844 |
c using_ers - flag that indicates the use of ERS data |
845 |
|
846 |
common /cost_data_flags/ |
847 |
& using_topex, |
848 |
& using_ers |
849 |
logical using_topex |
850 |
logical using_ers |
851 |
|
852 |
c Calendar information for the observations: |
853 |
c ========================================== |
854 |
c |
855 |
c tmistartdate - start date of the sea surface temperature data. |
856 |
c sststartdate - start date of the sea surface temperature data. |
857 |
c topexstartdate - start date of the sea surface height data. |
858 |
c ersstartdate - start date of the sea surface height data. |
859 |
c sshperiod - sampling interval for sea surface height data. |
860 |
|
861 |
common /cost_data_times_i/ |
862 |
& scatxstartdate, |
863 |
& scatystartdate, |
864 |
& tmistartdate, |
865 |
& sststartdate, |
866 |
& sssstartdate, |
867 |
& argotstartdate, |
868 |
& argosstartdate, |
869 |
& topexstartdate, |
870 |
& ersstartdate |
871 |
integer scatxstartdate(4) |
872 |
integer scatystartdate(4) |
873 |
integer tmistartdate(4) |
874 |
integer sststartdate(4) |
875 |
integer sssstartdate(4) |
876 |
integer argotstartdate(4) |
877 |
integer argosstartdate(4) |
878 |
integer topexstartdate(4) |
879 |
integer ersstartdate(4) |
880 |
|
881 |
common /cost_data_aux_i/ |
882 |
& tmistartdate1, |
883 |
& tmistartdate2, |
884 |
& sststartdate1, |
885 |
& sststartdate2, |
886 |
& sssstartdate1, |
887 |
& sssstartdate2, |
888 |
& argotstartdate1, |
889 |
& argotstartdate2, |
890 |
& argosstartdate1, |
891 |
& argosstartdate2, |
892 |
& topexstartdate1, |
893 |
& topexstartdate2, |
894 |
& ersstartdate1, |
895 |
& ersstartdate2, |
896 |
& scatstartdate1, |
897 |
& scatstartdate2, |
898 |
& costIceStart1, |
899 |
& costIceStart2, |
900 |
& costIceEnd1, |
901 |
& costIceEnd2 |
902 |
|
903 |
integer tmistartdate1 |
904 |
integer tmistartdate2 |
905 |
integer sststartdate1 |
906 |
integer sststartdate2 |
907 |
integer sssstartdate1 |
908 |
integer sssstartdate2 |
909 |
integer argotstartdate1 |
910 |
integer argotstartdate2 |
911 |
integer argosstartdate1 |
912 |
integer argosstartdate2 |
913 |
integer topexstartdate1 |
914 |
integer topexstartdate2 |
915 |
integer ersstartdate1 |
916 |
integer ersstartdate2 |
917 |
integer scatstartdate1 |
918 |
integer scatstartdate2 |
919 |
integer costIceStart1 |
920 |
integer costIceStart2 |
921 |
integer costIceEnd1 |
922 |
integer costIceEnd2 |
923 |
|
924 |
c costIceStart - cost_ice start in seconds wrt model startTime |
925 |
c costIceEnd - cost_ice end in seconds wrt model startTime |
926 |
|
927 |
common /cost_data_times_r/ |
928 |
& topexperiod, |
929 |
& ersperiod, |
930 |
& scatperiod, |
931 |
& costIceStart, |
932 |
& costIceEnd |
933 |
_RL topexperiod |
934 |
_RL ersperiod |
935 |
_RL scatperiod |
936 |
_RL costIceStart |
937 |
_RL costIceEnd |
938 |
|
939 |
c cost_ice_flag - cost_ice flag (see cost_ice.F) |
940 |
|
941 |
common /cost_ice_i/ cost_ice_flag |
942 |
integer cost_ice_flag |
943 |
|
944 |
c ================================================================== |
945 |
c END OF HEADER COST |
946 |
c ================================================================== |