/[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.42 - (show annotations) (download)
Thu Nov 12 13:56:12 2009 UTC (14 years, 6 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint62, checkpoint62b, checkpoint62a, checkpoint61z, checkpoint61y
Changes since 1.41: +49 -101 lines
File MIME type: text/plain
rearrange common block /ecco_cost_objf/ declaration so that compilers
that do not allow more than 100 extension lines do not choke

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

  ViewVC Help
Powered by ViewVC 1.1.22