/[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.38 - (show annotations) (download)
Wed May 13 13:39:38 2009 UTC (15 years, 1 month ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint61o, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61x
Changes since 1.37: +3 -2 lines
File MIME type: text/plain
Enable easy way for daily SST cost.

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

  ViewVC Help
Powered by ViewVC 1.1.22