/[MITgcm]/MITgcm/pkg/ecco/ecco_cost.h
ViewVC logotype

Contents of /MITgcm/pkg/ecco/ecco_cost.h

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


Revision 1.8 - (show annotations) (download)
Fri Jul 29 05:19:40 2005 UTC (18 years, 11 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57o_post, checkpoint57n_post, checkpoint57p_post
Changes since 1.7: +37 -0 lines
File MIME type: text/plain
o Replacing 10 forcing penalty cost routines by 1 generic.
o Implementing partitioning in time-mean and variable adjustment
  for atmos. state.

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
11 c added sea-ice term: menemenlis@jpl.nasa.gov 26-Feb-2003
12 c
13 c ==================================================================
14 c HEADER AVERAGES
15 c ==================================================================
16
17 c Averaging counters:
18 c ===================
19 c
20 c sum1day - counter for the daily averaging
21 c sum1mon - counter for the monthly averaging
22 c dayrec - number of averaged surface pressure records.
23 c monrec - number of averaged theta and salinity records.
24
25 common /average_i/
26 & sum1day,sum1mon,
27 & dayrec,monrec
28 integer sum1day
29 integer sum1mon
30 integer dayrec
31 integer monrec
32
33
34 c Averaged Fields:
35 c ================
36 c
37 c tbar - contains the averaged temperature field after the call
38 c to subroutine POST_MONTHLY. Before, it accumulates the
39 c intantaneous temperatures.
40 c sbar - contains the averaged salinity field after the call
41 c to subroutine POST_MONTHLY. Before, it accumulates the
42 c intantaneous salinities.
43 c psbar - contains the averaged surface pressure field after the call
44 c to subroutine POST_DAILY. Before, it accumulates the
45 c intantaneous surface pressure field.
46 c ubar - contains the averaged zonal velocity component for the
47 c whole integration period. Before, it accumulates the
48 c intantaneous field.
49 c vbar - contains the averaged zonal velocity component for the
50 c whole integration period. Before, it accumulates the
51 c intantaneous field.
52 c tauxbar - contains the averaged zonal velocity component for the
53 c whole integration period. Before, it accumulates the
54 c intantaneous field.
55 c tauybar - contains the averaged zonal velocity component for the
56 c whole integration period. Before, it accumulates the
57 c intantaneous field.
58 c hfluxbar - contains the averaged zonal velocity component for the
59 c whole integration period. Before, it accumulates the
60 c intantaneous field.
61 c sfluxbar - contains the averaged zonal velocity component for the
62 c whole integration period. Before, it accumulates the
63 c intantaneous field.
64
65 common /averages_r/
66 & tbar,
67 & sbar,
68 & psbar,
69 & ubar,
70 & vbar,
71 & wbar,
72 & tauxbar,
73 & tauybar,
74 & hfluxbar,
75 & sfluxbar,
76 & Slmean,
77 & Tlmean,
78 & wlmean,
79 & Sfmean,
80 & Tfmean,
81 & sbar_gen,
82 & tbar_gen,
83 & wfmean
84
85 #if (defined (ALLOW_THETA_COST_CONTRIBUTION) || \
86 defined (ALLOW_CTDT_COST_CONTRIBUTION) || \
87 defined (ALLOW_XBT_COST_CONTRIBUTION) || \
88 defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \
89 defined (ALLOW_OBCS_COST_CONTRIBUTION))
90 _RL tbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
91 #else
92 #ifdef ALLOW_SST_COST_CONTRIBUTION
93 _RL tbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
94 #else
95 _RL tbar
96 #endif
97 #endif
98 #ifdef GENERIC_BAR_MONTH
99 _RL tbar_gen (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
100 _RL sbar_gen (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
101 #else
102 _RL tbar_gen
103 _RL sbar_gen
104 #endif
105
106 #if (defined (ALLOW_SALT_COST_CONTRIBUTION) || \
107 defined (ALLOW_CTDS_COST_CONTRIBUTION) || \
108 defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \
109 defined (ALLOW_OBCS_COST_CONTRIBUTION))
110 _RL sbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
111 #else
112 #ifdef ALLOW_SSS_COST_CONTRIBUTION
113 _RL sbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
114 #else
115 _RL sbar
116 #endif
117 #endif
118
119 #ifdef ALLOW_SSH_COST_CONTRIBUTION
120 _RL psbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
121 #else
122 _RL psbar
123 #endif
124
125 #if (defined (ALLOW_DRIFTER_COST_CONTRIBUTION) || \
126 defined (ALLOW_OBCS_COST_CONTRIBUTION))
127 _RL ubar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
128 _RL vbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
129 #else
130 _RL ubar
131 _RL vbar
132 #endif
133
134 #ifdef ALLOW_DRIFTW_COST_CONTRIBUTION
135 _RL wbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
136 #else
137 _RL wbar
138 #endif
139
140 #ifdef ALLOW_DRIFT_COST_CONTRIBUTION
141 _RL Tlmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
142 _RL Slmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
143 _RL Tfmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
144 _RL Sfmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
145 #else
146 _RL Tlmean
147 _RL Slmean
148 _RL Tfmean
149 _RL Sfmean
150 #endif
151
152 #ifdef ALLOW_DRIFTW_COST_CONTRIBUTION
153 _RL wlmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
154 _RL wfmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
155 #else
156 _RL wlmean
157 _RL wfmean
158 #endif
159
160 #ifdef ALLOW_SCAT_COST_CONTRIBUTION
161 _RL tauxbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
162 _RL tauybar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
163 #else
164 _RL tauxbar
165 _RL tauybar
166 #endif
167
168 #ifdef ALLOW_MEAN_HFLUX_COST_CONTRIBUTION
169 _RL hfluxbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
170 #else
171 _RL hfluxbar
172 #endif
173
174 #ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION
175 _RL sfluxbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
176 #else
177 _RL sfluxbar
178 #endif
179
180
181 common /averages_c/
182 & tbarfile,
183 & sbarfile,
184 & psbarfile,
185 & ubarfile,
186 & vbarfile,
187 & wbarfile,
188 & tauxbarfile,
189 & tauybarfile,
190 & hfluxbarfile,
191 & sfluxbarfile
192 character*(MAX_LEN_FNAM) tbarfile
193 character*(MAX_LEN_FNAM) sbarfile
194 character*(MAX_LEN_FNAM) psbarfile
195 character*(MAX_LEN_FNAM) ubarfile
196 character*(MAX_LEN_FNAM) vbarfile
197 character*(MAX_LEN_FNAM) wbarfile
198 character*(MAX_LEN_FNAM) tauxbarfile
199 character*(MAX_LEN_FNAM) tauybarfile
200 character*(MAX_LEN_FNAM) hfluxbarfile
201 character*(MAX_LEN_FNAM) sfluxbarfile
202
203 c file precision and field type
204
205 common /prec_type_cost/
206 & cost_iprec,
207 & cost_yftype
208
209 integer cost_iprec
210 character*(2) cost_yftype
211
212 c ==================================================================
213 c END OF HEADER AVERAGES
214 c ==================================================================
215
216
217
218 c ==================================================================
219 c HEADER COST
220 c ==================================================================
221 c
222 c o Header for model-data comparison.
223 c
224 c The individual cost function contributions are multiplied by
225 c factors mult_"var" which allow to switch off these contributions
226 c without removing them in the adjoint code. This is useful for
227 c doing tests with the adjoint and perhaps useful in assimilation
228 c experiments where individual contributions are successively
229 c switched on. For future applications it would be better to place
230 c the initialisation of the multipliers somewhere else, for example
231 c in a namelist, which is read in at the start of the model.
232 c
233 c started: Christian Eckert eckert@mit.edu 24-Feb-1999
234 c
235 c changed: Christian Eckert eckert@mit.edu
236 c
237 c
238 c ==================================================================
239 c HEADER COST
240 c ==================================================================
241
242
243 c The cost function, its contributions, and multipliers:
244 c ======================================================
245 c
246 c fc - Final cost function.
247 c objf_hflux - Heat flux contribution.
248 c objf_sflux - Salt flux contribution.
249 c objf_tauu - Zonal wind stress contribution.
250 c objf_tauv - Meridional wind stress contribution.
251 c objf_hfluxm - time-mean Heat flux contribution.
252 c objf_sfluxm - time-mean Salt flux contribution.
253 c objf_tauum - time-mean Zonal wind stress contribution.
254 c objf_tauvm - time-mean Meridional wind stress contribution.
255 c objf_hfluxmm - Global time-mean Heat flux contribution.
256 c objf_sfluxmm - Global time-mean Salt flux contribution.
257 c objf_hmean - Mean sea surface height contribution.
258 c objf_h - Residual sea surface height contribution.
259 c objf_temp - Temperature contribution.
260 c objf_salt - Salinity contribution.
261 c objf_temp0 - Initial conditions Temperature contribution.
262 c objf_salt0 - Initial conditions Salinity contribution.
263 c objf_sst - Sea surface temperature contribution.
264 c objf_tmi - Sea surface temperature contribution.
265 c objf_sss - Sea surface salinity contribution.
266 c objf_ctdt - Temperature measurements from Woce CTD
267 c objf_ctds - Salinity measurements from Woce CTD
268 c objf_ctdtclim - Temperature measurements from Woce CTD without timetag
269 c objf_ctdsclim - Salinity measurements 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 /ecco_cost_objf/
287 & objf_hflux,
288 & objf_hfluxm,
289 & objf_hfluxmm,
290 & objf_sflux,
291 & objf_sfluxm,
292 & objf_sfluxmm,
293 & objf_tauu,
294 & objf_tauum,
295 & objf_tauv,
296 & objf_tauvm,
297 & objf_hmean,
298 & objf_h,
299 & objf_temp,
300 & objf_salt,
301 & objf_temp0,
302 & objf_salt0,
303 & objf_sst,
304 & objf_tmi,
305 & objf_sss,
306 & objf_ctdt,
307 & objf_ctds,
308 & objf_ctdtclim,
309 & objf_ctdsclim,
310 & objf_xbt,
311 & objf_argot,
312 & objf_argos,
313 & objf_drift,
314 & objf_tdrift,
315 & objf_sdrift,
316 & objf_wdrift,
317 & objf_scatx,
318 & objf_scaty,
319 & objf_scatxm,
320 & objf_scatym,
321 & objf_atemp,
322 & objf_aqh,
323 & objf_precip,
324 & objf_swflux,
325 & objf_uwind,
326 & objf_vwind,
327 & objf_atempm,
328 & objf_aqhm,
329 & objf_precipm,
330 & objf_swfluxm,
331 & objf_uwindm,
332 & objf_vwindm,
333 & objf_obcsn,
334 & objf_obcss,
335 & objf_obcsw,
336 & objf_obcse,
337 & objf_obcsvol,
338 & objf_curmtr,
339 & objf_ageos,
340 & objf_ice,
341 & objf_diffkr,
342 & objf_theta_ini_fin,
343 & objf_salt_ini_fin,
344 & objf_eddytau
345
346 _RL objf_hflux (nsx,nsy)
347 _RL objf_hfluxm (nsx,nsy)
348 _RL objf_hfluxmm(nsx,nsy)
349 _RL objf_sflux (nsx,nsy)
350 _RL objf_sfluxm (nsx,nsy)
351 _RL objf_sfluxmm(nsx,nsy)
352 _RL objf_tauu (nsx,nsy)
353 _RL objf_tauum (nsx,nsy)
354 _RL objf_tauv (nsx,nsy)
355 _RL objf_tauvm (nsx,nsy)
356 _RL objf_hmean
357 _RL objf_h (nsx,nsy)
358 _RL objf_temp (nsx,nsy)
359 _RL objf_salt (nsx,nsy)
360 _RL objf_temp0(nsx,nsy)
361 _RL objf_salt0(nsx,nsy)
362 _RL objf_sst (nsx,nsy)
363 _RL objf_tmi (nsx,nsy)
364 _RL objf_sss (nsx,nsy)
365 _RL objf_ctdt (nsx,nsy)
366 _RL objf_ctds (nsx,nsy)
367 _RL objf_ctdtclim (nsx,nsy)
368 _RL objf_ctdsclim (nsx,nsy)
369 _RL objf_xbt (nsx,nsy)
370 _RL objf_argot(nsx,nsy)
371 _RL objf_argos(nsx,nsy)
372 _RL objf_drift(nsx,nsy)
373 _RL objf_tdrift(nsx,nsy)
374 _RL objf_sdrift(nsx,nsy)
375 _RL objf_wdrift(nsx,nsy)
376 _RL objf_scatx(nsx,nsy)
377 _RL objf_scaty(nsx,nsy)
378 _RL objf_scatxm(nsx,nsy)
379 _RL objf_scatym(nsx,nsy)
380 _RL objf_atemp(nsx,nsy)
381 _RL objf_aqh (nsx,nsy)
382 _RL objf_precip(nsx,nsy)
383 _RL objf_swflux(nsx,nsy)
384 _RL objf_uwind(nsx,nsy)
385 _RL objf_vwind(nsx,nsy)
386 _RL objf_atempm(nsx,nsy)
387 _RL objf_aqhm (nsx,nsy)
388 _RL objf_precipm(nsx,nsy)
389 _RL objf_swfluxm(nsx,nsy)
390 _RL objf_uwindm(nsx,nsy)
391 _RL objf_vwindm(nsx,nsy)
392 _RL objf_obcsn(nsx,nsy)
393 _RL objf_obcss(nsx,nsy)
394 _RL objf_obcsw(nsx,nsy)
395 _RL objf_obcse(nsx,nsy)
396 _RL objf_obcsvol
397 _RL objf_curmtr(nsx,nsy)
398 _RL objf_ageos(nsx,nsy)
399 _RL objf_ice (nsx,nsy)
400 _RL objf_kapgm(nsx,nsy)
401 _RL objf_diffkr(nsx,nsy)
402 _RL objf_theta_ini_fin(nsx,nsy)
403 _RL objf_salt_ini_fin(nsx,nsy)
404 _RL objf_eddytau(nsx,nsy)
405
406 common /ecco_cost_num/
407 & num_hflux,
408 & num_hfluxm,
409 & num_hfluxmm,
410 & num_sflux,
411 & num_sfluxm,
412 & num_sfluxmm,
413 & num_tauu,
414 & num_tauum,
415 & num_tauv,
416 & num_tauvm,
417 & num_hmean,
418 & num_h,
419 & num_temp,
420 & num_salt,
421 & num_temp0,
422 & num_salt0,
423 & num_sst,
424 & num_tmi,
425 & num_sss,
426 & num_ctdt,
427 & num_ctds,
428 & num_ctdtclim,
429 & num_ctdsclim,
430 & num_xbt,
431 & num_argot,
432 & num_argos,
433 & num_drift,
434 & num_tdrift,
435 & num_sdrift,
436 & num_wdrift,
437 & num_scatx,
438 & num_scaty,
439 & num_scatxm,
440 & num_scatym,
441 & num_atemp,
442 & num_aqh,
443 & num_precip,
444 & num_swflux,
445 & num_uwind,
446 & num_vwind,
447 & num_atempm,
448 & num_aqhm,
449 & num_precipm,
450 & num_swfluxm,
451 & num_uwindm,
452 & num_vwindm,
453 & num_obcsn,
454 & num_obcss,
455 & num_obcsw,
456 & num_obcse,
457 & num_obcsvol,
458 & num_curmtr,
459 & num_ageos,
460 & num_ice,
461 & num_diffkr,
462 & num_theta_ini_fin,
463 & num_salt_ini_fin,
464 & num_eddytau
465
466 _RL num_hflux (nsx,nsy)
467 _RL num_hfluxm (nsx,nsy)
468 _RL num_hfluxmm(nsx,nsy)
469 _RL num_sflux (nsx,nsy)
470 _RL num_sfluxm (nsx,nsy)
471 _RL num_sfluxmm(nsx,nsy)
472 _RL num_tauu (nsx,nsy)
473 _RL num_tauum (nsx,nsy)
474 _RL num_tauv (nsx,nsy)
475 _RL num_tauvm (nsx,nsy)
476 _RL num_hmean
477 _RL num_h (nsx,nsy)
478 _RL num_temp (nsx,nsy)
479 _RL num_salt (nsx,nsy)
480 _RL num_temp0(nsx,nsy)
481 _RL num_salt0(nsx,nsy)
482 _RL num_sst (nsx,nsy)
483 _RL num_tmi (nsx,nsy)
484 _RL num_sss (nsx,nsy)
485 _RL num_ctdt (nsx,nsy)
486 _RL num_ctds (nsx,nsy)
487 _RL num_ctdtclim (nsx,nsy)
488 _RL num_ctdsclim (nsx,nsy)
489 _RL num_xbt (nsx,nsy)
490 _RL num_argot(nsx,nsy)
491 _RL num_argos(nsx,nsy)
492 _RL num_drift(nsx,nsy)
493 _RL num_tdrift(nsx,nsy)
494 _RL num_sdrift(nsx,nsy)
495 _RL num_wdrift(nsx,nsy)
496 _RL num_scatx(nsx,nsy)
497 _RL num_scaty(nsx,nsy)
498 _RL num_scatxm(nsx,nsy)
499 _RL num_scatym(nsx,nsy)
500 _RL num_atemp(nsx,nsy)
501 _RL num_aqh (nsx,nsy)
502 _RL num_precip(nsx,nsy)
503 _RL num_swflux(nsx,nsy)
504 _RL num_uwind(nsx,nsy)
505 _RL num_vwind(nsx,nsy)
506 _RL num_atempm(nsx,nsy)
507 _RL num_aqhm (nsx,nsy)
508 _RL num_precipm(nsx,nsy)
509 _RL num_swfluxm(nsx,nsy)
510 _RL num_uwindm(nsx,nsy)
511 _RL num_vwindm(nsx,nsy)
512 _RL num_obcsn(nsx,nsy)
513 _RL num_obcss(nsx,nsy)
514 _RL num_obcsw(nsx,nsy)
515 _RL num_obcse(nsx,nsy)
516 _RL num_obcsvol
517 _RL num_curmtr(nsx,nsy)
518 _RL num_ageos(nsx,nsy)
519 _RL num_ice (nsx,nsy)
520 _RL num_kapgm(nsx,nsy)
521 _RL num_diffkr(nsx,nsy)
522 _RL num_theta_ini_fin(nsx,nsy)
523 _RL num_salt_ini_fin(nsx,nsy)
524 _RL num_eddytau(nsx,nsy)
525
526 common /ecco_cost_aux_r/
527 & mult_hflux,
528 & mult_sflux,
529 & mult_tauu,
530 & mult_tauv,
531 & mult_hmean,
532 & mult_h,
533 & mult_temp,
534 & mult_salt,
535 & mult_temp0,
536 & mult_salt0,
537 & mult_sst,
538 & mult_tmi,
539 & mult_sss,
540 & mult_ctdt,
541 & mult_ctds,
542 & mult_ctdtclim,
543 & mult_ctdsclim,
544 & mult_xbt,
545 & mult_argot,
546 & mult_argos,
547 & mult_drift,
548 & mult_tdrift,
549 & mult_sdrift,
550 & mult_wdrift,
551 & mult_scatx,
552 & mult_scaty,
553 & mult_atemp,
554 & mult_aqh,
555 & mult_precip,
556 & mult_swflux,
557 & mult_uwind,
558 & mult_vwind,
559 & mult_obcsn,
560 & mult_obcss,
561 & mult_obcsw,
562 & mult_obcse,
563 & mult_obcsvol,
564 & mult_curmtr,
565 & mult_ageos,
566 & mult_ice,
567 & mult_kapgm,
568 & mult_diffkr,
569 & mult_ini_fin,
570 & mult_eddytau
571
572 _RL mult_hflux
573 _RL mult_sflux
574 _RL mult_tauu
575 _RL mult_tauv
576 _RL mult_hmean
577 _RL mult_h
578 _RL mult_temp
579 _RL mult_salt
580 _RL mult_temp0
581 _RL mult_salt0
582 _RL mult_sst
583 _RL mult_tmi
584 _RL mult_sss
585 _RL mult_ctdt
586 _RL mult_ctds
587 _RL mult_ctdtclim
588 _RL mult_ctdsclim
589 _RL mult_xbt
590 _RL mult_argot
591 _RL mult_argos
592 _RL mult_drift
593 _RL mult_tdrift
594 _RL mult_sdrift
595 _RL mult_wdrift
596 _RL mult_scatx
597 _RL mult_scaty
598 _RL mult_atemp
599 _RL mult_aqh
600 _RL mult_precip
601 _RL mult_swflux
602 _RL mult_uwind
603 _RL mult_vwind
604 _RL mult_obcsn
605 _RL mult_obcss
606 _RL mult_obcsw
607 _RL mult_obcse
608 _RL mult_obcsvol
609 _RL mult_curmtr
610 _RL mult_ageos
611 _RL mult_ice
612 _RL mult_kapgm
613 _RL mult_diffkr
614 _RL mult_ini_fin
615 _RL mult_eddytau
616
617 c Record counters relevant for the cost function evaluation.
618 c ==========================================================
619 c
620 c nmonsrec - number of monthly records that will be generated by
621 c the current model integration.
622 c ndaysrec - number of daily records that will be generated by
623 c the current model integration.
624
625 common /ecco_cost_i/
626 & nmonsrec,
627 & ndaysrec
628 integer nmonsrec
629 integer ndaysrec
630
631
632 c Data files for the weights used in the cost function:
633 c =====================================================
634 c
635 c hflux_errfile - heat flux error.
636 c sflux_errfile - salt flux error.
637 c tauu_errfile - zonal wind stress error.
638 c tauum_errfile - zonal wind stress error.
639 c tauv_errfile - meridional wind stress error.
640 c tauvm_errfile - meridional wind stress error.
641 c tscatx_errfile - zonal wind stress error.
642 c tscaty_errfile - meridional wind stress error.
643 c data_errfile - weights for theta, salt, and SST
644 c geoid_errfile - geoid error.
645 c geoid_covariancefile - geoid error covariance.
646 c ssh_errfile - sea surface height error.
647 c ctdt_errfile - CTD temperature error.
648 c ctds_errfile - CTD salinity error.
649 c drift_errfile - drifter error.
650 c salterrfile - representation error due unresolved eddies
651 c temperrfile - representation error due unresolved eddies
652 c velerrfile - representation error
653
654 common /ecco_cost_c/
655 & hflux_errfile,
656 & hfluxm_errfile,
657 & sflux_errfile,
658 & sfluxm_errfile,
659 & tauu_errfile,
660 & tauum_errfile,
661 & tauv_errfile,
662 & tauvm_errfile,
663 & scatx_errfile,
664 & scaty_errfile,
665 & data_errfile,
666 & geoid_errfile,
667 & geoid_covariancefile,
668 & ssh_errfile,
669 & ctdt_errfile,
670 & ctds_errfile,
671 & drift_errfile,
672 & udrifterrfile,
673 & vdrifterrfile,
674 & salterrfile,
675 & temperrfile,
676 & velerrfile,
677 & atemp_errfile,
678 & aqh_errfile,
679 & precip_errfile,
680 & swflux_errfile,
681 & uwind_errfile,
682 & vwind_errfile
683 character*(MAX_LEN_FNAM) hflux_errfile
684 character*(MAX_LEN_FNAM) sflux_errfile
685 character*(MAX_LEN_FNAM) tauu_errfile
686 character*(MAX_LEN_FNAM) tauv_errfile
687 character*(MAX_LEN_FNAM) hfluxm_errfile
688 character*(MAX_LEN_FNAM) sfluxm_errfile
689 character*(MAX_LEN_FNAM) tauum_errfile
690 character*(MAX_LEN_FNAM) tauvm_errfile
691 character*(MAX_LEN_FNAM) scatx_errfile
692 character*(MAX_LEN_FNAM) scaty_errfile
693 character*(MAX_LEN_FNAM) data_errfile
694 character*(MAX_LEN_FNAM) geoid_errfile
695 character*(MAX_LEN_FNAM) geoid_covariancefile
696 character*(MAX_LEN_FNAM) ssh_errfile
697 character*(MAX_LEN_FNAM) ctdt_errfile
698 character*(MAX_LEN_FNAM) ctds_errfile
699 character*(MAX_LEN_FNAM) drift_errfile
700 character*(MAX_LEN_FNAM) udrifterrfile
701 character*(MAX_LEN_FNAM) vdrifterrfile
702 character*(MAX_LEN_FNAM) salterrfile
703 character*(MAX_LEN_FNAM) temperrfile
704 character*(MAX_LEN_FNAM) velerrfile
705 character*(MAX_LEN_FNAM) atemp_errfile
706 character*(MAX_LEN_FNAM) aqh_errfile
707 character*(MAX_LEN_FNAM) precip_errfile
708 character*(MAX_LEN_FNAM) swflux_errfile
709 character*(MAX_LEN_FNAM) uwind_errfile
710 character*(MAX_LEN_FNAM) vwind_errfile
711
712
713 c Arrays where the weights are stored:
714 c ====================================
715 c
716 c cosphi - cosine of latitude.
717 c whflux - weight for heat flux.
718 c wsflux - weight for salt flux.
719 c wtauu - weight for zonal wind stress.
720 c wtauu - weight for meridional wind stress.
721 c wscatx - weight for zonal scat stress.
722 c wscaty - weight for meridional scat stress.
723 c wtheta - weight for temperature.
724 c wtheta2 - representation error due to unresolved eddies
725 c wsst - weight for sea surface temperature.
726 c wsss - weight for sea surface salinity.
727 c wsalt - weight for salinity.
728 c wsalt2 - representation error due to unresolved eddies
729 c wtp - weight for TOPEX/POSEIDON data.
730 c wers - weight for ERS data.
731 c wp - weight for geoid.
732 c wctdt - weight for CTD temperature.
733 c wctds - weight for CTD salinity.
734 c wudrift - weight for mean zonal velocity from drifters.
735 c wvdrift - weight for mean meridional velocity from drifters.
736
737 common /ecco_cost_weights_r/
738 & frame,
739 & cosphi,
740 & whflux,wsflux,wtauu,wtauv,
741 & watemp,waqh,wprecip,wswflux,wuwind,wvwind,
742 & wscatx,wscaty,
743 & wtheta,wtheta2,wthetaLev,
744 & wsalt,wsalt2,wsaltLev,
745 & wsst,wsss,
746 & wtp,wers,
747 & wp,
748 & wctdt,wctds,
749 & wudrift,wvdrift,
750 & whfluxmm,wsfluxmm,
751 & wcurrent,wcurrent2,
752 & wcurrentLev,wbaro
753
754 _RL frame (1-olx:snx+olx,1-oly:sny+oly )
755 _RL cosphi (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
756 _RL whflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
757 _RL whfluxm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
758 _RL whfluxmm(1-olx:snx+olx,1-oly:sny+oly)
759 _RL wsflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
760 _RL wsfluxm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
761 _RL wsfluxmm(1-olx:snx+olx,1-oly:sny+oly)
762 _RL wtauu (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
763 _RL wtauv (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
764 _RL wtauum (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
765 _RL wtauvm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
766 _RL wscatx (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
767 _RL wscaty (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
768 _RL watemp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
769 _RL waqh (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
770 _RL wprecip (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
771 _RL wswflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
772 _RL wuwind (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
773 _RL wvwind (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
774 _RL wtheta ( nr,nsx,nsy)
775 _RL wsalt ( nr,nsx,nsy)
776 _RL wtheta2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
777 _RL wsalt2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
778 _RL wthetaLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
779 _RL wsaltLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
780 _RL wsst (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
781 _RL wsss (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
782 _RL wtp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
783 _RL wers (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
784 _RL wp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
785 _RL wctdt ( nr,nsx,nsy)
786 _RL wctds ( nr,nsx,nsy)
787 _RL wudrift (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
788 _RL wvdrift (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
789 _RL wcurrent( nr,nsx,nsy)
790 _RL wcurrent2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
791 _RL wcurrentLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
792 _RL wbaro
793
794 common /ecco_cost_weights_0_r/
795 & whflux0, wsflux0, wtau0,
796 & watemp0, waqh0, wprecip0, wswflux0, wwind0
797 _RL whflux0
798 _RL wsflux0
799 _RL wtau0
800 _RL watemp0
801 _RL waqh0
802 _RL wprecip0
803 _RL wswflux0
804 _RL wwind0
805
806 common /ecco_cost_weights_mean_r/
807 & wmean_hflux, wmean_sflux, wmean_tau,
808 & wmean_atemp, wmean_aqh,
809 & wmean_precip, wmean_swflux, wmean_wind
810 _RL wmean_hflux
811 _RL wmean_sflux
812 _RL wmean_tau
813 _RL wmean_atemp
814 _RL wmean_aqh
815 _RL wmean_precip
816 _RL wmean_swflux
817 _RL wmean_wind
818
819 common /ecco_cost_weights_2_r/
820 & whflux2,wsflux2,wtauu2,wtauv2
821 _RL whflux2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
822 _RL wsflux2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
823 _RL wtauu2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
824 _RL wtauv2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
825
826
827
828 #if (defined (ALLOW_OBCSN_COST_CONTRIBUTION) || \
829 defined (ALLOW_OBCSN_CONTROL))
830 common /ecco_cost_weights_obcsn/
831 & wobcsn, wobcsnLev
832 _RL wobcsn ( nr,nobcs)
833 _RL wobcsnLev (1-olx:snx+olx,nr,nsx,nsy,nobcs)
834 #endif
835 #if (defined (ALLOW_OBCSS_COST_CONTRIBUTION) || \
836 defined (ALLOW_OBCSS_CONTROL))
837 common /ecco_cost_weights_obcss/
838 & wobcss, wobcssLev
839 _RL wobcss ( nr,nobcs)
840 _RL wobcssLev (1-olx:snx+olx,nr,nsx,nsy,nobcs)
841 #endif
842 #if (defined (ALLOW_OBCSW_COST_CONTRIBUTION) || \
843 defined (ALLOW_OBCSW_CONTROL))
844 common /ecco_cost_weights_obcsw/
845 & wobcsw, wobcswLev
846 _RL wobcsw ( nr,nobcs)
847 _RL wobcswLev (1-oly:sny+oly,nr,nsx,nsy,nobcs)
848 #endif
849 #if (defined (ALLOW_OBCSE_COST_CONTRIBUTION) || \
850 defined (ALLOW_OBCSE_CONTROL))
851 common /ecco_cost_weights_obcse/
852 & wobcse, wobcseLev
853 _RL wobcse ( nr,nobcs)
854 _RL wobcseLev (1-oly:sny+oly,nr,nsx,nsy,nobcs)
855 #endif
856
857
858 c Arrays that contain observations for the model-data comparison:
859 c ===============================================================
860 c
861 c tdat - reference temperature data.
862 c scatxdat - reference zonal wind stress.
863 c scatydat - reference meridional wind stress.
864 c sstdat - reference sea surface temperature data.
865 c tmidat - reference TMI sea surface temperature data.
866 c sssdat - reference sea surface temperature data.
867 c tauxmask - mask for reference wind stress data.
868 c tauymask - mask for reference wind stress data.
869 c scatxmask - mask for scat wind stress data.
870 c scatymask - mask for scat wind stress data.
871 c sstmask - mask for reference sea surface temperature data.
872 c tmimask - mask for reference sea surface temperature data.
873 c sssmask - mask for reference sea surface temperature data.
874 c sdat - reference salinity data.
875 c tpmean - reference mean sea surface height data.
876 c tpmeanmask - mask for reference mean sea surface height data.
877 c tpobs - TOPEX/POSEIDON data.
878 c tpmask - mask for TOPEX/POSEIDON data.
879 c ersobs - ERS data.
880 c ersmask - mask for ERS data.
881 c ctdtobs - CTD temperature data
882 c ctdsobs - CTD salinity data
883 c xbtobs - XBT data
884 c argot - ARGO temperature data
885 c argos - ARGO salt data
886 c udriftdat - drifters zonal velocities
887 c vdriftdat - drifters meridional velocities
888
889 common /ecco_cost_data_r/
890 & tdat,
891 & scatxdat,
892 & scatydat,
893 & sstdat,
894 & tmidat,
895 & sssdat,
896 & sstmask,
897 & tmimask,
898 & sssmask,
899 & tauxmask,
900 & tauymask,
901 & scatxmask,
902 & scatymask,
903 & sdat,
904 & tpmean,
905 & tpmeanmask,
906 & tpobs,
907 & tpmask,
908 & ersobs,
909 & ersmask,
910 & ctdtobs,
911 & ctdsobs,
912 & xbtobs,
913 & argotobs,
914 & argosobs,
915 & udriftdat,
916 & vdriftdat,
917 & curmtruobs,
918 & curmtrvobs
919
920 _RL tdat (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
921 _RL scatxdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
922 _RL scatydat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
923 _RL sstdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
924 _RL tmidat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
925 _RL sssdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
926 _RL tauxmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
927 _RL tauymask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
928 _RL scatxmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
929 _RL scatymask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
930 _RL sstmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
931 _RL tmimask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
932 _RL sssmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
933 _RL sdat (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
934 _RL tpmean (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
935 _RL tpmeanmask(1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
936 _RL tpobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
937 _RL tpmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
938 _RL ersobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
939 _RL ersmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
940 _RL ctdtobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
941 _RL ctdsobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
942 _RL xbtobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
943 _RL argotobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
944 _RL argosobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
945 _RL udriftdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
946 _RL vdriftdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
947 _RL curmtruobs(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
948 _RL curmtrvobs(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
949
950
951 c Files that contain obervations:
952 c ===============================
953 c
954 c tdatfile - reference data file for temperature.
955 c sdatfile - reference data file for salinity.
956 c scatxdatfile - reference data file for zonal wind stress.
957 c scatydatfile - reference data file for meridional wind stress.
958 c sstdatfile - reference data file for sea surface temperature.
959 c tmidatfile - reference data file for TMI sea surface temperature.
960 c topexmeanfile - reference data file for mean sea surface height.
961 c topexfile - reference data file for sea surface height data
962 c (TOPEX/POSEIDON).
963 c ersfile - reference data file for sea surface height data
964 c (ERS).
965 c ctdtfile, ctdsfile- reference data file for temperature and salinity
966 c from CTD
967 c ctdtclimfile, ctdsclimfile- reference data file for temperature
968 c and salinity from CTD with out timetag
969 c xbtfile - reference data file for xbt
970 c ARGOtfile - reference data file for ARGO
971 c ARGOsfile - reference data file for ARGO
972 c driftfile - reference data file for drifter's mean velocities
973
974 common /ecco_cost_data_c/
975 & tdatfile,
976 & sdatfile,
977 & scatxdatfile,
978 & scatydatfile,
979 & sstdatfile,
980 & tmidatfile,
981 & sssdatfile,
982 & topexmeanfile,
983 & topexfile,
984 & ersfile,
985 & ctdtfile,
986 & ctdsfile,
987 & ctdtclimfile,
988 & ctdsclimfile,
989 & xbtfile,
990 & argotfile,
991 & argosfile,
992 & udriftfile,
993 & vdriftfile,
994 & curmtrufile,
995 & curmtrvfile
996
997 character*(MAX_LEN_FNAM) tdatfile
998 character*(MAX_LEN_FNAM) sdatfile
999 character*(MAX_LEN_FNAM) scatxdatfile
1000 character*(MAX_LEN_FNAM) scatydatfile
1001 character*(MAX_LEN_FNAM) sstdatfile
1002 character*(MAX_LEN_FNAM) tmidatfile
1003 character*(MAX_LEN_FNAM) sssdatfile
1004 character*(MAX_LEN_FNAM) topexmeanfile
1005 character*(MAX_LEN_FNAM) topexfile
1006 character*(MAX_LEN_FNAM) ersfile
1007 character*(MAX_LEN_FNAM) ctdtfile
1008 character*(MAX_LEN_FNAM) ctdsfile
1009 character*(MAX_LEN_FNAM) ctdtclimfile
1010 character*(MAX_LEN_FNAM) ctdsclimfile
1011 character*(MAX_LEN_FNAM) xbtfile
1012 character*(MAX_LEN_FNAM) argotfile
1013 character*(MAX_LEN_FNAM) argosfile
1014 character*(MAX_LEN_FNAM) argofile
1015 character*(MAX_LEN_FNAM) udriftfile
1016 character*(MAX_LEN_FNAM) vdriftfile
1017 character*(MAX_LEN_FNAM) curmtrufile
1018 character*(MAX_LEN_FNAM) curmtrvfile
1019
1020
1021 c Flags used in the model-data comparison:
1022 c ========================================
1023 c
1024 c using_ers - flag that indicates the use of ERS data
1025
1026 common /ecco_cost_data_flags/
1027 & using_topex,
1028 & using_ers
1029 logical using_topex
1030 logical using_ers
1031
1032 c Calendar information for the observations:
1033 c ==========================================
1034 c
1035 c sststartdate - start date of the sea surface temperature data.
1036 c tmistartdate - start date of the sea surface temperature data.
1037 c topexstartdate - start date of the sea surface height data.
1038 c ersstartdate - start date of the sea surface height data.
1039 c sshperiod - sampling interval for the sea surface height data.
1040
1041 common /ecco_cost_data_times_i/
1042 & scatxstartdate,
1043 & scatystartdate,
1044 & sststartdate,
1045 & argotstartdate,
1046 & argosstartdate,
1047 & tmistartdate,
1048 & sssstartdate,
1049 & topexstartdate,
1050 & ersstartdate
1051 integer scatxstartdate(4)
1052 integer scatystartdate(4)
1053 integer sststartdate(4)
1054 integer argotstartdate(4)
1055 integer argosstartdate(4)
1056 integer tmistartdate(4)
1057 integer sssstartdate(4)
1058 integer topexstartdate(4)
1059 integer ersstartdate(4)
1060
1061 common /ecco_cost_data_aux_i/
1062 & tmistartdate1,
1063 & tmistartdate2,
1064 & sststartdate1,
1065 & sststartdate2,
1066 & sssstartdate1,
1067 & sssstartdate2,
1068 & argotstartdate1,
1069 & argotstartdate2,
1070 & argosstartdate1,
1071 & argosstartdate2,
1072 & topexstartdate1,
1073 & topexstartdate2,
1074 & ersstartdate1,
1075 & ersstartdate2,
1076 & scatstartdate1,
1077 & scatstartdate2,
1078 & costIceStart1,
1079 & costIceStart2,
1080 & costIceEnd1,
1081 & costIceEnd2
1082
1083 integer tmistartdate1
1084 integer tmistartdate2
1085 integer sststartdate1
1086 integer sststartdate2
1087 integer sssstartdate1
1088 integer sssstartdate2
1089 integer argotstartdate1
1090 integer argotstartdate2
1091 integer argosstartdate1
1092 integer argosstartdate2
1093 integer topexstartdate1
1094 integer topexstartdate2
1095 integer ersstartdate1
1096 integer ersstartdate2
1097 integer scatstartdate1
1098 integer scatstartdate2
1099 integer costIceStart1
1100 integer costIceStart2
1101 integer costIceEnd1
1102 integer costIceEnd2
1103
1104 common /ecco_cost_data_times_r/
1105 & topexperiod,
1106 & ersperiod,
1107 & scatperiod,
1108 & costIceStart,
1109 & costIceEnd
1110 _RL topexperiod
1111 _RL ersperiod
1112 _RL scatperiod
1113 _RL costIceStart
1114 _RL costIceEnd
1115
1116 c cost_ice_flag - cost_ice flag (see cost_ice.F)
1117
1118 common /ecco_cost_ice_i/ cost_ice_flag
1119 integer cost_ice_flag
1120
1121 c ==================================================================
1122 c END OF HEADER COST
1123 c ==================================================================
1124
1125

  ViewVC Help
Powered by ViewVC 1.1.22