/[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.63 - (hide annotations) (download)
Tue Apr 1 08:03:42 2014 UTC (10 years, 3 months ago) by atn
Branch: MAIN
Changes since 1.62: +6 -0 lines
File MIME type: text/plain
o move smooth2Ddiffnbt param from pkg/smooth to pkg/ecco
o minor bug fix in set gencost default values in ecco_readparms.F

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

  ViewVC Help
Powered by ViewVC 1.1.22