/[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.53 - (hide annotations) (download)
Sun Mar 13 22:24:43 2011 UTC (13 years, 2 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62x
Changes since 1.52: +42 -2 lines
File MIME type: text/plain
Merging Benny Cheng code for init. etan, uvel, vvel controls
Fix weight handling

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

  ViewVC Help
Powered by ViewVC 1.1.22