/[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.7 - (show annotations) (download)
Thu Jul 28 19:51:58 2005 UTC (18 years, 11 months ago) by heimbach
Branch: MAIN
Changes since 1.6: +13 -3 lines
File MIME type: text/plain
Adding swflux control

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_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 & objf_eddytau
339
340 _RL objf_hflux (nsx,nsy)
341 _RL objf_hfluxm (nsx,nsy)
342 _RL objf_hfluxmm(nsx,nsy)
343 _RL objf_sflux (nsx,nsy)
344 _RL objf_sfluxm (nsx,nsy)
345 _RL objf_sfluxmm(nsx,nsy)
346 _RL objf_tauu (nsx,nsy)
347 _RL objf_tauum (nsx,nsy)
348 _RL objf_tauv (nsx,nsy)
349 _RL objf_tauvm (nsx,nsy)
350 _RL objf_hmean
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_sst (nsx,nsy)
357 _RL objf_tmi (nsx,nsy)
358 _RL objf_sss (nsx,nsy)
359 _RL objf_ctdt (nsx,nsy)
360 _RL objf_ctds (nsx,nsy)
361 _RL objf_ctdtclim (nsx,nsy)
362 _RL objf_ctdsclim (nsx,nsy)
363 _RL objf_xbt (nsx,nsy)
364 _RL objf_argot(nsx,nsy)
365 _RL objf_argos(nsx,nsy)
366 _RL objf_drift(nsx,nsy)
367 _RL objf_tdrift(nsx,nsy)
368 _RL objf_sdrift(nsx,nsy)
369 _RL objf_wdrift(nsx,nsy)
370 _RL objf_scatx(nsx,nsy)
371 _RL objf_scaty(nsx,nsy)
372 _RL objf_scatxm(nsx,nsy)
373 _RL objf_scatym(nsx,nsy)
374 _RL objf_atemp(nsx,nsy)
375 _RL objf_aqh (nsx,nsy)
376 _RL objf_precip(nsx,nsy)
377 _RL objf_swflux(nsx,nsy)
378 _RL objf_uwind(nsx,nsy)
379 _RL objf_vwind(nsx,nsy)
380 _RL objf_obcsn(nsx,nsy)
381 _RL objf_obcss(nsx,nsy)
382 _RL objf_obcsw(nsx,nsy)
383 _RL objf_obcse(nsx,nsy)
384 _RL objf_obcsvol
385 _RL objf_curmtr(nsx,nsy)
386 _RL objf_ageos(nsx,nsy)
387 _RL objf_ice (nsx,nsy)
388 _RL objf_kapgm(nsx,nsy)
389 _RL objf_diffkr(nsx,nsy)
390 _RL objf_theta_ini_fin(nsx,nsy)
391 _RL objf_salt_ini_fin(nsx,nsy)
392 _RL objf_eddytau(nsx,nsy)
393
394 common /ecco_cost_num/
395 & num_hflux,
396 & num_hfluxm,
397 & num_hfluxmm,
398 & num_sflux,
399 & num_sfluxm,
400 & num_sfluxmm,
401 & num_tauu,
402 & num_tauum,
403 & num_tauv,
404 & num_tauvm,
405 & num_hmean,
406 & num_h,
407 & num_temp,
408 & num_salt,
409 & num_temp0,
410 & num_salt0,
411 & num_sst,
412 & num_tmi,
413 & num_sss,
414 & num_ctdt,
415 & num_ctds,
416 & num_ctdtclim,
417 & num_ctdsclim,
418 & num_xbt,
419 & num_argot,
420 & num_argos,
421 & num_drift,
422 & num_tdrift,
423 & num_sdrift,
424 & num_wdrift,
425 & num_scatx,
426 & num_scaty,
427 & num_scatxm,
428 & num_scatym,
429 & num_atemp,
430 & num_aqh,
431 & num_precip,
432 & num_swflux,
433 & num_uwind,
434 & num_vwind,
435 & num_obcsn,
436 & num_obcss,
437 & num_obcsw,
438 & num_obcse,
439 & num_obcsvol,
440 & num_curmtr,
441 & num_ageos,
442 & num_ice,
443 & num_diffkr,
444 & num_theta_ini_fin,
445 & num_salt_ini_fin,
446 & num_eddytau
447
448 _RL num_hflux (nsx,nsy)
449 _RL num_hfluxm (nsx,nsy)
450 _RL num_hfluxmm(nsx,nsy)
451 _RL num_sflux (nsx,nsy)
452 _RL num_sfluxm (nsx,nsy)
453 _RL num_sfluxmm(nsx,nsy)
454 _RL num_tauu (nsx,nsy)
455 _RL num_tauum (nsx,nsy)
456 _RL num_tauv (nsx,nsy)
457 _RL num_tauvm (nsx,nsy)
458 _RL num_hmean
459 _RL num_h (nsx,nsy)
460 _RL num_temp (nsx,nsy)
461 _RL num_salt (nsx,nsy)
462 _RL num_temp0(nsx,nsy)
463 _RL num_salt0(nsx,nsy)
464 _RL num_sst (nsx,nsy)
465 _RL num_tmi (nsx,nsy)
466 _RL num_sss (nsx,nsy)
467 _RL num_ctdt (nsx,nsy)
468 _RL num_ctds (nsx,nsy)
469 _RL num_ctdtclim (nsx,nsy)
470 _RL num_ctdsclim (nsx,nsy)
471 _RL num_xbt (nsx,nsy)
472 _RL num_argot(nsx,nsy)
473 _RL num_argos(nsx,nsy)
474 _RL num_drift(nsx,nsy)
475 _RL num_tdrift(nsx,nsy)
476 _RL num_sdrift(nsx,nsy)
477 _RL num_wdrift(nsx,nsy)
478 _RL num_scatx(nsx,nsy)
479 _RL num_scaty(nsx,nsy)
480 _RL num_scatxm(nsx,nsy)
481 _RL num_scatym(nsx,nsy)
482 _RL num_atemp(nsx,nsy)
483 _RL num_aqh (nsx,nsy)
484 _RL num_precip(nsx,nsy)
485 _RL num_swflux(nsx,nsy)
486 _RL num_uwind(nsx,nsy)
487 _RL num_vwind(nsx,nsy)
488 _RL num_obcsn(nsx,nsy)
489 _RL num_obcss(nsx,nsy)
490 _RL num_obcsw(nsx,nsy)
491 _RL num_obcse(nsx,nsy)
492 _RL num_obcsvol
493 _RL num_curmtr(nsx,nsy)
494 _RL num_ageos(nsx,nsy)
495 _RL num_ice (nsx,nsy)
496 _RL num_kapgm(nsx,nsy)
497 _RL num_diffkr(nsx,nsy)
498 _RL num_theta_ini_fin(nsx,nsy)
499 _RL num_salt_ini_fin(nsx,nsy)
500 _RL num_eddytau(nsx,nsy)
501
502 common /ecco_cost_aux_r/
503 & mult_hflux,
504 & mult_sflux,
505 & mult_tauu,
506 & mult_tauv,
507 & mult_hmean,
508 & mult_h,
509 & mult_temp,
510 & mult_salt,
511 & mult_temp0,
512 & mult_salt0,
513 & mult_sst,
514 & mult_tmi,
515 & mult_sss,
516 & mult_ctdt,
517 & mult_ctds,
518 & mult_ctdtclim,
519 & mult_ctdsclim,
520 & mult_xbt,
521 & mult_argot,
522 & mult_argos,
523 & mult_drift,
524 & mult_tdrift,
525 & mult_sdrift,
526 & mult_wdrift,
527 & mult_scatx,
528 & mult_scaty,
529 & mult_atemp,
530 & mult_aqh,
531 & mult_precip,
532 & mult_swflux,
533 & mult_uwind,
534 & mult_vwind,
535 & mult_obcsn,
536 & mult_obcss,
537 & mult_obcsw,
538 & mult_obcse,
539 & mult_obcsvol,
540 & mult_curmtr,
541 & mult_ageos,
542 & mult_ice,
543 & mult_kapgm,
544 & mult_diffkr,
545 & mult_ini_fin,
546 & mult_eddytau
547
548 _RL mult_hflux
549 _RL mult_sflux
550 _RL mult_tauu
551 _RL mult_tauv
552 _RL mult_hmean
553 _RL mult_h
554 _RL mult_temp
555 _RL mult_salt
556 _RL mult_temp0
557 _RL mult_salt0
558 _RL mult_sst
559 _RL mult_tmi
560 _RL mult_sss
561 _RL mult_ctdt
562 _RL mult_ctds
563 _RL mult_ctdtclim
564 _RL mult_ctdsclim
565 _RL mult_xbt
566 _RL mult_argot
567 _RL mult_argos
568 _RL mult_drift
569 _RL mult_tdrift
570 _RL mult_sdrift
571 _RL mult_wdrift
572 _RL mult_scatx
573 _RL mult_scaty
574 _RL mult_atemp
575 _RL mult_aqh
576 _RL mult_precip
577 _RL mult_swflux
578 _RL mult_uwind
579 _RL mult_vwind
580 _RL mult_obcsn
581 _RL mult_obcss
582 _RL mult_obcsw
583 _RL mult_obcse
584 _RL mult_obcsvol
585 _RL mult_curmtr
586 _RL mult_ageos
587 _RL mult_ice
588 _RL mult_kapgm
589 _RL mult_diffkr
590 _RL mult_ini_fin
591 _RL mult_eddytau
592
593 c Record counters relevant for the cost function evaluation.
594 c ==========================================================
595 c
596 c nmonsrec - number of monthly records that will be generated by
597 c the current model integration.
598 c ndaysrec - number of daily records that will be generated by
599 c the current model integration.
600
601 common /ecco_cost_i/
602 & nmonsrec,
603 & ndaysrec
604 integer nmonsrec
605 integer ndaysrec
606
607
608 c Data files for the weights used in the cost function:
609 c =====================================================
610 c
611 c hflux_errfile - heat flux error.
612 c sflux_errfile - salt flux error.
613 c tauu_errfile - zonal wind stress error.
614 c tauum_errfile - zonal wind stress error.
615 c tauv_errfile - meridional wind stress error.
616 c tauvm_errfile - meridional wind stress error.
617 c tscatx_errfile - zonal wind stress error.
618 c tscaty_errfile - meridional wind stress error.
619 c data_errfile - weights for theta, salt, and SST
620 c geoid_errfile - geoid error.
621 c geoid_covariancefile - geoid error covariance.
622 c ssh_errfile - sea surface height error.
623 c ctdt_errfile - CTD temperature error.
624 c ctds_errfile - CTD salinity error.
625 c drift_errfile - drifter error.
626 c salterrfile - representation error due unresolved eddies
627 c temperrfile - representation error due unresolved eddies
628 c velerrfile - representation error
629
630 common /ecco_cost_c/
631 & hflux_errfile,
632 & hfluxm_errfile,
633 & sflux_errfile,
634 & sfluxm_errfile,
635 & tauu_errfile,
636 & tauum_errfile,
637 & tauv_errfile,
638 & tauvm_errfile,
639 & scatx_errfile,
640 & scaty_errfile,
641 & data_errfile,
642 & geoid_errfile,
643 & geoid_covariancefile,
644 & ssh_errfile,
645 & ctdt_errfile,
646 & ctds_errfile,
647 & drift_errfile,
648 & udrifterrfile,
649 & vdrifterrfile,
650 & salterrfile,
651 & temperrfile,
652 & velerrfile,
653 & atemp_errfile,
654 & aqh_errfile,
655 & precip_errfile,
656 & swflux_errfile,
657 & uwind_errfile,
658 & vwind_errfile
659 character*(MAX_LEN_FNAM) hflux_errfile
660 character*(MAX_LEN_FNAM) sflux_errfile
661 character*(MAX_LEN_FNAM) tauu_errfile
662 character*(MAX_LEN_FNAM) tauv_errfile
663 character*(MAX_LEN_FNAM) hfluxm_errfile
664 character*(MAX_LEN_FNAM) sfluxm_errfile
665 character*(MAX_LEN_FNAM) tauum_errfile
666 character*(MAX_LEN_FNAM) tauvm_errfile
667 character*(MAX_LEN_FNAM) scatx_errfile
668 character*(MAX_LEN_FNAM) scaty_errfile
669 character*(MAX_LEN_FNAM) data_errfile
670 character*(MAX_LEN_FNAM) geoid_errfile
671 character*(MAX_LEN_FNAM) geoid_covariancefile
672 character*(MAX_LEN_FNAM) ssh_errfile
673 character*(MAX_LEN_FNAM) ctdt_errfile
674 character*(MAX_LEN_FNAM) ctds_errfile
675 character*(MAX_LEN_FNAM) drift_errfile
676 character*(MAX_LEN_FNAM) udrifterrfile
677 character*(MAX_LEN_FNAM) vdrifterrfile
678 character*(MAX_LEN_FNAM) salterrfile
679 character*(MAX_LEN_FNAM) temperrfile
680 character*(MAX_LEN_FNAM) velerrfile
681 character*(MAX_LEN_FNAM) atemp_errfile
682 character*(MAX_LEN_FNAM) aqh_errfile
683 character*(MAX_LEN_FNAM) precip_errfile
684 character*(MAX_LEN_FNAM) swflux_errfile
685 character*(MAX_LEN_FNAM) uwind_errfile
686 character*(MAX_LEN_FNAM) vwind_errfile
687
688
689 c Arrays where the weights are stored:
690 c ====================================
691 c
692 c cosphi - cosine of latitude.
693 c whflux - weight for heat flux.
694 c wsflux - weight for salt flux.
695 c wtauu - weight for zonal wind stress.
696 c wtauu - weight for meridional wind stress.
697 c wscatx - weight for zonal scat stress.
698 c wscaty - weight for meridional scat stress.
699 c wtheta - weight for temperature.
700 c wtheta2 - representation error due to unresolved eddies
701 c wsst - weight for sea surface temperature.
702 c wsss - weight for sea surface salinity.
703 c wsalt - weight for salinity.
704 c wsalt2 - representation error due to unresolved eddies
705 c wtp - weight for TOPEX/POSEIDON data.
706 c wers - weight for ERS data.
707 c wp - weight for geoid.
708 c wctdt - weight for CTD temperature.
709 c wctds - weight for CTD salinity.
710 c wudrift - weight for mean zonal velocity from drifters.
711 c wvdrift - weight for mean meridional velocity from drifters.
712
713 common /ecco_cost_weights_r/
714 & frame,
715 & cosphi,
716 & whflux,wsflux,wtauu,wtauv,
717 & watemp,waqh,wprecip,wswflux,wuwind,wvwind,
718 & wscatx,wscaty,
719 & wtheta,wtheta2,wthetaLev,
720 & wsalt,wsalt2,wsaltLev,
721 & wsst,wsss,
722 & wtp,wers,
723 & wp,
724 & wctdt,wctds,
725 & wudrift,wvdrift,
726 & whfluxmm,wsfluxmm,
727 & wcurrent,wcurrent2,
728 & wcurrentLev,wbaro
729
730 _RL frame (1-olx:snx+olx,1-oly:sny+oly )
731 _RL cosphi (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
732 _RL whflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
733 _RL whfluxm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
734 _RL whfluxmm(1-olx:snx+olx,1-oly:sny+oly)
735 _RL wsflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
736 _RL wsfluxm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
737 _RL wsfluxmm(1-olx:snx+olx,1-oly:sny+oly)
738 _RL wtauu (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
739 _RL wtauv (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
740 _RL wtauum (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
741 _RL wtauvm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
742 _RL wscatx (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
743 _RL wscaty (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
744 _RL watemp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
745 _RL waqh (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
746 _RL wprecip (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
747 _RL wswflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
748 _RL wuwind (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
749 _RL wvwind (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
750 _RL wtheta ( nr,nsx,nsy)
751 _RL wsalt ( nr,nsx,nsy)
752 _RL wtheta2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
753 _RL wsalt2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
754 _RL wthetaLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
755 _RL wsaltLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
756 _RL wsst (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
757 _RL wsss (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
758 _RL wtp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
759 _RL wers (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
760 _RL wp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
761 _RL wctdt ( nr,nsx,nsy)
762 _RL wctds ( nr,nsx,nsy)
763 _RL wudrift (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
764 _RL wvdrift (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
765 _RL wcurrent( nr,nsx,nsy)
766 _RL wcurrent2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
767 _RL wcurrentLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
768 _RL wbaro
769
770 common /ecco_cost_weights_0_r/
771 & whflux0, wsflux0, wtau0,
772 & watemp0, waqh0, wprecip0, wswflux0, wwind0
773 _RL whflux0
774 _RL wsflux0
775 _RL wtau0
776 _RL watemp0
777 _RL waqh0
778 _RL wprecip0
779 _RL wswflux0
780 _RL wwind0
781
782 common /ecco_cost_weights_2_r/
783 & whflux2,wsflux2,wtauu2,wtauv2
784 _RL whflux2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
785 _RL wsflux2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
786 _RL wtauu2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
787 _RL wtauv2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
788
789
790
791 #if (defined (ALLOW_OBCSN_COST_CONTRIBUTION) || \
792 defined (ALLOW_OBCSN_CONTROL))
793 common /ecco_cost_weights_obcsn/
794 & wobcsn, wobcsnLev
795 _RL wobcsn ( nr,nobcs)
796 _RL wobcsnLev (1-olx:snx+olx,nr,nsx,nsy,nobcs)
797 #endif
798 #if (defined (ALLOW_OBCSS_COST_CONTRIBUTION) || \
799 defined (ALLOW_OBCSS_CONTROL))
800 common /ecco_cost_weights_obcss/
801 & wobcss, wobcssLev
802 _RL wobcss ( nr,nobcs)
803 _RL wobcssLev (1-olx:snx+olx,nr,nsx,nsy,nobcs)
804 #endif
805 #if (defined (ALLOW_OBCSW_COST_CONTRIBUTION) || \
806 defined (ALLOW_OBCSW_CONTROL))
807 common /ecco_cost_weights_obcsw/
808 & wobcsw, wobcswLev
809 _RL wobcsw ( nr,nobcs)
810 _RL wobcswLev (1-oly:sny+oly,nr,nsx,nsy,nobcs)
811 #endif
812 #if (defined (ALLOW_OBCSE_COST_CONTRIBUTION) || \
813 defined (ALLOW_OBCSE_CONTROL))
814 common /ecco_cost_weights_obcse/
815 & wobcse, wobcseLev
816 _RL wobcse ( nr,nobcs)
817 _RL wobcseLev (1-oly:sny+oly,nr,nsx,nsy,nobcs)
818 #endif
819
820
821 c Arrays that contain observations for the model-data comparison:
822 c ===============================================================
823 c
824 c tdat - reference temperature data.
825 c scatxdat - reference zonal wind stress.
826 c scatydat - reference meridional wind stress.
827 c sstdat - reference sea surface temperature data.
828 c tmidat - reference TMI sea surface temperature data.
829 c sssdat - reference sea surface temperature data.
830 c tauxmask - mask for reference wind stress data.
831 c tauymask - mask for reference wind stress data.
832 c scatxmask - mask for scat wind stress data.
833 c scatymask - mask for scat wind stress data.
834 c sstmask - mask for reference sea surface temperature data.
835 c tmimask - mask for reference sea surface temperature data.
836 c sssmask - mask for reference sea surface temperature data.
837 c sdat - reference salinity data.
838 c tpmean - reference mean sea surface height data.
839 c tpmeanmask - mask for reference mean sea surface height data.
840 c tpobs - TOPEX/POSEIDON data.
841 c tpmask - mask for TOPEX/POSEIDON data.
842 c ersobs - ERS data.
843 c ersmask - mask for ERS data.
844 c ctdtobs - CTD temperature data
845 c ctdsobs - CTD salinity data
846 c xbtobs - XBT data
847 c argot - ARGO temperature data
848 c argos - ARGO salt data
849 c udriftdat - drifters zonal velocities
850 c vdriftdat - drifters meridional velocities
851
852 common /ecco_cost_data_r/
853 & tdat,
854 & scatxdat,
855 & scatydat,
856 & sstdat,
857 & tmidat,
858 & sssdat,
859 & sstmask,
860 & tmimask,
861 & sssmask,
862 & tauxmask,
863 & tauymask,
864 & scatxmask,
865 & scatymask,
866 & sdat,
867 & tpmean,
868 & tpmeanmask,
869 & tpobs,
870 & tpmask,
871 & ersobs,
872 & ersmask,
873 & ctdtobs,
874 & ctdsobs,
875 & xbtobs,
876 & argotobs,
877 & argosobs,
878 & udriftdat,
879 & vdriftdat,
880 & curmtruobs,
881 & curmtrvobs
882
883 _RL tdat (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
884 _RL scatxdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
885 _RL scatydat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
886 _RL sstdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
887 _RL tmidat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
888 _RL sssdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
889 _RL tauxmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
890 _RL tauymask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
891 _RL scatxmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
892 _RL scatymask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
893 _RL sstmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
894 _RL tmimask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
895 _RL sssmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
896 _RL sdat (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
897 _RL tpmean (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
898 _RL tpmeanmask(1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
899 _RL tpobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
900 _RL tpmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
901 _RL ersobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
902 _RL ersmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
903 _RL ctdtobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
904 _RL ctdsobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
905 _RL xbtobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
906 _RL argotobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
907 _RL argosobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
908 _RL udriftdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
909 _RL vdriftdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
910 _RL curmtruobs(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
911 _RL curmtrvobs(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
912
913
914 c Files that contain obervations:
915 c ===============================
916 c
917 c tdatfile - reference data file for temperature.
918 c sdatfile - reference data file for salinity.
919 c scatxdatfile - reference data file for zonal wind stress.
920 c scatydatfile - reference data file for meridional wind stress.
921 c sstdatfile - reference data file for sea surface temperature.
922 c tmidatfile - reference data file for TMI sea surface temperature.
923 c topexmeanfile - reference data file for mean sea surface height.
924 c topexfile - reference data file for sea surface height data
925 c (TOPEX/POSEIDON).
926 c ersfile - reference data file for sea surface height data
927 c (ERS).
928 c ctdtfile, ctdsfile- reference data file for temperature and salinity
929 c from CTD
930 c ctdtclimfile, ctdsclimfile- reference data file for temperature
931 c and salinity from CTD with out timetag
932 c xbtfile - reference data file for xbt
933 c ARGOtfile - reference data file for ARGO
934 c ARGOsfile - reference data file for ARGO
935 c driftfile - reference data file for drifter's mean velocities
936
937 common /ecco_cost_data_c/
938 & tdatfile,
939 & sdatfile,
940 & scatxdatfile,
941 & scatydatfile,
942 & sstdatfile,
943 & tmidatfile,
944 & sssdatfile,
945 & topexmeanfile,
946 & topexfile,
947 & ersfile,
948 & ctdtfile,
949 & ctdsfile,
950 & ctdtclimfile,
951 & ctdsclimfile,
952 & xbtfile,
953 & argotfile,
954 & argosfile,
955 & udriftfile,
956 & vdriftfile,
957 & curmtrufile,
958 & curmtrvfile
959
960 character*(MAX_LEN_FNAM) tdatfile
961 character*(MAX_LEN_FNAM) sdatfile
962 character*(MAX_LEN_FNAM) scatxdatfile
963 character*(MAX_LEN_FNAM) scatydatfile
964 character*(MAX_LEN_FNAM) sstdatfile
965 character*(MAX_LEN_FNAM) tmidatfile
966 character*(MAX_LEN_FNAM) sssdatfile
967 character*(MAX_LEN_FNAM) topexmeanfile
968 character*(MAX_LEN_FNAM) topexfile
969 character*(MAX_LEN_FNAM) ersfile
970 character*(MAX_LEN_FNAM) ctdtfile
971 character*(MAX_LEN_FNAM) ctdsfile
972 character*(MAX_LEN_FNAM) ctdtclimfile
973 character*(MAX_LEN_FNAM) ctdsclimfile
974 character*(MAX_LEN_FNAM) xbtfile
975 character*(MAX_LEN_FNAM) argotfile
976 character*(MAX_LEN_FNAM) argosfile
977 character*(MAX_LEN_FNAM) argofile
978 character*(MAX_LEN_FNAM) udriftfile
979 character*(MAX_LEN_FNAM) vdriftfile
980 character*(MAX_LEN_FNAM) curmtrufile
981 character*(MAX_LEN_FNAM) curmtrvfile
982
983
984 c Flags used in the model-data comparison:
985 c ========================================
986 c
987 c using_ers - flag that indicates the use of ERS data
988
989 common /ecco_cost_data_flags/
990 & using_topex,
991 & using_ers
992 logical using_topex
993 logical using_ers
994
995 c Calendar information for the observations:
996 c ==========================================
997 c
998 c sststartdate - start date of the sea surface temperature data.
999 c tmistartdate - start date of the sea surface temperature data.
1000 c topexstartdate - start date of the sea surface height data.
1001 c ersstartdate - start date of the sea surface height data.
1002 c sshperiod - sampling interval for the sea surface height data.
1003
1004 common /ecco_cost_data_times_i/
1005 & scatxstartdate,
1006 & scatystartdate,
1007 & sststartdate,
1008 & argotstartdate,
1009 & argosstartdate,
1010 & tmistartdate,
1011 & sssstartdate,
1012 & topexstartdate,
1013 & ersstartdate
1014 integer scatxstartdate(4)
1015 integer scatystartdate(4)
1016 integer sststartdate(4)
1017 integer argotstartdate(4)
1018 integer argosstartdate(4)
1019 integer tmistartdate(4)
1020 integer sssstartdate(4)
1021 integer topexstartdate(4)
1022 integer ersstartdate(4)
1023
1024 common /ecco_cost_data_aux_i/
1025 & tmistartdate1,
1026 & tmistartdate2,
1027 & sststartdate1,
1028 & sststartdate2,
1029 & sssstartdate1,
1030 & sssstartdate2,
1031 & argotstartdate1,
1032 & argotstartdate2,
1033 & argosstartdate1,
1034 & argosstartdate2,
1035 & topexstartdate1,
1036 & topexstartdate2,
1037 & ersstartdate1,
1038 & ersstartdate2,
1039 & scatstartdate1,
1040 & scatstartdate2,
1041 & costIceStart1,
1042 & costIceStart2,
1043 & costIceEnd1,
1044 & costIceEnd2
1045
1046 integer tmistartdate1
1047 integer tmistartdate2
1048 integer sststartdate1
1049 integer sststartdate2
1050 integer sssstartdate1
1051 integer sssstartdate2
1052 integer argotstartdate1
1053 integer argotstartdate2
1054 integer argosstartdate1
1055 integer argosstartdate2
1056 integer topexstartdate1
1057 integer topexstartdate2
1058 integer ersstartdate1
1059 integer ersstartdate2
1060 integer scatstartdate1
1061 integer scatstartdate2
1062 integer costIceStart1
1063 integer costIceStart2
1064 integer costIceEnd1
1065 integer costIceEnd2
1066
1067 common /ecco_cost_data_times_r/
1068 & topexperiod,
1069 & ersperiod,
1070 & scatperiod,
1071 & costIceStart,
1072 & costIceEnd
1073 _RL topexperiod
1074 _RL ersperiod
1075 _RL scatperiod
1076 _RL costIceStart
1077 _RL costIceEnd
1078
1079 c cost_ice_flag - cost_ice flag (see cost_ice.F)
1080
1081 common /ecco_cost_ice_i/ cost_ice_flag
1082 integer cost_ice_flag
1083
1084 c ==================================================================
1085 c END OF HEADER COST
1086 c ==================================================================
1087
1088

  ViewVC Help
Powered by ViewVC 1.1.22