/[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.23 - (hide annotations) (download)
Fri Oct 27 05:16:54 2006 UTC (17 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58r_post, checkpoint58s_post
Changes since 1.22: +111 -3 lines
File MIME type: text/plain
Adding new control variables:
lwflux, lwdown, evap, snowprecip, apressure, runoff.

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

  ViewVC Help
Powered by ViewVC 1.1.22