/[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.30 - (show annotations) (download)
Tue Oct 9 00:02:51 2007 UTC (16 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint59m, checkpoint59l, checkpoint59i, checkpoint59k, checkpoint59j
Changes since 1.29: +44 -42 lines
File MIME type: text/plain
add missing cvs $Header:$ or $Name:$

1 C $Header: $
2 C $Name: $
3
4 c ==================================================================
5 c HEADER AVERAGES
6 c ==================================================================
7 c
8 c o Header for averaged temperature, salinity, and surface pressure
9 c fields and counters associated with the averaging.
10 c
11 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
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,sum1year,
27 & dayrec,monrec,yearrec
28 integer sum1day
29 integer sum1mon
30 integer sum1year
31 integer dayrec
32 integer monrec
33 integer yearrec
34
35 c Number of Generic Cost terms:
36 c =============================
37 INTEGER NGENCOST
38 PARAMETER ( NGENCOST=10 )
39
40 c Averaged Fields:
41 c ================
42 c
43 c tbar - contains the averaged temperature field after the call
44 c to subroutine POST_MONTHLY. Before, it accumulates the
45 c intantaneous temperatures.
46 c sbar - contains the averaged salinity field after the call
47 c to subroutine POST_MONTHLY. Before, it accumulates the
48 c intantaneous salinities.
49 c psbar - contains the averaged surface pressure field after the call
50 c to subroutine POST_DAILY. Before, it accumulates the
51 c intantaneous surface pressure field.
52 c ubar - contains the averaged zonal velocity component for the
53 c whole integration period. Before, it accumulates the
54 c intantaneous field.
55 c vbar - contains the averaged zonal velocity component for the
56 c whole integration period. Before, it accumulates the
57 c intantaneous field.
58 c tauxbar - contains the averaged zonal velocity component for the
59 c whole integration period. Before, it accumulates the
60 c intantaneous field.
61 c tauybar - contains the averaged zonal velocity component for the
62 c whole integration period. Before, it accumulates the
63 c intantaneous field.
64 c hfluxbar - contains the averaged zonal velocity component for the
65 c whole integration period. Before, it accumulates the
66 c intantaneous field.
67 c sfluxbar - contains the averaged zonal velocity component for the
68 c whole integration period. Before, it accumulates the
69 c intantaneous field.
70
71 common /averages_r/
72 & tbar,
73 & sbar,
74 & psbar,
75 & bpbar,
76 & ubar,
77 & vbar,
78 & wbar,
79 & tauxbar,
80 & tauybar,
81 & hfluxbar,
82 & sfluxbar,
83 & Slmean,
84 & Tlmean,
85 & wlmean,
86 & Sfmean,
87 & Tfmean,
88 & sbar_gen,
89 & tbar_gen,
90 & wfmean
91
92 #if (defined (ALLOW_THETA_COST_CONTRIBUTION) || \
93 defined (ALLOW_CTDT_COST_CONTRIBUTION) || \
94 defined (ALLOW_XBT_COST_CONTRIBUTION) || \
95 defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \
96 defined (ALLOW_OBCS_COST_CONTRIBUTION))
97 _RL tbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
98 #else
99 #ifdef ALLOW_SST_COST_CONTRIBUTION
100 _RL tbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
101 #else
102 _RL tbar
103 #endif
104 #endif
105 #ifdef GENERIC_BAR_MONTH
106 _RL tbar_gen (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
107 _RL sbar_gen (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
108 #else
109 _RL tbar_gen
110 _RL sbar_gen
111 #endif
112
113 #if (defined (ALLOW_SALT_COST_CONTRIBUTION) || \
114 defined (ALLOW_CTDS_COST_CONTRIBUTION) || \
115 defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \
116 defined (ALLOW_OBCS_COST_CONTRIBUTION))
117 _RL sbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
118 #else
119 #ifdef ALLOW_SSS_COST_CONTRIBUTION
120 _RL sbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
121 #else
122 _RL sbar
123 #endif
124 #endif
125
126 #ifdef ALLOW_SSH_COST_CONTRIBUTION
127 _RL psbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
128 #else
129 _RL psbar
130 #endif
131
132 #ifdef ALLOW_BP_COST_CONTRIBUTION
133 _RL bpbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
134 #else
135 _RL bpbar
136 #endif
137
138 #if (defined (ALLOW_DRIFTER_COST_CONTRIBUTION) || \
139 defined (ALLOW_OBCS_COST_CONTRIBUTION))
140 _RL ubar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
141 _RL vbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
142 #else
143 _RL ubar
144 _RL vbar
145 #endif
146
147 #ifdef ALLOW_DRIFTW_COST_CONTRIBUTION
148 _RL wbar (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
149 #else
150 _RL wbar
151 #endif
152
153 #ifdef ALLOW_DRIFT_COST_CONTRIBUTION
154 _RL Tlmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
155 _RL Slmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
156 _RL Tfmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
157 _RL Sfmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
158 #else
159 _RL Tlmean
160 _RL Slmean
161 _RL Tfmean
162 _RL Sfmean
163 #endif
164
165 #ifdef ALLOW_DRIFTW_COST_CONTRIBUTION
166 _RL wlmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
167 _RL wfmean(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
168 #else
169 _RL wlmean
170 _RL wfmean
171 #endif
172
173 #ifdef ALLOW_SCAT_COST_CONTRIBUTION
174 _RL tauxbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
175 _RL tauybar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
176 #else
177 _RL tauxbar
178 _RL tauybar
179 #endif
180
181 #ifdef ALLOW_MEAN_HFLUX_COST_CONTRIBUTION
182 _RL hfluxbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
183 #else
184 _RL hfluxbar
185 #endif
186
187 #ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION
188 _RL sfluxbar (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
189 #else
190 _RL sfluxbar
191 #endif
192
193
194 common /averages_c/
195 & tbarfile,
196 & sbarfile,
197 & psbarfile,
198 & bpbarfile,
199 & ubarfile,
200 & vbarfile,
201 & wbarfile,
202 & tauxbarfile,
203 & tauybarfile,
204 & hfluxbarfile,
205 & sfluxbarfile,
206 & costTranspDataFile
207 character*(MAX_LEN_FNAM) tbarfile
208 character*(MAX_LEN_FNAM) sbarfile
209 character*(MAX_LEN_FNAM) psbarfile
210 character*(MAX_LEN_FNAM) bpbarfile
211 character*(MAX_LEN_FNAM) ubarfile
212 character*(MAX_LEN_FNAM) vbarfile
213 character*(MAX_LEN_FNAM) wbarfile
214 character*(MAX_LEN_FNAM) tauxbarfile
215 character*(MAX_LEN_FNAM) tauybarfile
216 character*(MAX_LEN_FNAM) hfluxbarfile
217 character*(MAX_LEN_FNAM) sfluxbarfile
218 character*(MAX_LEN_FNAM) costTranspDataFile
219
220 #ifdef ALLOW_TRANSPORT_COST_CONTRIBUTION
221 INTEGER maxNumDays
222 PARAMETER ( maxNumDays = 5480 )
223 common /averages_transp_r/
224 & transpbar
225 & , transpobs
226 & , wtransp
227 _RL transpbar(maxNumDays,nsx,nsy)
228 _RL transpobs(maxNumDays)
229 _RL wtransp(maxNumDays)
230 #endif
231
232 c file precision and field type
233
234 common /prec_type_cost/
235 & cost_iprec,
236 & cost_yftype
237
238 integer cost_iprec
239 character*(2) cost_yftype
240
241 c ==================================================================
242 c END OF HEADER AVERAGES
243 c ==================================================================
244
245
246
247 c ==================================================================
248 c HEADER COST
249 c ==================================================================
250 c
251 c o Header for model-data comparison.
252 c
253 c The individual cost function contributions are multiplied by
254 c factors mult_"var" which allow to switch off these contributions
255 c without removing them in the adjoint code. This is useful for
256 c doing tests with the adjoint and perhaps useful in assimilation
257 c experiments where individual contributions are successively
258 c switched on. For future applications it would be better to place
259 c the initialisation of the multipliers somewhere else, for example
260 c in a namelist, which is read in at the start of the model.
261 c
262 c started: Christian Eckert eckert@mit.edu 24-Feb-1999
263 c
264 c changed: Christian Eckert eckert@mit.edu
265 c
266 c
267 c ==================================================================
268 c HEADER COST
269 c ==================================================================
270
271
272 c The cost function, its contributions, and multipliers:
273 c ======================================================
274 c
275 c fc - Final cost function.
276 c objf_hflux - Heat flux contribution.
277 c objf_sflux - Salt flux contribution.
278 c objf_tauu - Zonal wind stress contribution.
279 c objf_tauv - Meridional wind stress contribution.
280 c objf_hfluxm - time-mean Heat flux contribution.
281 c objf_sfluxm - time-mean Salt flux contribution.
282 c objf_tauum - time-mean Zonal wind stress contribution.
283 c objf_tauvm - time-mean Meridional wind stress contribution.
284 c objf_hfluxmm - Global time-mean Heat flux contribution.
285 c objf_sfluxmm - Global time-mean Salt flux contribution.
286 c objf_hmean - Mean sea surface height contribution.
287 c objf_h - Residual sea surface height contribution.
288 c objf_tp - Residual sea surface height contribution from T/P
289 c objf_ers - Residual sea surface height contribution from T/P
290 c objf_gfo - Residual sea surface height contribution from T/P
291 c objf_temp - Temperature contribution.
292 c objf_salt - Salinity contribution.
293 c objf_temp0 - Initial conditions Temperature contribution.
294 c objf_salt0 - Initial conditions Salinity contribution.
295 c objf_sst - Sea surface temperature contribution.
296 c objf_tmi - Sea surface temperature contribution.
297 c objf_sss - Sea surface salinity contribution.
298 c objf_ctdt - Temperature measurements from Woce CTD
299 c objf_ctds - Salinity measurements from Woce CTD
300 c objf_ctdtclim - Temperature measurements from Woce CTD without timetag
301 c objf_ctdsclim - Salinity measurements from Woce CTD without timetag
302 c objf_xbt - XBT temperature data
303 c objf_argot - ARGO temperature profiles
304 c objf_argos - ARGO salt profiles
305 c objf_gencost - gencost user defined contribution
306 c objf_scatxm - time-mean zonal SCAT contribution
307 c objf_scatym - time-mean meridional SCAT contribution
308 c objf_scatx - zonal SCAT contribution
309 c objf_scaty - meridional SCAT contribution
310 c objf_kapgm - kappa GM contribution
311 c objf_diffkr - diffusion contribution
312 c objf_theta_ini_fin - final vs. initial theta misfit
313 c objf_salt_ini_fin - final vs. initial salt misfit
314 c objf_eddytau - eddy stress contribution
315 c objf_bottomdrag - bottom drag contribution
316 c
317 c mult_"var" - multipliers for the individual cost
318 c function contributions.
319
320 common /ecco_cost_objf/
321 & objf_hflux,
322 & objf_hfluxm,
323 & objf_hfluxmm,
324 & objf_hfluxsmoo,
325 & objf_sflux,
326 & objf_sfluxm,
327 & objf_sfluxmm,
328 & objf_sfluxsmoo,
329 & objf_tauu,
330 & objf_tauum,
331 & objf_tauusmoo,
332 & objf_tauv,
333 & objf_tauvm,
334 & objf_tauvsmoo,
335 & objf_hmean,
336 & objf_h,
337 & objf_tp,
338 & objf_ers,
339 & objf_gfo,
340 & objf_temp,
341 & objf_salt,
342 & objf_temp0,
343 & objf_salt0,
344 & objf_temp0smoo,
345 & objf_salt0smoo,
346 & objf_sst,
347 & objf_tmi,
348 & objf_sss,
349 & objf_bp,
350 & objf_ctdt,
351 & objf_ctds,
352 & objf_ctdtclim,
353 & objf_ctdsclim,
354 & objf_xbt,
355 & objf_argot,
356 & objf_argos,
357 & objf_gencost,
358 & objf_drift,
359 & objf_tdrift,
360 & objf_sdrift,
361 & objf_wdrift,
362 & objf_scatx,
363 & objf_scaty,
364 & objf_scatxm,
365 & objf_scatym,
366 & objf_atemp,
367 & objf_aqh,
368 & objf_precip,
369 & objf_swflux,
370 & objf_swdown,
371 & objf_snowprecip,
372 & objf_lwflux,
373 & objf_lwdown,
374 & objf_evap,
375 & objf_apressure,
376 & objf_runoff,
377 & objf_uwind,
378 & objf_vwind,
379 & objf_atempm,
380 & objf_aqhm,
381 & objf_precipm,
382 & objf_swfluxm,
383 & objf_swdownm,
384 & objf_snowprecipm,
385 & objf_lwfluxm,
386 & objf_lwdownm,
387 & objf_evapm,
388 & objf_apressurem,
389 & objf_runoffm,
390 & objf_uwindm,
391 & objf_vwindm,
392 & objf_atempsmoo,
393 & objf_aqhsmoo,
394 & objf_precipsmoo,
395 & objf_swfluxsmoo,
396 & objf_swdownsmoo,
397 & objf_snowprecipsmoo,
398 & objf_lwfluxsmoo,
399 & objf_lwdownsmoo,
400 & objf_evapsmoo,
401 & objf_apressuresmoo,
402 & objf_runoffsmoo,
403 & objf_uwindsmoo,
404 & objf_vwindsmoo,
405 & objf_obcsn,
406 & objf_obcss,
407 & objf_obcsw,
408 & objf_obcse,
409 & objf_obcsvol,
410 & objf_curmtr,
411 & objf_ageos,
412 & objf_kapgm,
413 & objf_diffkr,
414 & objf_theta_ini_fin,
415 & objf_salt_ini_fin,
416 & objf_eddytau,
417 & objf_bottomdrag,
418 & objf_transp
419 _RL objf_hflux (nsx,nsy)
420 _RL objf_hfluxm (nsx,nsy)
421 _RL objf_hfluxmm
422 _RL objf_hfluxsmoo (nsx,nsy)
423 _RL objf_sflux (nsx,nsy)
424 _RL objf_sfluxm (nsx,nsy)
425 _RL objf_sfluxmm
426 _RL objf_sfluxsmoo (nsx,nsy)
427 _RL objf_tauu (nsx,nsy)
428 _RL objf_tauum (nsx,nsy)
429 _RL objf_tauusmoo (nsx,nsy)
430 _RL objf_tauv (nsx,nsy)
431 _RL objf_tauvm (nsx,nsy)
432 _RL objf_tauvsmoo (nsx,nsy)
433 _RL objf_hmean
434 _RL objf_h (nsx,nsy)
435 _RL objf_tp (nsx,nsy)
436 _RL objf_ers (nsx,nsy)
437 _RL objf_gfo (nsx,nsy)
438 _RL objf_temp (nsx,nsy)
439 _RL objf_salt (nsx,nsy)
440 _RL objf_temp0(nsx,nsy)
441 _RL objf_salt0(nsx,nsy)
442 _RL objf_temp0smoo(nsx,nsy)
443 _RL objf_salt0smoo(nsx,nsy)
444 _RL objf_sst (nsx,nsy)
445 _RL objf_tmi (nsx,nsy)
446 _RL objf_sss (nsx,nsy)
447 _RL objf_bp (nsx,nsy)
448 _RL objf_ctdt (nsx,nsy)
449 _RL objf_ctds (nsx,nsy)
450 _RL objf_ctdtclim (nsx,nsy)
451 _RL objf_ctdsclim (nsx,nsy)
452 _RL objf_xbt (nsx,nsy)
453 _RL objf_argot(nsx,nsy)
454 _RL objf_argos(nsx,nsy)
455 _RL objf_gencost(NGENCOST,nsx,nsy)
456 _RL objf_drift(nsx,nsy)
457 _RL objf_tdrift(nsx,nsy)
458 _RL objf_sdrift(nsx,nsy)
459 _RL objf_wdrift(nsx,nsy)
460 _RL objf_scatx(nsx,nsy)
461 _RL objf_scaty(nsx,nsy)
462 _RL objf_scatxm(nsx,nsy)
463 _RL objf_scatym(nsx,nsy)
464 _RL objf_atemp(nsx,nsy)
465 _RL objf_aqh (nsx,nsy)
466 _RL objf_precip(nsx,nsy)
467 _RL objf_swflux(nsx,nsy)
468 _RL objf_swdown(nsx,nsy)
469 _RL objf_snowprecip(nsx,nsy)
470 _RL objf_lwflux(nsx,nsy)
471 _RL objf_lwdown(nsx,nsy)
472 _RL objf_evap(nsx,nsy)
473 _RL objf_apressure(nsx,nsy)
474 _RL objf_runoff(nsx,nsy)
475 _RL objf_uwind(nsx,nsy)
476 _RL objf_vwind(nsx,nsy)
477 _RL objf_atempm(nsx,nsy)
478 _RL objf_aqhm (nsx,nsy)
479 _RL objf_precipm(nsx,nsy)
480 _RL objf_swfluxm(nsx,nsy)
481 _RL objf_swdownm(nsx,nsy)
482 _RL objf_snowprecipm(nsx,nsy)
483 _RL objf_lwfluxm(nsx,nsy)
484 _RL objf_lwdownm(nsx,nsy)
485 _RL objf_evapm(nsx,nsy)
486 _RL objf_apressurem(nsx,nsy)
487 _RL objf_runoffm(nsx,nsy)
488 _RL objf_uwindm(nsx,nsy)
489 _RL objf_vwindm(nsx,nsy)
490 _RL objf_atempsmoo(nsx,nsy)
491 _RL objf_aqhsmoo (nsx,nsy)
492 _RL objf_precipsmoo(nsx,nsy)
493 _RL objf_swfluxsmoo(nsx,nsy)
494 _RL objf_swdownsmoo(nsx,nsy)
495 _RL objf_snowprecipsmoo(nsx,nsy)
496 _RL objf_lwfluxsmoo(nsx,nsy)
497 _RL objf_lwdownsmoo(nsx,nsy)
498 _RL objf_evapsmoo(nsx,nsy)
499 _RL objf_apressuresmoo(nsx,nsy)
500 _RL objf_runoffsmoo(nsx,nsy)
501 _RL objf_uwindsmoo(nsx,nsy)
502 _RL objf_vwindsmoo(nsx,nsy)
503 _RL objf_obcsn(nsx,nsy)
504 _RL objf_obcss(nsx,nsy)
505 _RL objf_obcsw(nsx,nsy)
506 _RL objf_obcse(nsx,nsy)
507 _RL objf_obcsvol
508 _RL objf_curmtr(nsx,nsy)
509 _RL objf_ageos(nsx,nsy)
510 _RL objf_kapgm(nsx,nsy)
511 _RL objf_diffkr(nsx,nsy)
512 _RL objf_theta_ini_fin(nsx,nsy)
513 _RL objf_salt_ini_fin(nsx,nsy)
514 _RL objf_eddytau(nsx,nsy)
515 _RL objf_bottomdrag(nsx,nsy)
516 _RL objf_transp
517
518 common /ecco_cost_num/
519 & num_hflux,
520 & num_hfluxm,
521 & num_hfluxmm,
522 & num_sflux,
523 & num_sfluxm,
524 & num_sfluxmm,
525 & num_tauu,
526 & num_tauum,
527 & num_tauv,
528 & num_tauvm,
529 & num_hmean,
530 & num_h,
531 & num_tp,
532 & num_ers,
533 & num_gfo,
534 & num_temp,
535 & num_salt,
536 & num_temp0,
537 & num_salt0,
538 & num_sst,
539 & num_tmi,
540 & num_sss,
541 & num_bp,
542 & num_ctdt,
543 & num_ctds,
544 & num_ctdtclim,
545 & num_ctdsclim,
546 & num_xbt,
547 & num_argot,
548 & num_argos,
549 & num_gencost,
550 & num_drift,
551 & num_tdrift,
552 & num_sdrift,
553 & num_wdrift,
554 & num_scatx,
555 & num_scaty,
556 & num_scatxm,
557 & num_scatym,
558 & num_atemp,
559 & num_aqh,
560 & num_precip,
561 & num_swflux,
562 & num_swdown,
563 & num_snowprecip,
564 & num_lwflux,
565 & num_lwdown,
566 & num_evap,
567 & num_apressure,
568 & num_runoff,
569 & num_uwind,
570 & num_vwind,
571 & num_atempm,
572 & num_aqhm,
573 & num_precipm,
574 & num_swfluxm,
575 & num_swdownm,
576 & num_snowprecipm,
577 & num_lwfluxm,
578 & num_lwdownm,
579 & num_evapm,
580 & num_apressurem,
581 & num_runoffm,
582 & num_uwindm,
583 & num_vwindm,
584 & num_obcsn,
585 & num_obcss,
586 & num_obcsw,
587 & num_obcse,
588 & num_obcsvol,
589 & num_curmtr,
590 & num_ageos,
591 & num_kapgm,
592 & num_diffkr,
593 & num_theta_ini_fin,
594 & num_salt_ini_fin,
595 & num_eddytau,
596 & num_bottomdrag,
597 & num_transp
598
599 _RL num_hflux (nsx,nsy)
600 _RL num_hfluxm (nsx,nsy)
601 _RL num_hfluxmm(nsx,nsy)
602 _RL num_sflux (nsx,nsy)
603 _RL num_sfluxm (nsx,nsy)
604 _RL num_sfluxmm(nsx,nsy)
605 _RL num_tauu (nsx,nsy)
606 _RL num_tauum (nsx,nsy)
607 _RL num_tauv (nsx,nsy)
608 _RL num_tauvm (nsx,nsy)
609 _RL num_hmean
610 _RL num_h (nsx,nsy)
611 _RL num_tp (nsx,nsy)
612 _RL num_ers (nsx,nsy)
613 _RL num_gfo (nsx,nsy)
614 _RL num_temp (nsx,nsy)
615 _RL num_salt (nsx,nsy)
616 _RL num_temp0(nsx,nsy)
617 _RL num_salt0(nsx,nsy)
618 _RL num_sst (nsx,nsy)
619 _RL num_tmi (nsx,nsy)
620 _RL num_sss (nsx,nsy)
621 _RL num_bp (nsx,nsy)
622 _RL num_ctdt (nsx,nsy)
623 _RL num_ctds (nsx,nsy)
624 _RL num_ctdtclim (nsx,nsy)
625 _RL num_ctdsclim (nsx,nsy)
626 _RL num_xbt (nsx,nsy)
627 _RL num_argot(nsx,nsy)
628 _RL num_argos(nsx,nsy)
629 _RL num_gencost(NGENCOST,nsx,nsy)
630 _RL num_drift(nsx,nsy)
631 _RL num_tdrift(nsx,nsy)
632 _RL num_sdrift(nsx,nsy)
633 _RL num_wdrift(nsx,nsy)
634 _RL num_scatx(nsx,nsy)
635 _RL num_scaty(nsx,nsy)
636 _RL num_scatxm(nsx,nsy)
637 _RL num_scatym(nsx,nsy)
638 _RL num_atemp(nsx,nsy)
639 _RL num_aqh (nsx,nsy)
640 _RL num_precip(nsx,nsy)
641 _RL num_swflux(nsx,nsy)
642 _RL num_swdown(nsx,nsy)
643 _RL num_snowprecip(nsx,nsy)
644 _RL num_lwflux(nsx,nsy)
645 _RL num_lwdown(nsx,nsy)
646 _RL num_evap(nsx,nsy)
647 _RL num_apressure(nsx,nsy)
648 _RL num_runoff(nsx,nsy)
649 _RL num_uwind(nsx,nsy)
650 _RL num_vwind(nsx,nsy)
651 _RL num_atempm(nsx,nsy)
652 _RL num_aqhm (nsx,nsy)
653 _RL num_precipm(nsx,nsy)
654 _RL num_swfluxm(nsx,nsy)
655 _RL num_swdownm(nsx,nsy)
656 _RL num_snowprecipm(nsx,nsy)
657 _RL num_lwfluxm(nsx,nsy)
658 _RL num_lwdownm(nsx,nsy)
659 _RL num_evapm(nsx,nsy)
660 _RL num_apressurem(nsx,nsy)
661 _RL num_runoffm(nsx,nsy)
662 _RL num_uwindm(nsx,nsy)
663 _RL num_vwindm(nsx,nsy)
664 _RL num_obcsn(nsx,nsy)
665 _RL num_obcss(nsx,nsy)
666 _RL num_obcsw(nsx,nsy)
667 _RL num_obcse(nsx,nsy)
668 _RL num_obcsvol
669 _RL num_curmtr(nsx,nsy)
670 _RL num_ageos(nsx,nsy)
671 _RL num_kapgm(nsx,nsy)
672 _RL num_diffkr(nsx,nsy)
673 _RL num_theta_ini_fin(nsx,nsy)
674 _RL num_salt_ini_fin(nsx,nsy)
675 _RL num_eddytau(nsx,nsy)
676 _RL num_bottomdrag(nsx,nsy)
677 _RL num_transp
678
679 common /ecco_cost_aux_r/
680 & mult_hflux,
681 & mult_sflux,
682 & mult_hfluxmm,
683 & mult_sfluxmm,
684 & mult_tauu,
685 & mult_tauv,
686 & mult_hmean,
687 & mult_h,
688 & mult_tp,
689 & mult_ers,
690 & mult_gfo,
691 & mult_temp,
692 & mult_salt,
693 & mult_temp0,
694 & mult_salt0,
695 & mult_sst,
696 & mult_tmi,
697 & mult_sss,
698 & mult_bp,
699 & mult_ctdt,
700 & mult_ctds,
701 & mult_ctdtclim,
702 & mult_ctdsclim,
703 & mult_xbt,
704 & mult_argot,
705 & mult_argos,
706 & mult_gencost,
707 & mult_drift,
708 & mult_tdrift,
709 & mult_sdrift,
710 & mult_wdrift,
711 & mult_scatx,
712 & mult_scaty,
713 & mult_atemp,
714 & mult_aqh,
715 & mult_precip,
716 & mult_swflux,
717 & mult_swdown,
718 & mult_snowprecip,
719 & mult_lwflux,
720 & mult_lwdown,
721 & mult_evap,
722 & mult_apressure,
723 & mult_runoff,
724 & mult_uwind,
725 & mult_vwind,
726 & mult_obcsn,
727 & mult_obcss,
728 & mult_obcsw,
729 & mult_obcse,
730 & mult_obcsvol,
731 & mult_curmtr,
732 & mult_ageos,
733 & mult_kapgm,
734 & mult_diffkr,
735 & mult_ini_fin,
736 & mult_edtau,
737 & mult_bottomdrag,
738 & mult_smooth_ic,
739 & mult_smooth_bc,
740 & mult_transp
741 _RL mult_hflux
742 _RL mult_sflux
743 _RL mult_hfluxmm
744 _RL mult_sfluxmm
745 _RL mult_tauu
746 _RL mult_tauv
747 _RL mult_hmean
748 _RL mult_h
749 _RL mult_tp
750 _RL mult_ers
751 _RL mult_gfo
752 _RL mult_temp
753 _RL mult_salt
754 _RL mult_temp0
755 _RL mult_salt0
756 _RL mult_sst
757 _RL mult_tmi
758 _RL mult_sss
759 _RL mult_bp
760 _RL mult_ctdt
761 _RL mult_ctds
762 _RL mult_ctdtclim
763 _RL mult_ctdsclim
764 _RL mult_xbt
765 _RL mult_argot
766 _RL mult_argos
767 _RL mult_gencost(NGENCOST)
768 _RL mult_drift
769 _RL mult_tdrift
770 _RL mult_sdrift
771 _RL mult_wdrift
772 _RL mult_scatx
773 _RL mult_scaty
774 _RL mult_atemp
775 _RL mult_aqh
776 _RL mult_precip
777 _RL mult_swflux
778 _RL mult_swdown
779 _RL mult_snowprecip
780 _RL mult_lwflux
781 _RL mult_lwdown
782 _RL mult_evap
783 _RL mult_apressure
784 _RL mult_runoff
785 _RL mult_uwind
786 _RL mult_vwind
787 _RL mult_obcsn
788 _RL mult_obcss
789 _RL mult_obcsw
790 _RL mult_obcse
791 _RL mult_obcsvol
792 _RL mult_curmtr
793 _RL mult_ageos
794 _RL mult_kapgm
795 _RL mult_diffkr
796 _RL mult_ini_fin
797 _RL mult_edtau
798 _RL mult_bottomdrag
799 _RL mult_smooth_ic
800 _RL mult_smooth_bc
801 _RL mult_transp
802
803 c Record counters relevant for the cost function evaluation.
804 c ==========================================================
805 c
806 c nyearsrec - number of yearly records that will be generated by
807 c the current model integration.
808 c nmonsrec - number of monthly records that will be generated by
809 c the current model integration.
810 c ndaysrec - number of daily records that will be generated by
811 c the current model integration.
812
813 common /ecco_cost_i/
814 & nyearsrec,
815 & nmonsrec,
816 & ndaysrec,
817 & nnztbar,
818 & nnzsbar
819 integer nyearsrec
820 integer nmonsrec
821 integer ndaysrec
822 integer nnztbar
823 integer nnzsbar
824
825
826 c Data files for the weights used in the cost function:
827 c =====================================================
828 c
829 c hflux_errfile - heat flux error.
830 c sflux_errfile - salt flux error.
831 c tauu_errfile - zonal wind stress error.
832 c tauum_errfile - zonal wind stress error.
833 c tauv_errfile - meridional wind stress error.
834 c tauvm_errfile - meridional wind stress error.
835 c tscatx_errfile - zonal wind stress error.
836 c tscaty_errfile - meridional wind stress error.
837 c data_errfile - weights for theta, salt, and SST
838 c geoid_errfile - geoid error.
839 c geoid_covariancefile - geoid error covariance.
840 c ssh_errfile - sea surface height error.
841 c ctdt_errfile - CTD temperature error.
842 c ctds_errfile - CTD salinity error.
843 c drift_errfile - drifter error.
844 c salterrfile - representation error due unresolved eddies
845 c temperrfile - representation error due unresolved eddies
846 c velerrfile - representation error
847
848 common /ecco_cost_c/
849 & hflux_errfile,
850 & hfluxm_errfile,
851 & sflux_errfile,
852 & sfluxm_errfile,
853 & tauu_errfile,
854 & tauum_errfile,
855 & tauv_errfile,
856 & tauvm_errfile,
857 & scatx_errfile,
858 & scaty_errfile,
859 & data_errfile,
860 & geoid_errfile,
861 & geoid_covariancefile,
862 & ssh_errfile,
863 & tp_errfile,
864 & ers_errfile,
865 & gfo_errfile,
866 & ctdt_errfile,
867 & ctds_errfile,
868 & drift_errfile,
869 & udrifterrfile,
870 & vdrifterrfile,
871 & salterrfile,
872 & temperrfile,
873 & velerrfile,
874 & salt0errfile,
875 & temp0errfile,
876 & vel0errfile,
877 & atemp_errfile,
878 & aqh_errfile,
879 & precip_errfile,
880 & swflux_errfile,
881 & swdown_errfile,
882 & snowprecip_errfile,
883 & lwflux_errfile,
884 & lwdown_errfile,
885 & evap_errfile,
886 & apressure_errfile,
887 & runoff_errfile,
888 & edtau_errfile,
889 & kapgm_errfile,
890 & diffkr_errfile,
891 & bottomdrag_errfile,
892 & gencost_errfile,
893 & uwind_errfile,
894 & vwind_errfile
895 character*(MAX_LEN_FNAM) hflux_errfile
896 character*(MAX_LEN_FNAM) sflux_errfile
897 character*(MAX_LEN_FNAM) tauu_errfile
898 character*(MAX_LEN_FNAM) tauv_errfile
899 character*(MAX_LEN_FNAM) hfluxm_errfile
900 character*(MAX_LEN_FNAM) sfluxm_errfile
901 character*(MAX_LEN_FNAM) tauum_errfile
902 character*(MAX_LEN_FNAM) tauvm_errfile
903 character*(MAX_LEN_FNAM) scatx_errfile
904 character*(MAX_LEN_FNAM) scaty_errfile
905 character*(MAX_LEN_FNAM) data_errfile
906 character*(MAX_LEN_FNAM) geoid_errfile
907 character*(MAX_LEN_FNAM) geoid_covariancefile
908 character*(MAX_LEN_FNAM) ssh_errfile
909 character*(MAX_LEN_FNAM) tp_errfile
910 character*(MAX_LEN_FNAM) ers_errfile
911 character*(MAX_LEN_FNAM) gfo_errfile
912 character*(MAX_LEN_FNAM) ctdt_errfile
913 character*(MAX_LEN_FNAM) ctds_errfile
914 character*(MAX_LEN_FNAM) drift_errfile
915 character*(MAX_LEN_FNAM) udrifterrfile
916 character*(MAX_LEN_FNAM) vdrifterrfile
917 character*(MAX_LEN_FNAM) salterrfile
918 character*(MAX_LEN_FNAM) temperrfile
919 character*(MAX_LEN_FNAM) velerrfile
920 character*(MAX_LEN_FNAM) salt0errfile
921 character*(MAX_LEN_FNAM) temp0errfile
922 character*(MAX_LEN_FNAM) vel0errfile
923 character*(MAX_LEN_FNAM) atemp_errfile
924 character*(MAX_LEN_FNAM) aqh_errfile
925 character*(MAX_LEN_FNAM) precip_errfile
926 character*(MAX_LEN_FNAM) swflux_errfile
927 character*(MAX_LEN_FNAM) swdown_errfile
928 character*(MAX_LEN_FNAM) snowprecip_errfile
929 character*(MAX_LEN_FNAM) lwflux_errfile
930 character*(MAX_LEN_FNAM) lwdown_errfile
931 character*(MAX_LEN_FNAM) evap_errfile
932 character*(MAX_LEN_FNAM) apressure_errfile
933 character*(MAX_LEN_FNAM) runoff_errfile
934 character*(MAX_LEN_FNAM) edtau_errfile
935 character*(MAX_LEN_FNAM) kapgm_errfile
936 character*(MAX_LEN_FNAM) diffkr_errfile
937 character*(MAX_LEN_FNAM) bottomdrag_errfile
938 character*(MAX_LEN_FNAM) gencost_errfile(NGENCOST)
939 character*(MAX_LEN_FNAM) uwind_errfile
940 character*(MAX_LEN_FNAM) vwind_errfile
941
942
943 c Arrays where the weights are stored:
944 c ====================================
945 c
946 c cosphi - cosine of latitude.
947 c whflux - weight for heat flux.
948 c wsflux - weight for salt flux.
949 c wtauu - weight for zonal wind stress.
950 c wtauu - weight for meridional wind stress.
951 c wscatx - weight for zonal scat stress.
952 c wscaty - weight for meridional scat stress.
953 c wtheta - weight for temperature.
954 c wtheta2 - representation error due to unresolved eddies
955 c wsst - weight for sea surface temperature.
956 c wsss - weight for sea surface salinity.
957 c wsalt - weight for salinity.
958 c wsalt2 - representation error due to unresolved eddies
959 c wtp - weight for TOPEX/POSEIDON data.
960 c wers - weight for ERS data.
961 c wp - weight for geoid.
962 c wctdt - weight for CTD temperature.
963 c wctds - weight for CTD salinity.
964 c wudrift - weight for mean zonal velocity from drifters.
965 c wvdrift - weight for mean meridional velocity from drifters.
966
967 common /ecco_cost_weights_r/
968 & frame,
969 & cosphi,
970 & whflux,wsflux,wtauu,wtauv,
971 & watemp,waqh,wprecip,wsnowprecip,
972 & wswflux,wswdown,wlwflux,wlwdown,
973 & wevap,wapressure,wrunoff,
974 & wbottomdrag,
975 & wuwind,wvwind,
976 & wscatx,wscaty,
977 & wtheta,wtheta2,wthetaLev,
978 & wsalt,wsalt2,wsaltLev,
979 & wdiffkr,wdiffkr2,wdiffkrFld,
980 & wkapgm,wkapgm2,wkapgmFld,
981 & wedtaux,wedtaux2,wedtauxFld,
982 & wedtauy,wedtauy2,wedtauyFld,
983 & wsst,wsss,wbp,
984 & wtp,wers,wgfo,
985 & wp,
986 & wctdt,wctds,
987 & wudrift,wvdrift,
988 & whfluxmm,wsfluxmm,
989 & wcurrent,wcurrent2,
990 & wcurrentLev,wbaro
991
992 _RL frame (1-olx:snx+olx,1-oly:sny+oly )
993 _RL cosphi (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
994 _RL whflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
995 _RL whfluxm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
996 _RL whfluxmm(1-olx:snx+olx,1-oly:sny+oly)
997 _RL wsflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
998 _RL wsfluxm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
999 _RL wsfluxmm(1-olx:snx+olx,1-oly:sny+oly)
1000 _RL wtauu (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1001 _RL wtauv (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1002 _RL wtauum (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1003 _RL wtauvm (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1004 _RL wscatx (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1005 _RL wscaty (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1006 _RL watemp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1007 _RL waqh (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1008 _RL wprecip (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1009 _RL wswflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1010 _RL wswdown (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1011 _RL wsnowprecip (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1012 _RL wlwflux (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1013 _RL wlwdown (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1014 _RL wevap (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1015 _RL wapressure(1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1016 _RL wrunoff (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1017 _RL wbottomdrag (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
1018 _RL wuwind (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1019 _RL wvwind (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1020 _RL wtheta ( nr,nsx,nsy)
1021 _RL wsalt ( nr,nsx,nsy)
1022 _RL wtheta2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1023 _RL wsalt2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1024 _RL wthetaLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1025 _RL wsaltLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1026 _RL wsst (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1027 _RL wsss (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1028 _RL wbp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1029 _RL wtp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1030 _RL wers (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1031 _RL wgfo (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1032 _RL wp (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1033 _RL wctdt ( nr,nsx,nsy)
1034 _RL wctds ( nr,nsx,nsy)
1035 _RL wudrift (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1036 _RL wvdrift (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1037 _RL wcurrent( nr,nsx,nsy)
1038 _RL wcurrent2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1039 _RL wcurrentLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1040 _RL wbaro
1041 _RL wdiffkr ( nr,nsx,nsy)
1042 _RL wdiffkr2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1043 _RL wdiffkrFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1044 _RL wkapgm ( nr,nsx,nsy)
1045 _RL wkapgm2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1046 _RL wkapgmFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1047 _RL wedtaux ( nr,nsx,nsy)
1048 _RL wedtaux2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1049 _RL wedtauxFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1050 _RL wedtauy ( nr,nsx,nsy)
1051 _RL wedtauy2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1052 _RL wedtauyFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1053
1054 common /ecco_cost_weights_0_r/
1055 & whflux0, wsflux0, wtau0,
1056 & watemp0, waqh0, wprecip0, wsnowprecip0, wwind0,
1057 & wswflux0, wswdown0, wlwflux0, wlwdown0,
1058 & wevap0, wapressure0, wrunoff0,
1059 & wbottomdrag0,wdiffkr0, wkapgm0, wedtau0
1060 _RL whflux0
1061 _RL wsflux0
1062 _RL wtau0
1063 _RL watemp0
1064 _RL waqh0
1065 _RL wprecip0
1066 _RL wswflux0
1067 _RL wswdown0
1068 _RL wsnowprecip0
1069 _RL wlwflux0
1070 _RL wlwdown0
1071 _RL wevap0
1072 _RL wapressure0
1073 _RL wrunoff0
1074 _RL wbottomdrag0
1075 _RL wwind0
1076 _RL wdiffkr0
1077 _RL wkapgm0
1078 _RL wedtau0
1079
1080 common /ecco_cost_weights_mean_r/
1081 & wmean_hflux, wmean_sflux, wmean_tau,
1082 & wmean_atemp, wmean_aqh,
1083 & wmean_precip, wmean_snowprecip, wmean_wind,
1084 & wmean_swflux, wmean_swdown, wmean_lwflux, wmean_lwdown,
1085 & wmean_evap, wmean_apressure, wmean_runoff
1086 _RL wmean_hflux
1087 _RL wmean_sflux
1088 _RL wmean_tau
1089 _RL wmean_atemp
1090 _RL wmean_aqh
1091 _RL wmean_precip
1092 _RL wmean_swflux
1093 _RL wmean_swdown
1094 _RL wmean_snowprecip
1095 _RL wmean_lwflux
1096 _RL wmean_lwdown
1097 _RL wmean_evap
1098 _RL wmean_apressure
1099 _RL wmean_runoff
1100 _RL wmean_wind
1101
1102 common /ecco_cost_weights_2_r/
1103 & whflux2,wsflux2,wtauu2,wtauv2
1104 _RL whflux2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1105 _RL wsflux2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1106 _RL wtauu2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1107 _RL wtauv2 (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1108
1109
1110
1111 #if (defined (ALLOW_OBCSN_COST_CONTRIBUTION) || \
1112 defined (ALLOW_OBCSN_CONTROL))
1113 common /ecco_cost_weights_obcsn/
1114 & wobcsn, wobcsnLev
1115 _RL wobcsn ( nr,nobcs)
1116 _RL wobcsnLev (1-olx:snx+olx,nr,nsx,nsy,nobcs)
1117 #endif
1118 #if (defined (ALLOW_OBCSS_COST_CONTRIBUTION) || \
1119 defined (ALLOW_OBCSS_CONTROL))
1120 common /ecco_cost_weights_obcss/
1121 & wobcss, wobcssLev
1122 _RL wobcss ( nr,nobcs)
1123 _RL wobcssLev (1-olx:snx+olx,nr,nsx,nsy,nobcs)
1124 #endif
1125 #if (defined (ALLOW_OBCSW_COST_CONTRIBUTION) || \
1126 defined (ALLOW_OBCSW_CONTROL))
1127 common /ecco_cost_weights_obcsw/
1128 & wobcsw, wobcswLev
1129 _RL wobcsw ( nr,nobcs)
1130 _RL wobcswLev (1-oly:sny+oly,nr,nsx,nsy,nobcs)
1131 #endif
1132 #if (defined (ALLOW_OBCSE_COST_CONTRIBUTION) || \
1133 defined (ALLOW_OBCSE_CONTROL))
1134 common /ecco_cost_weights_obcse/
1135 & wobcse, wobcseLev
1136 _RL wobcse ( nr,nobcs)
1137 _RL wobcseLev (1-oly:sny+oly,nr,nsx,nsy,nobcs)
1138 #endif
1139
1140
1141 c Arrays that contain observations for the model-data comparison:
1142 c ===============================================================
1143 c
1144 c tdat - reference temperature data.
1145 c scatxdat - reference zonal wind stress.
1146 c scatydat - reference meridional wind stress.
1147 c sstdat - reference sea surface temperature data.
1148 c tmidat - reference TMI sea surface temperature data.
1149 c sssdat - reference sea surface temperature data.
1150 c bpdat - bottom pressure from time-varying GRACE.
1151 c tauxmask - mask for reference wind stress data.
1152 c tauymask - mask for reference wind stress data.
1153 c scatxmask - mask for scat wind stress data.
1154 c scatymask - mask for scat wind stress data.
1155 c sstmask - mask for reference sea surface temperature data.
1156 c tmimask - mask for reference sea surface temperature data.
1157 c sssmask - mask for reference sea surface temperature data.
1158 c sdat - reference salinity data.
1159 c tpmean - reference mean sea surface height data.
1160 c tpmeanmask - mask for reference mean sea surface height data.
1161 c tpobs - TOPEX/POSEIDON data.
1162 c tpmask - mask for TOPEX/POSEIDON data.
1163 c ersobs - ERS data.
1164 c ersmask - mask for ERS data.
1165 c ctdtobs - CTD temperature data
1166 c ctdsobs - CTD salinity data
1167 c xbtobs - XBT data
1168 c argot - ARGO temperature data
1169 c argos - ARGO salt data
1170 c udriftdat - drifters zonal velocities
1171 c vdriftdat - drifters meridional velocities
1172
1173 common /ecco_cost_data_r/
1174 & tdat,
1175 & scatxdat,
1176 & scatydat,
1177 & sstdat,
1178 & tmidat,
1179 & sssdat,
1180 & bpdat,
1181 & sstmask,
1182 & tmimask,
1183 & sssmask,
1184 & bpmask,
1185 & tauxmask,
1186 & tauymask,
1187 & scatxmask,
1188 & scatymask,
1189 & sdat,
1190 & tpmean,
1191 & tpmeanmask,
1192 & tpobs,
1193 & tpmask,
1194 & ersobs,
1195 & ersmask,
1196 & gfoobs,
1197 & gfomask,
1198 & ctdtobs,
1199 & ctdsobs,
1200 & xbtobs,
1201 & argotobs,
1202 & argosobs,
1203 & udriftdat,
1204 & vdriftdat,
1205 & curmtruobs,
1206 & curmtrvobs
1207
1208 _RL tdat (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1209 _RL scatxdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1210 _RL scatydat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1211 _RL sstdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1212 _RL tmidat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1213 _RL sssdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1214 _RL bpdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1215 _RL tauxmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1216 _RL tauymask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1217 _RL scatxmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1218 _RL scatymask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1219 _RL sstmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1220 _RL tmimask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1221 _RL sssmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1222 _RL bpmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1223 _RL sdat (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1224 _RL tpmean (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1225 _RL tpmeanmask(1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1226 _RL tpobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1227 _RL tpmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1228 _RL ersobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1229 _RL ersmask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1230 _RL gfoobs (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1231 _RL gfomask (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1232 _RL ctdtobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1233 _RL ctdsobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1234 _RL xbtobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1235 _RL argotobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1236 _RL argosobs (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1237 _RL udriftdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1238 _RL vdriftdat (1-olx:snx+olx,1-oly:sny+oly, nsx,nsy)
1239 _RL curmtruobs(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1240 _RL curmtrvobs(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1241
1242
1243 c Files that contain obervations:
1244 c ===============================
1245 c
1246 c tdatfile - reference data file for temperature.
1247 c sdatfile - reference data file for salinity.
1248 c scatxdatfile - reference data file for zonal wind stress.
1249 c scatydatfile - reference data file for meridional wind stress.
1250 c sstdatfile - reference data file for sea surface temperature.
1251 c tmidatfile - reference data file for TMI sea surface temperature.
1252 c topexmeanfile - reference data file for mean sea surface height.
1253 c topexfile - reference data file for sea surface height data
1254 c (TOPEX/POSEIDON).
1255 c ersfile - reference data file for sea surface height data
1256 c (ERS).
1257 c ctdtfile, ctdsfile- reference data file for temperature and salinity
1258 c from CTD
1259 c ctdtclimfile, ctdsclimfile- reference data file for temperature
1260 c and salinity from CTD with out timetag
1261 c xbtfile - reference data file for xbt
1262 c ARGOtfile - reference data file for ARGO
1263 c ARGOsfile - reference data file for ARGO
1264 c driftfile - reference data file for drifter's mean velocities
1265
1266 common /ecco_cost_data_c/
1267 & tdatfile,
1268 & sdatfile,
1269 & scatxdatfile,
1270 & scatydatfile,
1271 & sstdatfile,
1272 & tmidatfile,
1273 & sssdatfile,
1274 & bpdatfile,
1275 & topexmeanfile,
1276 & topexfile,
1277 & ersfile,
1278 & gfofile,
1279 & ctdtfile,
1280 & ctdsfile,
1281 & ctdtclimfile,
1282 & ctdsclimfile,
1283 & xbtfile,
1284 & argotfile,
1285 & argosfile,
1286 & udriftfile,
1287 & vdriftfile,
1288 & gencost_datafile,
1289 & curmtrufile,
1290 & curmtrvfile
1291
1292 character*(MAX_LEN_FNAM) tdatfile
1293 character*(MAX_LEN_FNAM) sdatfile
1294 character*(MAX_LEN_FNAM) scatxdatfile
1295 character*(MAX_LEN_FNAM) scatydatfile
1296 character*(MAX_LEN_FNAM) sstdatfile
1297 character*(MAX_LEN_FNAM) tmidatfile
1298 character*(MAX_LEN_FNAM) sssdatfile
1299 character*(MAX_LEN_FNAM) bpdatfile
1300 character*(MAX_LEN_FNAM) topexmeanfile
1301 character*(MAX_LEN_FNAM) topexfile
1302 character*(MAX_LEN_FNAM) ersfile
1303 character*(MAX_LEN_FNAM) gfofile
1304 character*(MAX_LEN_FNAM) ctdtfile
1305 character*(MAX_LEN_FNAM) ctdsfile
1306 character*(MAX_LEN_FNAM) ctdtclimfile
1307 character*(MAX_LEN_FNAM) ctdsclimfile
1308 character*(MAX_LEN_FNAM) xbtfile
1309 character*(MAX_LEN_FNAM) argotfile
1310 character*(MAX_LEN_FNAM) argosfile
1311 character*(MAX_LEN_FNAM) argofile
1312 character*(MAX_LEN_FNAM) gencost_datafile(NGENCOST)
1313 character*(MAX_LEN_FNAM) udriftfile
1314 character*(MAX_LEN_FNAM) vdriftfile
1315 character*(MAX_LEN_FNAM) curmtrufile
1316 character*(MAX_LEN_FNAM) curmtrvfile
1317
1318
1319 c Flags used in the model-data comparison:
1320 c ========================================
1321 c
1322 c using_ers - flag that indicates the use of ERS data
1323
1324 common /ecco_cost_data_flags/
1325 & using_topex,
1326 & using_ers,
1327 & using_gfo
1328 logical using_topex
1329 logical using_ers
1330 logical using_gfo
1331
1332 c Calendar information for the observations:
1333 c ==========================================
1334 c
1335 c sststartdate - start date of the sea surface temperature data.
1336 c tmistartdate - start date of the sea surface temperature data.
1337 c topexstartdate - start date of the sea surface height data.
1338 c ersstartdate - start date of the sea surface height data.
1339 c sshperiod - sampling interval for the sea surface height data.
1340
1341 common /ecco_cost_data_times_i/
1342 & scatxstartdate,
1343 & scatystartdate,
1344 & sststartdate,
1345 & argotstartdate,
1346 & argosstartdate,
1347 & tmistartdate,
1348 & sssstartdate,
1349 & bpstartdate,
1350 & topexstartdate,
1351 & ersstartdate,
1352 & gfostartdate
1353 integer scatxstartdate(4)
1354 integer scatystartdate(4)
1355 integer sststartdate(4)
1356 integer argotstartdate(4)
1357 integer argosstartdate(4)
1358 integer tmistartdate(4)
1359 integer sssstartdate(4)
1360 integer bpstartdate(4)
1361 integer topexstartdate(4)
1362 integer ersstartdate(4)
1363 integer gfostartdate(4)
1364
1365 common /ecco_cost_data_aux_i/
1366 & tmistartdate1,
1367 & tmistartdate2,
1368 & sststartdate1,
1369 & sststartdate2,
1370 & sssstartdate1,
1371 & sssstartdate2,
1372 & bpstartdate1,
1373 & bpstartdate2,
1374 & argotstartdate1,
1375 & argotstartdate2,
1376 & argosstartdate1,
1377 & argosstartdate2,
1378 & topexstartdate1,
1379 & topexstartdate2,
1380 & ersstartdate1,
1381 & ersstartdate2,
1382 & gfostartdate1,
1383 & gfostartdate2,
1384 & scatstartdate1,
1385 & scatstartdate2
1386
1387 integer tmistartdate1
1388 integer tmistartdate2
1389 integer sststartdate1
1390 integer sststartdate2
1391 integer sssstartdate1
1392 integer sssstartdate2
1393 integer bpstartdate1
1394 integer bpstartdate2
1395 integer argotstartdate1
1396 integer argotstartdate2
1397 integer argosstartdate1
1398 integer argosstartdate2
1399 integer topexstartdate1
1400 integer topexstartdate2
1401 integer ersstartdate1
1402 integer ersstartdate2
1403 integer gfostartdate1
1404 integer gfostartdate2
1405 integer scatstartdate1
1406 integer scatstartdate2
1407
1408 common /ecco_cost_data_times_r/
1409 & topexperiod,
1410 & ersperiod,
1411 & gfoperiod,
1412 & scatperiod
1413 _RL topexperiod
1414 _RL ersperiod
1415 _RL gfoperiod
1416 _RL scatperiod
1417
1418 common /ecco_cost_data_detrend/
1419 & topexintercept,
1420 & ersintercept,
1421 & gfointercept,
1422 & topexslope,
1423 & ersslope,
1424 & gfoslope
1425 _RL topexintercept
1426 _RL ersintercept
1427 _RL gfointercept
1428 _RL topexslope
1429 _RL ersslope
1430 _RL gfoslope
1431
1432 c ==================================================================
1433 c END OF HEADER COST
1434 c ==================================================================
1435
1436

  ViewVC Help
Powered by ViewVC 1.1.22