/[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.25 - (show annotations) (download)
Fri Aug 17 21:36:40 2007 UTC (16 years, 9 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint59f
Changes since 1.24: +24 -5 lines
File MIME type: text/plain
internal parameter controls: completements of implementations

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 ==================================================================
12 c HEADER AVERAGES
13 c ==================================================================
14
15 c Averaging counters:
16 c ===================
17 c
18 c sum1day - counter for the daily averaging
19 c sum1mon - counter for the monthly averaging
20 c dayrec - number of averaged surface pressure records.
21 c monrec - number of averaged theta and salinity records.
22
23 common /average_i/
24 & sum1day,sum1mon,sum1year,
25 & dayrec,monrec,yearrec
26 integer sum1day
27 integer sum1mon
28 integer sum1year
29 integer dayrec
30 integer monrec
31 integer yearrec
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_tp - Residual sea surface height contribution from T/P
260 c objf_ers - Residual sea surface height contribution from T/P
261 c objf_gfo - Residual sea surface height contribution from T/P
262 c objf_temp - Temperature contribution.
263 c objf_salt - Salinity contribution.
264 c objf_temp0 - Initial conditions Temperature contribution.
265 c objf_salt0 - Initial conditions Salinity contribution.
266 c objf_sst - Sea surface temperature contribution.
267 c objf_tmi - Sea surface temperature contribution.
268 c objf_sss - Sea surface salinity contribution.
269 c objf_ctdt - Temperature measurements from Woce CTD
270 c objf_ctds - Salinity measurements from Woce CTD
271 c objf_ctdtclim - Temperature measurements from Woce CTD without timetag
272 c objf_ctdsclim - Salinity measurements from Woce CTD without timetag
273 c objf_xbt - XBT temperature data
274 c objf_argot - ARGO temperature profiles
275 c objf_argos - ARGO salt profiles
276 c objf_scatxm - time-mean zonal SCAT contribution
277 c objf_scatym - time-mean meridional SCAT contribution
278 c objf_scatx - zonal SCAT contribution
279 c objf_scaty - meridional SCAT contribution
280 c objf_kapgm - kappa GM contribution
281 c objf_diffkr - diffusion contribution
282 c objf_theta_ini_fin - final vs. initial theta misfit
283 c objf_salt_ini_fin - final vs. initial salt misfit
284 c objf_eddytau - eddy stress contribution
285 c objf_bottomdrag - bottom drag contribution
286 c
287 c mult_"var" - multipliers for the individual cost
288 c function contributions.
289
290 common /ecco_cost_objf/
291 & objf_hflux,
292 & objf_hfluxm,
293 & objf_hfluxmm,
294 & objf_hfluxsmoo,
295 & objf_sflux,
296 & objf_sfluxm,
297 & objf_sfluxmm,
298 & objf_sfluxsmoo,
299 & objf_tauu,
300 & objf_tauum,
301 & objf_tauusmoo,
302 & objf_tauv,
303 & objf_tauvm,
304 & objf_tauvsmoo,
305 & objf_hmean,
306 & objf_h,
307 & objf_tp,
308 & objf_ers,
309 & objf_gfo,
310 & objf_temp,
311 & objf_salt,
312 & objf_temp0,
313 & objf_salt0,
314 & objf_temp0smoo,
315 & objf_salt0smoo,
316 & objf_sst,
317 & objf_tmi,
318 & objf_sss,
319 & objf_ctdt,
320 & objf_ctds,
321 & objf_ctdtclim,
322 & objf_ctdsclim,
323 & objf_xbt,
324 & objf_argot,
325 & objf_argos,
326 & objf_drift,
327 & objf_tdrift,
328 & objf_sdrift,
329 & objf_wdrift,
330 & objf_scatx,
331 & objf_scaty,
332 & objf_scatxm,
333 & objf_scatym,
334 & objf_atemp,
335 & objf_aqh,
336 & objf_precip,
337 & objf_swflux,
338 & objf_swdown,
339 & objf_snowprecip,
340 & objf_lwflux,
341 & objf_lwdown,
342 & objf_evap,
343 & objf_apressure,
344 & objf_runoff,
345 & objf_uwind,
346 & objf_vwind,
347 & objf_atempm,
348 & objf_aqhm,
349 & objf_precipm,
350 & objf_swfluxm,
351 & objf_swdownm,
352 & objf_snowprecipm,
353 & objf_lwfluxm,
354 & objf_lwdownm,
355 & objf_evapm,
356 & objf_apressurem,
357 & objf_runoffm,
358 & objf_uwindm,
359 & objf_vwindm,
360 & objf_atempsmoo,
361 & objf_aqhsmoo,
362 & objf_precipsmoo,
363 & objf_swfluxsmoo,
364 & objf_swdownsmoo,
365 & objf_snowprecipsmoo,
366 & objf_lwfluxsmoo,
367 & objf_lwdownsmoo,
368 & objf_evapsmoo,
369 & objf_apressuresmoo,
370 & objf_runoffsmoo,
371 & objf_uwindsmoo,
372 & objf_vwindsmoo,
373 & objf_obcsn,
374 & objf_obcss,
375 & objf_obcsw,
376 & objf_obcse,
377 & objf_obcsvol,
378 & objf_curmtr,
379 & objf_ageos,
380 & objf_kapgm,
381 & objf_diffkr,
382 & objf_theta_ini_fin,
383 & objf_salt_ini_fin,
384 & objf_eddytau,
385 & objf_bottomdrag
386 _RL objf_hflux (nsx,nsy)
387 _RL objf_hfluxm (nsx,nsy)
388 _RL objf_hfluxmm(nsx,nsy)
389 _RL objf_hfluxsmoo (nsx,nsy)
390 _RL objf_sflux (nsx,nsy)
391 _RL objf_sfluxm (nsx,nsy)
392 _RL objf_sfluxmm
393 _RL objf_sfluxsmoo (nsx,nsy)
394 _RL objf_tauu (nsx,nsy)
395 _RL objf_tauum (nsx,nsy)
396 _RL objf_tauusmoo (nsx,nsy)
397 _RL objf_tauv (nsx,nsy)
398 _RL objf_tauvm (nsx,nsy)
399 _RL objf_tauvsmoo (nsx,nsy)
400 _RL objf_hmean
401 _RL objf_h (nsx,nsy)
402 _RL objf_tp (nsx,nsy)
403 _RL objf_ers (nsx,nsy)
404 _RL objf_gfo (nsx,nsy)
405 _RL objf_temp (nsx,nsy)
406 _RL objf_salt (nsx,nsy)
407 _RL objf_temp0(nsx,nsy)
408 _RL objf_salt0(nsx,nsy)
409 _RL objf_temp0smoo(nsx,nsy)
410 _RL objf_salt0smoo(nsx,nsy)
411 _RL objf_sst (nsx,nsy)
412 _RL objf_tmi (nsx,nsy)
413 _RL objf_sss (nsx,nsy)
414 _RL objf_ctdt (nsx,nsy)
415 _RL objf_ctds (nsx,nsy)
416 _RL objf_ctdtclim (nsx,nsy)
417 _RL objf_ctdsclim (nsx,nsy)
418 _RL objf_xbt (nsx,nsy)
419 _RL objf_argot(nsx,nsy)
420 _RL objf_argos(nsx,nsy)
421 _RL objf_drift(nsx,nsy)
422 _RL objf_tdrift(nsx,nsy)
423 _RL objf_sdrift(nsx,nsy)
424 _RL objf_wdrift(nsx,nsy)
425 _RL objf_scatx(nsx,nsy)
426 _RL objf_scaty(nsx,nsy)
427 _RL objf_scatxm(nsx,nsy)
428 _RL objf_scatym(nsx,nsy)
429 _RL objf_atemp(nsx,nsy)
430 _RL objf_aqh (nsx,nsy)
431 _RL objf_precip(nsx,nsy)
432 _RL objf_swflux(nsx,nsy)
433 _RL objf_swdown(nsx,nsy)
434 _RL objf_snowprecip(nsx,nsy)
435 _RL objf_lwflux(nsx,nsy)
436 _RL objf_lwdown(nsx,nsy)
437 _RL objf_evap(nsx,nsy)
438 _RL objf_apressure(nsx,nsy)
439 _RL objf_runoff(nsx,nsy)
440 _RL objf_uwind(nsx,nsy)
441 _RL objf_vwind(nsx,nsy)
442 _RL objf_atempm(nsx,nsy)
443 _RL objf_aqhm (nsx,nsy)
444 _RL objf_precipm(nsx,nsy)
445 _RL objf_swfluxm(nsx,nsy)
446 _RL objf_swdownm(nsx,nsy)
447 _RL objf_snowprecipm(nsx,nsy)
448 _RL objf_lwfluxm(nsx,nsy)
449 _RL objf_lwdownm(nsx,nsy)
450 _RL objf_evapm(nsx,nsy)
451 _RL objf_apressurem(nsx,nsy)
452 _RL objf_runoffm(nsx,nsy)
453 _RL objf_uwindm(nsx,nsy)
454 _RL objf_vwindm(nsx,nsy)
455 _RL objf_atempsmoo(nsx,nsy)
456 _RL objf_aqhsmoo (nsx,nsy)
457 _RL objf_precipsmoo(nsx,nsy)
458 _RL objf_swfluxsmoo(nsx,nsy)
459 _RL objf_swdownsmoo(nsx,nsy)
460 _RL objf_snowprecipsmoo(nsx,nsy)
461 _RL objf_lwfluxsmoo(nsx,nsy)
462 _RL objf_lwdownsmoo(nsx,nsy)
463 _RL objf_evapsmoo(nsx,nsy)
464 _RL objf_apressuresmoo(nsx,nsy)
465 _RL objf_runoffsmoo(nsx,nsy)
466 _RL objf_uwindsmoo(nsx,nsy)
467 _RL objf_vwindsmoo(nsx,nsy)
468 _RL objf_obcsn(nsx,nsy)
469 _RL objf_obcss(nsx,nsy)
470 _RL objf_obcsw(nsx,nsy)
471 _RL objf_obcse(nsx,nsy)
472 _RL objf_obcsvol
473 _RL objf_curmtr(nsx,nsy)
474 _RL objf_ageos(nsx,nsy)
475 _RL objf_kapgm(nsx,nsy)
476 _RL objf_diffkr(nsx,nsy)
477 _RL objf_theta_ini_fin(nsx,nsy)
478 _RL objf_salt_ini_fin(nsx,nsy)
479 _RL objf_eddytau(nsx,nsy)
480 _RL objf_bottomdrag(nsx,nsy)
481
482 common /ecco_cost_num/
483 & num_hflux,
484 & num_hfluxm,
485 & num_hfluxmm,
486 & num_sflux,
487 & num_sfluxm,
488 & num_sfluxmm,
489 & num_tauu,
490 & num_tauum,
491 & num_tauv,
492 & num_tauvm,
493 & num_hmean,
494 & num_h,
495 & num_tp,
496 & num_ers,
497 & num_gfo,
498 & num_temp,
499 & num_salt,
500 & num_temp0,
501 & num_salt0,
502 & num_sst,
503 & num_tmi,
504 & num_sss,
505 & num_ctdt,
506 & num_ctds,
507 & num_ctdtclim,
508 & num_ctdsclim,
509 & num_xbt,
510 & num_argot,
511 & num_argos,
512 & num_drift,
513 & num_tdrift,
514 & num_sdrift,
515 & num_wdrift,
516 & num_scatx,
517 & num_scaty,
518 & num_scatxm,
519 & num_scatym,
520 & num_atemp,
521 & num_aqh,
522 & num_precip,
523 & num_swflux,
524 & num_swdown,
525 & num_snowprecip,
526 & num_lwflux,
527 & num_lwdown,
528 & num_evap,
529 & num_apressure,
530 & num_runoff,
531 & num_uwind,
532 & num_vwind,
533 & num_atempm,
534 & num_aqhm,
535 & num_precipm,
536 & num_swfluxm,
537 & num_swdownm,
538 & num_snowprecipm,
539 & num_lwfluxm,
540 & num_lwdownm,
541 & num_evapm,
542 & num_apressurem,
543 & num_runoffm,
544 & num_uwindm,
545 & num_vwindm,
546 & num_obcsn,
547 & num_obcss,
548 & num_obcsw,
549 & num_obcse,
550 & num_obcsvol,
551 & num_curmtr,
552 & num_ageos,
553 & num_kapgm,
554 & num_diffkr,
555 & num_theta_ini_fin,
556 & num_salt_ini_fin,
557 & num_eddytau,
558 & num_bottomdrag
559
560 _RL num_hflux (nsx,nsy)
561 _RL num_hfluxm (nsx,nsy)
562 _RL num_hfluxmm(nsx,nsy)
563 _RL num_sflux (nsx,nsy)
564 _RL num_sfluxm (nsx,nsy)
565 _RL num_sfluxmm(nsx,nsy)
566 _RL num_tauu (nsx,nsy)
567 _RL num_tauum (nsx,nsy)
568 _RL num_tauv (nsx,nsy)
569 _RL num_tauvm (nsx,nsy)
570 _RL num_hmean
571 _RL num_h (nsx,nsy)
572 _RL num_tp (nsx,nsy)
573 _RL num_ers (nsx,nsy)
574 _RL num_gfo (nsx,nsy)
575 _RL num_temp (nsx,nsy)
576 _RL num_salt (nsx,nsy)
577 _RL num_temp0(nsx,nsy)
578 _RL num_salt0(nsx,nsy)
579 _RL num_sst (nsx,nsy)
580 _RL num_tmi (nsx,nsy)
581 _RL num_sss (nsx,nsy)
582 _RL num_ctdt (nsx,nsy)
583 _RL num_ctds (nsx,nsy)
584 _RL num_ctdtclim (nsx,nsy)
585 _RL num_ctdsclim (nsx,nsy)
586 _RL num_xbt (nsx,nsy)
587 _RL num_argot(nsx,nsy)
588 _RL num_argos(nsx,nsy)
589 _RL num_drift(nsx,nsy)
590 _RL num_tdrift(nsx,nsy)
591 _RL num_sdrift(nsx,nsy)
592 _RL num_wdrift(nsx,nsy)
593 _RL num_scatx(nsx,nsy)
594 _RL num_scaty(nsx,nsy)
595 _RL num_scatxm(nsx,nsy)
596 _RL num_scatym(nsx,nsy)
597 _RL num_atemp(nsx,nsy)
598 _RL num_aqh (nsx,nsy)
599 _RL num_precip(nsx,nsy)
600 _RL num_swflux(nsx,nsy)
601 _RL num_swdown(nsx,nsy)
602 _RL num_snowprecip(nsx,nsy)
603 _RL num_lwflux(nsx,nsy)
604 _RL num_lwdown(nsx,nsy)
605 _RL num_evap(nsx,nsy)
606 _RL num_apressure(nsx,nsy)
607 _RL num_runoff(nsx,nsy)
608 _RL num_uwind(nsx,nsy)
609 _RL num_vwind(nsx,nsy)
610 _RL num_atempm(nsx,nsy)
611 _RL num_aqhm (nsx,nsy)
612 _RL num_precipm(nsx,nsy)
613 _RL num_swfluxm(nsx,nsy)
614 _RL num_swdownm(nsx,nsy)
615 _RL num_snowprecipm(nsx,nsy)
616 _RL num_lwfluxm(nsx,nsy)
617 _RL num_lwdownm(nsx,nsy)
618 _RL num_evapm(nsx,nsy)
619 _RL num_apressurem(nsx,nsy)
620 _RL num_runoffm(nsx,nsy)
621 _RL num_uwindm(nsx,nsy)
622 _RL num_vwindm(nsx,nsy)
623 _RL num_obcsn(nsx,nsy)
624 _RL num_obcss(nsx,nsy)
625 _RL num_obcsw(nsx,nsy)
626 _RL num_obcse(nsx,nsy)
627 _RL num_obcsvol
628 _RL num_curmtr(nsx,nsy)
629 _RL num_ageos(nsx,nsy)
630 _RL num_kapgm(nsx,nsy)
631 _RL num_diffkr(nsx,nsy)
632 _RL num_theta_ini_fin(nsx,nsy)
633 _RL num_salt_ini_fin(nsx,nsy)
634 _RL num_eddytau(nsx,nsy)
635 _RL num_bottomdrag(nsx,nsy)
636
637 common /ecco_cost_aux_r/
638 & mult_hflux,
639 & mult_sflux,
640 & mult_hfluxmm,
641 & mult_sfluxmm,
642 & mult_tauu,
643 & mult_tauv,
644 & mult_hmean,
645 & mult_h,
646 & mult_tp,
647 & mult_ers,
648 & mult_gfo,
649 & mult_temp,
650 & mult_salt,
651 & mult_temp0,
652 & mult_salt0,
653 & mult_sst,
654 & mult_tmi,
655 & mult_sss,
656 & mult_ctdt,
657 & mult_ctds,
658 & mult_ctdtclim,
659 & mult_ctdsclim,
660 & mult_xbt,
661 & mult_argot,
662 & mult_argos,
663 & mult_drift,
664 & mult_tdrift,
665 & mult_sdrift,
666 & mult_wdrift,
667 & mult_scatx,
668 & mult_scaty,
669 & mult_atemp,
670 & mult_aqh,
671 & mult_precip,
672 & mult_swflux,
673 & mult_swdown,
674 & mult_snowprecip,
675 & mult_lwflux,
676 & mult_lwdown,
677 & mult_evap,
678 & mult_apressure,
679 & mult_runoff,
680 & mult_uwind,
681 & mult_vwind,
682 & mult_obcsn,
683 & mult_obcss,
684 & mult_obcsw,
685 & mult_obcse,
686 & mult_obcsvol,
687 & mult_curmtr,
688 & mult_ageos,
689 & mult_kapgm,
690 & mult_diffkr,
691 & mult_ini_fin,
692 & mult_edtau,
693 & mult_bottomdrag,
694 & mult_smooth_ic,
695 & mult_smooth_bc
696 _RL mult_hflux
697 _RL mult_sflux
698 _RL mult_hfluxmm
699 _RL mult_sfluxmm
700 _RL mult_tauu
701 _RL mult_tauv
702 _RL mult_hmean
703 _RL mult_h
704 _RL mult_tp
705 _RL mult_ers
706 _RL mult_gfo
707 _RL mult_temp
708 _RL mult_salt
709 _RL mult_temp0
710 _RL mult_salt0
711 _RL mult_sst
712 _RL mult_tmi
713 _RL mult_sss
714 _RL mult_ctdt
715 _RL mult_ctds
716 _RL mult_ctdtclim
717 _RL mult_ctdsclim
718 _RL mult_xbt
719 _RL mult_argot
720 _RL mult_argos
721 _RL mult_drift
722 _RL mult_tdrift
723 _RL mult_sdrift
724 _RL mult_wdrift
725 _RL mult_scatx
726 _RL mult_scaty
727 _RL mult_atemp
728 _RL mult_aqh
729 _RL mult_precip
730 _RL mult_swflux
731 _RL mult_swdown
732 _RL mult_snowprecip
733 _RL mult_lwflux
734 _RL mult_lwdown
735 _RL mult_evap
736 _RL mult_apressure
737 _RL mult_runoff
738 _RL mult_uwind
739 _RL mult_vwind
740 _RL mult_obcsn
741 _RL mult_obcss
742 _RL mult_obcsw
743 _RL mult_obcse
744 _RL mult_obcsvol
745 _RL mult_curmtr
746 _RL mult_ageos
747 _RL mult_kapgm
748 _RL mult_diffkr
749 _RL mult_ini_fin
750 _RL mult_edtau
751 _RL mult_bottomdrag
752 _RL mult_smooth_ic
753 _RL mult_smooth_bc
754
755 c Record counters relevant for the cost function evaluation.
756 c ==========================================================
757 c
758 c nyearsrec - number of yearly records that will be generated by
759 c the current model integration.
760 c nmonsrec - number of monthly records that will be generated by
761 c the current model integration.
762 c ndaysrec - number of daily records that will be generated by
763 c the current model integration.
764
765 common /ecco_cost_i/
766 & nyearsrec,
767 & nmonsrec,
768 & ndaysrec,
769 & nnztbar,
770 & nnzsbar
771 integer nyearsrec
772 integer nmonsrec
773 integer ndaysrec
774 integer nnztbar
775 integer nnzsbar
776
777
778 c Data files for the weights used in the cost function:
779 c =====================================================
780 c
781 c hflux_errfile - heat flux error.
782 c sflux_errfile - salt flux error.
783 c tauu_errfile - zonal wind stress error.
784 c tauum_errfile - zonal wind stress error.
785 c tauv_errfile - meridional wind stress error.
786 c tauvm_errfile - meridional wind stress error.
787 c tscatx_errfile - zonal wind stress error.
788 c tscaty_errfile - meridional wind stress error.
789 c data_errfile - weights for theta, salt, and SST
790 c geoid_errfile - geoid error.
791 c geoid_covariancefile - geoid error covariance.
792 c ssh_errfile - sea surface height error.
793 c ctdt_errfile - CTD temperature error.
794 c ctds_errfile - CTD salinity error.
795 c drift_errfile - drifter error.
796 c salterrfile - representation error due unresolved eddies
797 c temperrfile - representation error due unresolved eddies
798 c velerrfile - representation error
799
800 common /ecco_cost_c/
801 & hflux_errfile,
802 & hfluxm_errfile,
803 & sflux_errfile,
804 & sfluxm_errfile,
805 & tauu_errfile,
806 & tauum_errfile,
807 & tauv_errfile,
808 & tauvm_errfile,
809 & scatx_errfile,
810 & scaty_errfile,
811 & data_errfile,
812 & geoid_errfile,
813 & geoid_covariancefile,
814 & ssh_errfile,
815 & tp_errfile,
816 & ers_errfile,
817 & gfo_errfile,
818 & ctdt_errfile,
819 & ctds_errfile,
820 & drift_errfile,
821 & udrifterrfile,
822 & vdrifterrfile,
823 & salterrfile,
824 & temperrfile,
825 & velerrfile,
826 & salt0errfile,
827 & temp0errfile,
828 & vel0errfile,
829 & atemp_errfile,
830 & aqh_errfile,
831 & precip_errfile,
832 & swflux_errfile,
833 & swdown_errfile,
834 & snowprecip_errfile,
835 & lwflux_errfile,
836 & lwdown_errfile,
837 & evap_errfile,
838 & apressure_errfile,
839 & runoff_errfile,
840 & edtau_errfile,
841 & kapgm_errfile,
842 & diffkr_errfile,
843 & bottomdrag_errfile,
844 & uwind_errfile,
845 & vwind_errfile
846 character*(MAX_LEN_FNAM) hflux_errfile
847 character*(MAX_LEN_FNAM) sflux_errfile
848 character*(MAX_LEN_FNAM) tauu_errfile
849 character*(MAX_LEN_FNAM) tauv_errfile
850 character*(MAX_LEN_FNAM) hfluxm_errfile
851 character*(MAX_LEN_FNAM) sfluxm_errfile
852 character*(MAX_LEN_FNAM) tauum_errfile
853 character*(MAX_LEN_FNAM) tauvm_errfile
854 character*(MAX_LEN_FNAM) scatx_errfile
855 character*(MAX_LEN_FNAM) scaty_errfile
856 character*(MAX_LEN_FNAM) data_errfile
857 character*(MAX_LEN_FNAM) geoid_errfile
858 character*(MAX_LEN_FNAM) geoid_covariancefile
859 character*(MAX_LEN_FNAM) ssh_errfile
860 character*(MAX_LEN_FNAM) tp_errfile
861 character*(MAX_LEN_FNAM) ers_errfile
862 character*(MAX_LEN_FNAM) gfo_errfile
863 character*(MAX_LEN_FNAM) ctdt_errfile
864 character*(MAX_LEN_FNAM) ctds_errfile
865 character*(MAX_LEN_FNAM) drift_errfile
866 character*(MAX_LEN_FNAM) udrifterrfile
867 character*(MAX_LEN_FNAM) vdrifterrfile
868 character*(MAX_LEN_FNAM) salterrfile
869 character*(MAX_LEN_FNAM) temperrfile
870 character*(MAX_LEN_FNAM) velerrfile
871 character*(MAX_LEN_FNAM) salt0errfile
872 character*(MAX_LEN_FNAM) temp0errfile
873 character*(MAX_LEN_FNAM) vel0errfile
874 character*(MAX_LEN_FNAM) atemp_errfile
875 character*(MAX_LEN_FNAM) aqh_errfile
876 character*(MAX_LEN_FNAM) precip_errfile
877 character*(MAX_LEN_FNAM) swflux_errfile
878 character*(MAX_LEN_FNAM) swdown_errfile
879 character*(MAX_LEN_FNAM) snowprecip_errfile
880 character*(MAX_LEN_FNAM) lwflux_errfile
881 character*(MAX_LEN_FNAM) lwdown_errfile
882 character*(MAX_LEN_FNAM) evap_errfile
883 character*(MAX_LEN_FNAM) apressure_errfile
884 character*(MAX_LEN_FNAM) runoff_errfile
885 character*(MAX_LEN_FNAM) edtau_errfile
886 character*(MAX_LEN_FNAM) kapgm_errfile
887 character*(MAX_LEN_FNAM) diffkr_errfile
888 character*(MAX_LEN_FNAM) bottomdrag_errfile
889 character*(MAX_LEN_FNAM) uwind_errfile
890 character*(MAX_LEN_FNAM) vwind_errfile
891
892
893 c Arrays where the weights are stored:
894 c ====================================
895 c
896 c cosphi - cosine of latitude.
897 c whflux - weight for heat flux.
898 c wsflux - weight for salt flux.
899 c wtauu - weight for zonal wind stress.
900 c wtauu - weight for meridional wind stress.
901 c wscatx - weight for zonal scat stress.
902 c wscaty - weight for meridional scat stress.
903 c wtheta - weight for temperature.
904 c wtheta2 - representation error due to unresolved eddies
905 c wsst - weight for sea surface temperature.
906 c wsss - weight for sea surface salinity.
907 c wsalt - weight for salinity.
908 c wsalt2 - representation error due to unresolved eddies
909 c wtp - weight for TOPEX/POSEIDON data.
910 c wers - weight for ERS data.
911 c wp - weight for geoid.
912 c wctdt - weight for CTD temperature.
913 c wctds - weight for CTD salinity.
914 c wudrift - weight for mean zonal velocity from drifters.
915 c wvdrift - weight for mean meridional velocity from drifters.
916
917 common /ecco_cost_weights_r/
918 & frame,
919 & cosphi,
920 & whflux,wsflux,wtauu,wtauv,
921 & watemp,waqh,wprecip,wsnowprecip,
922 & wswflux,wswdown,wlwflux,wlwdown,
923 & wevap,wapressure,wrunoff,
924 & wbottomdrag,
925 & wuwind,wvwind,
926 & wscatx,wscaty,
927 & wtheta,wtheta2,wthetaLev,
928 & wsalt,wsalt2,wsaltLev,
929 & wdiffkr,wdiffkr2,wdiffkrFld,
930 & wkapgm,wkapgm2,wkapgmFld,
931 & wedtaux,wedtaux2,wedtauxFld,
932 & wedtauy,wedtauy2,wedtauyFld,
933 & wsst,wsss,
934 & wtp,wers,wgfo,
935 & wp,
936 & wctdt,wctds,
937 & wudrift,wvdrift,
938 & whfluxmm,wsfluxmm,
939 & wcurrent,wcurrent2,
940 & wcurrentLev,wbaro
941
942 _RL frame (1-olx:snx+olx,1-oly:sny+oly )
943 _RL cosphi (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
944 _RL whflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
945 _RL whfluxm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
946 _RL whfluxmm(1-olx:snx+olx,1-oly:sny+oly)
947 _RL wsflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
948 _RL wsfluxm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
949 _RL wsfluxmm(1-olx:snx+olx,1-oly:sny+oly)
950 _RL wtauu (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
951 _RL wtauv (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
952 _RL wtauum (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
953 _RL wtauvm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
954 _RL wscatx (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
955 _RL wscaty (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
956 _RL watemp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
957 _RL waqh (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
958 _RL wprecip (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
959 _RL wswflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
960 _RL wswdown (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
961 _RL wsnowprecip (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
962 _RL wlwflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
963 _RL wlwdown (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
964 _RL wevap (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
965 _RL wapressure(1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
966 _RL wrunoff (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
967 _RL wbottomdrag (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
968 _RL wuwind (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
969 _RL wvwind (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
970 _RL wtheta ( nr,nsx,nsy)
971 _RL wsalt ( nr,nsx,nsy)
972 _RL wtheta2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
973 _RL wsalt2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
974 _RL wthetaLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
975 _RL wsaltLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
976 _RL wsst (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
977 _RL wsss (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
978 _RL wtp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
979 _RL wers (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
980 _RL wgfo (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
981 _RL wp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
982 _RL wctdt ( nr,nsx,nsy)
983 _RL wctds ( nr,nsx,nsy)
984 _RL wudrift (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
985 _RL wvdrift (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
986 _RL wcurrent( nr,nsx,nsy)
987 _RL wcurrent2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
988 _RL wcurrentLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
989 _RL wbaro
990 _RL wdiffkr ( nr,nsx,nsy)
991 _RL wdiffkr2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
992 _RL wdiffkrFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
993 _RL wkapgm ( nr,nsx,nsy)
994 _RL wkapgm2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
995 _RL wkapgmFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
996 _RL wedtaux ( nr,nsx,nsy)
997 _RL wedtaux2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
998 _RL wedtauxFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
999 _RL wedtauy ( nr,nsx,nsy)
1000 _RL wedtauy2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1001 _RL wedtauyFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1002
1003 common /ecco_cost_weights_0_r/
1004 & whflux0, wsflux0, wtau0,
1005 & watemp0, waqh0, wprecip0, wsnowprecip0, wwind0,
1006 & wswflux0, wswdown0, wlwflux0, wlwdown0,
1007 & wevap0, wapressure0, wrunoff0,
1008 & wbottomdrag0,wdiffkr0, wkapgm0, wedtau0
1009 _RL whflux0
1010 _RL wsflux0
1011 _RL wtau0
1012 _RL watemp0
1013 _RL waqh0
1014 _RL wprecip0
1015 _RL wswflux0
1016 _RL wswdown0
1017 _RL wsnowprecip0
1018 _RL wlwflux0
1019 _RL wlwdown0
1020 _RL wevap0
1021 _RL wapressure0
1022 _RL wrunoff0
1023 _RL wbottomdrag0
1024 _RL wwind0
1025 _RL wdiffkr0
1026 _RL wkapgm0
1027 _RL wedtau0
1028
1029 common /ecco_cost_weights_mean_r/
1030 & wmean_hflux, wmean_sflux, wmean_tau,
1031 & wmean_atemp, wmean_aqh,
1032 & wmean_precip, wmean_snowprecip, wmean_wind,
1033 & wmean_swflux, wmean_swdown, wmean_lwflux, wmean_lwdown,
1034 & wmean_evap, wmean_apressure, wmean_runoff
1035 _RL wmean_hflux
1036 _RL wmean_sflux
1037 _RL wmean_tau
1038 _RL wmean_atemp
1039 _RL wmean_aqh
1040 _RL wmean_precip
1041 _RL wmean_swflux
1042 _RL wmean_swdown
1043 _RL wmean_snowprecip
1044 _RL wmean_lwflux
1045 _RL wmean_lwdown
1046 _RL wmean_evap
1047 _RL wmean_apressure
1048 _RL wmean_runoff
1049 _RL wmean_wind
1050
1051 common /ecco_cost_weights_2_r/
1052 & whflux2,wsflux2,wtauu2,wtauv2
1053 _RL whflux2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1054 _RL wsflux2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1055 _RL wtauu2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1056 _RL wtauv2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1057
1058
1059
1060 #if (defined (ALLOW_OBCSN_COST_CONTRIBUTION) || \
1061 defined (ALLOW_OBCSN_CONTROL))
1062 common /ecco_cost_weights_obcsn/
1063 & wobcsn, wobcsnLev
1064 _RL wobcsn ( nr,nobcs)
1065 _RL wobcsnLev (1-olx:snx+olx,nr,nsx,nsy,nobcs)
1066 #endif
1067 #if (defined (ALLOW_OBCSS_COST_CONTRIBUTION) || \
1068 defined (ALLOW_OBCSS_CONTROL))
1069 common /ecco_cost_weights_obcss/
1070 & wobcss, wobcssLev
1071 _RL wobcss ( nr,nobcs)
1072 _RL wobcssLev (1-olx:snx+olx,nr,nsx,nsy,nobcs)
1073 #endif
1074 #if (defined (ALLOW_OBCSW_COST_CONTRIBUTION) || \
1075 defined (ALLOW_OBCSW_CONTROL))
1076 common /ecco_cost_weights_obcsw/
1077 & wobcsw, wobcswLev
1078 _RL wobcsw ( nr,nobcs)
1079 _RL wobcswLev (1-oly:sny+oly,nr,nsx,nsy,nobcs)
1080 #endif
1081 #if (defined (ALLOW_OBCSE_COST_CONTRIBUTION) || \
1082 defined (ALLOW_OBCSE_CONTROL))
1083 common /ecco_cost_weights_obcse/
1084 & wobcse, wobcseLev
1085 _RL wobcse ( nr,nobcs)
1086 _RL wobcseLev (1-oly:sny+oly,nr,nsx,nsy,nobcs)
1087 #endif
1088
1089
1090 c Arrays that contain observations for the model-data comparison:
1091 c ===============================================================
1092 c
1093 c tdat - reference temperature data.
1094 c scatxdat - reference zonal wind stress.
1095 c scatydat - reference meridional wind stress.
1096 c sstdat - reference sea surface temperature data.
1097 c tmidat - reference TMI sea surface temperature data.
1098 c sssdat - reference sea surface temperature data.
1099 c tauxmask - mask for reference wind stress data.
1100 c tauymask - mask for reference wind stress data.
1101 c scatxmask - mask for scat wind stress data.
1102 c scatymask - mask for scat wind stress data.
1103 c sstmask - mask for reference sea surface temperature data.
1104 c tmimask - mask for reference sea surface temperature data.
1105 c sssmask - mask for reference sea surface temperature data.
1106 c sdat - reference salinity data.
1107 c tpmean - reference mean sea surface height data.
1108 c tpmeanmask - mask for reference mean sea surface height data.
1109 c tpobs - TOPEX/POSEIDON data.
1110 c tpmask - mask for TOPEX/POSEIDON data.
1111 c ersobs - ERS data.
1112 c ersmask - mask for ERS data.
1113 c ctdtobs - CTD temperature data
1114 c ctdsobs - CTD salinity data
1115 c xbtobs - XBT data
1116 c argot - ARGO temperature data
1117 c argos - ARGO salt data
1118 c udriftdat - drifters zonal velocities
1119 c vdriftdat - drifters meridional velocities
1120
1121 common /ecco_cost_data_r/
1122 & tdat,
1123 & scatxdat,
1124 & scatydat,
1125 & sstdat,
1126 & tmidat,
1127 & sssdat,
1128 & sstmask,
1129 & tmimask,
1130 & sssmask,
1131 & tauxmask,
1132 & tauymask,
1133 & scatxmask,
1134 & scatymask,
1135 & sdat,
1136 & tpmean,
1137 & tpmeanmask,
1138 & tpobs,
1139 & tpmask,
1140 & ersobs,
1141 & ersmask,
1142 & gfoobs,
1143 & gfomask,
1144 & ctdtobs,
1145 & ctdsobs,
1146 & xbtobs,
1147 & argotobs,
1148 & argosobs,
1149 & udriftdat,
1150 & vdriftdat,
1151 & curmtruobs,
1152 & curmtrvobs
1153
1154 _RL tdat (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1155 _RL scatxdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1156 _RL scatydat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1157 _RL sstdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1158 _RL tmidat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1159 _RL sssdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1160 _RL tauxmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1161 _RL tauymask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1162 _RL scatxmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1163 _RL scatymask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1164 _RL sstmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1165 _RL tmimask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1166 _RL sssmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1167 _RL sdat (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1168 _RL tpmean (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1169 _RL tpmeanmask(1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1170 _RL tpobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1171 _RL tpmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1172 _RL ersobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1173 _RL ersmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1174 _RL gfoobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1175 _RL gfomask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1176 _RL ctdtobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1177 _RL ctdsobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1178 _RL xbtobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1179 _RL argotobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1180 _RL argosobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1181 _RL udriftdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1182 _RL vdriftdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1183 _RL curmtruobs(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1184 _RL curmtrvobs(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1185
1186
1187 c Files that contain obervations:
1188 c ===============================
1189 c
1190 c tdatfile - reference data file for temperature.
1191 c sdatfile - reference data file for salinity.
1192 c scatxdatfile - reference data file for zonal wind stress.
1193 c scatydatfile - reference data file for meridional wind stress.
1194 c sstdatfile - reference data file for sea surface temperature.
1195 c tmidatfile - reference data file for TMI sea surface temperature.
1196 c topexmeanfile - reference data file for mean sea surface height.
1197 c topexfile - reference data file for sea surface height data
1198 c (TOPEX/POSEIDON).
1199 c ersfile - reference data file for sea surface height data
1200 c (ERS).
1201 c ctdtfile, ctdsfile- reference data file for temperature and salinity
1202 c from CTD
1203 c ctdtclimfile, ctdsclimfile- reference data file for temperature
1204 c and salinity from CTD with out timetag
1205 c xbtfile - reference data file for xbt
1206 c ARGOtfile - reference data file for ARGO
1207 c ARGOsfile - reference data file for ARGO
1208 c driftfile - reference data file for drifter's mean velocities
1209
1210 common /ecco_cost_data_c/
1211 & tdatfile,
1212 & sdatfile,
1213 & scatxdatfile,
1214 & scatydatfile,
1215 & sstdatfile,
1216 & tmidatfile,
1217 & sssdatfile,
1218 & topexmeanfile,
1219 & topexfile,
1220 & ersfile,
1221 & gfofile,
1222 & ctdtfile,
1223 & ctdsfile,
1224 & ctdtclimfile,
1225 & ctdsclimfile,
1226 & xbtfile,
1227 & argotfile,
1228 & argosfile,
1229 & udriftfile,
1230 & vdriftfile,
1231 & curmtrufile,
1232 & curmtrvfile
1233
1234 character*(MAX_LEN_FNAM) tdatfile
1235 character*(MAX_LEN_FNAM) sdatfile
1236 character*(MAX_LEN_FNAM) scatxdatfile
1237 character*(MAX_LEN_FNAM) scatydatfile
1238 character*(MAX_LEN_FNAM) sstdatfile
1239 character*(MAX_LEN_FNAM) tmidatfile
1240 character*(MAX_LEN_FNAM) sssdatfile
1241 character*(MAX_LEN_FNAM) topexmeanfile
1242 character*(MAX_LEN_FNAM) topexfile
1243 character*(MAX_LEN_FNAM) ersfile
1244 character*(MAX_LEN_FNAM) gfofile
1245 character*(MAX_LEN_FNAM) ctdtfile
1246 character*(MAX_LEN_FNAM) ctdsfile
1247 character*(MAX_LEN_FNAM) ctdtclimfile
1248 character*(MAX_LEN_FNAM) ctdsclimfile
1249 character*(MAX_LEN_FNAM) xbtfile
1250 character*(MAX_LEN_FNAM) argotfile
1251 character*(MAX_LEN_FNAM) argosfile
1252 character*(MAX_LEN_FNAM) argofile
1253 character*(MAX_LEN_FNAM) udriftfile
1254 character*(MAX_LEN_FNAM) vdriftfile
1255 character*(MAX_LEN_FNAM) curmtrufile
1256 character*(MAX_LEN_FNAM) curmtrvfile
1257
1258
1259 c Flags used in the model-data comparison:
1260 c ========================================
1261 c
1262 c using_ers - flag that indicates the use of ERS data
1263
1264 common /ecco_cost_data_flags/
1265 & using_topex,
1266 & using_ers,
1267 & using_gfo
1268 logical using_topex
1269 logical using_ers
1270 logical using_gfo
1271
1272 c Calendar information for the observations:
1273 c ==========================================
1274 c
1275 c sststartdate - start date of the sea surface temperature data.
1276 c tmistartdate - start date of the sea surface temperature data.
1277 c topexstartdate - start date of the sea surface height data.
1278 c ersstartdate - start date of the sea surface height data.
1279 c sshperiod - sampling interval for the sea surface height data.
1280
1281 common /ecco_cost_data_times_i/
1282 & scatxstartdate,
1283 & scatystartdate,
1284 & sststartdate,
1285 & argotstartdate,
1286 & argosstartdate,
1287 & tmistartdate,
1288 & sssstartdate,
1289 & topexstartdate,
1290 & ersstartdate,
1291 & gfostartdate
1292 integer scatxstartdate(4)
1293 integer scatystartdate(4)
1294 integer sststartdate(4)
1295 integer argotstartdate(4)
1296 integer argosstartdate(4)
1297 integer tmistartdate(4)
1298 integer sssstartdate(4)
1299 integer topexstartdate(4)
1300 integer ersstartdate(4)
1301 integer gfostartdate(4)
1302
1303 common /ecco_cost_data_aux_i/
1304 & tmistartdate1,
1305 & tmistartdate2,
1306 & sststartdate1,
1307 & sststartdate2,
1308 & sssstartdate1,
1309 & sssstartdate2,
1310 & argotstartdate1,
1311 & argotstartdate2,
1312 & argosstartdate1,
1313 & argosstartdate2,
1314 & topexstartdate1,
1315 & topexstartdate2,
1316 & ersstartdate1,
1317 & ersstartdate2,
1318 & gfostartdate1,
1319 & gfostartdate2,
1320 & scatstartdate1,
1321 & scatstartdate2
1322
1323 integer tmistartdate1
1324 integer tmistartdate2
1325 integer sststartdate1
1326 integer sststartdate2
1327 integer sssstartdate1
1328 integer sssstartdate2
1329 integer argotstartdate1
1330 integer argotstartdate2
1331 integer argosstartdate1
1332 integer argosstartdate2
1333 integer topexstartdate1
1334 integer topexstartdate2
1335 integer ersstartdate1
1336 integer ersstartdate2
1337 integer gfostartdate1
1338 integer gfostartdate2
1339 integer scatstartdate1
1340 integer scatstartdate2
1341
1342 common /ecco_cost_data_times_r/
1343 & topexperiod,
1344 & ersperiod,
1345 & gfoperiod,
1346 & scatperiod
1347 _RL topexperiod
1348 _RL ersperiod
1349 _RL gfoperiod
1350 _RL scatperiod
1351
1352 common /ecco_cost_data_detrend/
1353 & topexintercept,
1354 & ersintercept,
1355 & gfointercept,
1356 & topexslope,
1357 & ersslope,
1358 & gfoslope
1359 _RL topexintercept
1360 _RL ersintercept
1361 _RL gfointercept
1362 _RL topexslope
1363 _RL ersslope
1364 _RL gfoslope
1365
1366 c ==================================================================
1367 c END OF HEADER COST
1368 c ==================================================================
1369
1370

  ViewVC Help
Powered by ViewVC 1.1.22