/[MITgcm]/MITgcm/pkg/ecco/ecco_cost.h
ViewVC logotype

Annotation of /MITgcm/pkg/ecco/ecco_cost.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.21 - (hide annotations) (download)
Fri Jul 7 22:53:36 2006 UTC (18 years, 2 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58n_post, checkpoint58o_post, checkpoint58p_post, checkpoint58m_post
Changes since 1.20: +33 -6 lines
File MIME type: text/plain
o cost_averagesflags now returns year indices in addition to day, month
o sflux balance is performed on annual basis
  (sflxumm, sfluxmm2, bal_sfluxmm)
o for SSH anomaly, separate more cleanly contrib from T/P, ERS, GFO,
  including separate counting and multipliers

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

  ViewVC Help
Powered by ViewVC 1.1.22