/[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.66 - (hide annotations) (download)
Mon Sep 29 16:45:45 2014 UTC (9 years, 8 months ago) by gforget
Branch: MAIN
Changes since 1.65: +19 -165 lines
File MIME type: text/plain
- ecco_ad_check_lev1_dir.h etc : rename xx_genbar_dummy as gencost_dummy
- ecco_cost.h : more variable of general iterest (including gencost*) to
  ecco.h and include ecco.h in ecco_cost.h (to be retired soon...)
- ecco.h : add sum1day etc, using_cost_altim etc, etanFull etc,
  cost_iprec, cost_yftype, eccoiter (copy of optimiter), gencost_* (incl.
  new gencost_startdate1/2, gencost_enddate1/2, using_mdt, using_tpj)

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

  ViewVC Help
Powered by ViewVC 1.1.22