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

  ViewVC Help
Powered by ViewVC 1.1.22