/[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.32 - (show annotations) (download)
Fri May 30 02:49:05 2008 UTC (16 years ago) by gforget
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a
Changes since 1.31: +2 -2 lines
File MIME type: text/plain
o bridging the gap between eddy stress and GM.
  -> eddyTau is replaced with eddyPsi (eddyTau = f x rho0 x eddyPsi)
      along with a change in CPP option (now ALLOW_EDDYPSI).
  -> when using GM w/ GM_AdvForm:
      The total eddy streamfunction (Psi = eddyPsi + K x Slope)
      is applied either in the tracer Eq. or in momentum Eq.
      depending on data.gmredi (intro. GM_InMomAsStress).
  -> ALLOW_EDDYPSI_CONTROL for estimation purpose.
  The key modifications are in model/src/taueddy_external_forcing.F
  pkg/gmredi/gmredi_calc_*F pkg/gmredi/gmredi_*transport.F

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

  ViewVC Help
Powered by ViewVC 1.1.22