/[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.26 - (show annotations) (download)
Fri Sep 7 22:41:14 2007 UTC (16 years, 8 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint59g
Changes since 1.25: +15 -0 lines
File MIME type: text/plain
allow user defined cost function contributions
	CPP: ALLOW_GENCOST_CONTRIBUTION
	USAGE: compute contributions in cost_gencost_all.F

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

  ViewVC Help
Powered by ViewVC 1.1.22