/[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.41 - (show annotations) (download)
Tue Nov 3 03:32:25 2009 UTC (14 years, 8 months ago) by gforget
Branch: MAIN
Changes since 1.40: +21 -2 lines
File MIME type: text/plain
MDT/SLA cost function terms for ECCO version 4 -- initial check-in

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

  ViewVC Help
Powered by ViewVC 1.1.22