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

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

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

revision 1.8 by heimbach, Fri Jul 29 05:19:40 2005 UTC revision 1.52 by gforget, Sat Aug 28 18:35:16 2010 UTC
# Line 1  Line 1 
1    C $Header$
2    C $Name$
3    
4  c     ==================================================================  c     ==================================================================
5  c     HEADER AVERAGES  c     HEADER AVERAGES
# Line 8  c       fields and counters associated w Line 10  c       fields and counters associated w
10  c  c
11  c     started: Christian Eckert eckert@mit.edu  30-Jun-1999  c     started: Christian Eckert eckert@mit.edu  30-Jun-1999
12  c  c
 c     added sea-ice term: menemenlis@jpl.nasa.gov 26-Feb-2003  
 c  
13  c     ==================================================================  c     ==================================================================
14  c     HEADER AVERAGES  c     HEADER AVERAGES
15  c     ==================================================================  c     ==================================================================
# Line 22  c     sum1mon - counter for the monthly Line 22  c     sum1mon - counter for the monthly
22  c     dayrec  - number of averaged surface pressure records.  c     dayrec  - number of averaged surface pressure records.
23  c     monrec  - number of averaged theta and salinity records.  c     monrec  - number of averaged theta and salinity records.
24    
25        common /average_i/        common /average_i/
26       &                   sum1day,sum1mon,       &                   sum1day,sum1mon,sum1year,
27       &                   dayrec,monrec       &                   dayrec,monrec,yearrec
28        integer sum1day        integer sum1day
29        integer sum1mon        integer sum1mon
30          integer sum1year
31        integer dayrec        integer dayrec
32        integer monrec        integer monrec
33          integer yearrec
34    
35    c     Number of sshv4cost Cost terms:
36    c     =============================
37          INTEGER NSSHV4COST
38          PARAMETER ( NSSHV4COST=5 )
39    
40    c     Number of User Cost terms:
41    c     =============================
42          INTEGER NUSERCOST
43          PARAMETER ( NUSERCOST=10 )
44    
45    c     Number of days: (hard-coded to set up some vector dimensions
46    c     =============================
47    c     17 years: 6210
48          INTEGER maxNumDays
49          PARAMETER ( maxNumDays = 6210 )
50    
51    c     Number of Generic Cost terms:
52    c     =============================
53          INTEGER NGENCOST
54          PARAMETER ( NGENCOST=1 )
55    
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          common /ecco_gencost_r_1/
63         &       objf_gencost, num_gencost, mult_gencost,
64         &       gencost_barfld, gencost_modfld, gencost_weight,
65         &       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          _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          _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    
83          common /ecco_gencost_i_1/
84         &       gencost_nrec
85          integer gencost_nrec(NGENCOST)
86    
87          common /ecco_gencost_c/
88         &       gencost_name,
89         &       gencost_scalefile,
90         &       gencost_errfile,
91         &       gencost_datafile,
92         &       gencost_barfile,
93         &       gencost_avgperiod,
94         &       gencost_mask
95          character*(MAX_LEN_FNAM) gencost_name(NGENCOST)
96          character*(MAX_LEN_FNAM) gencost_scalefile(NGENCOST)
97          character*(MAX_LEN_FNAM) gencost_errfile(NGENCOST)
98          character*(MAX_LEN_FNAM) gencost_datafile(NGENCOST)
99          character*(MAX_LEN_FNAM) gencost_barfile(NGENCOST)
100          character*(5)            gencost_avgperiod(NGENCOST)
101          character*(1)            gencost_mask(NGENCOST)
102    
103    #endif /* ALLOW_GENCOST_CONTRIBUTION */
104    
105  c     Averaged Fields:  c     Averaged Fields:
106  c     ================  c     ================
# Line 43  c             intantaneous salinities. Line 114  c             intantaneous salinities.
114  c     psbar - contains the averaged surface pressure field after the call  c     psbar - contains the averaged surface pressure field after the call
115  c             to subroutine POST_DAILY. Before, it accumulates the  c             to subroutine POST_DAILY. Before, it accumulates the
116  c             intantaneous surface pressure field.  c             intantaneous surface pressure field.
117  c     ubar  - contains the averaged zonal velocity component for the  c     ubar  - contains the averaged zonal velocity component for the
118  c             whole integration period. Before, it accumulates the  c             whole integration period. Before, it accumulates the
119  c             intantaneous field.  c             intantaneous field.
120  c     vbar  - contains the averaged zonal velocity component for the  c     vbar  - contains the averaged zonal velocity component for the
# Line 55  c             intantaneous field. Line 126  c             intantaneous field.
126  c     tauybar  - contains the averaged zonal velocity component for the  c     tauybar  - contains the averaged zonal velocity component for the
127  c             whole integration period. Before, it accumulates the  c             whole integration period. Before, it accumulates the
128  c             intantaneous field.  c             intantaneous field.
129  c     hfluxbar  - contains the averaged zonal velocity component for the  c     hfluxmeanbar  - contains the averaged zonal velocity component for the
130  c             whole integration period. Before, it accumulates the  c             whole integration period. Before, it accumulates the
131  c             intantaneous field.  c             intantaneous field.
132  c     sfluxbar  - contains the averaged zonal velocity component for the  c     sfluxmeanbar  - contains the averaged zonal velocity component for the
133  c             whole integration period. Before, it accumulates the  c             whole integration period. Before, it accumulates the
134  c             intantaneous field.  c             intantaneous field.
135    
136        common /averages_r/        common /averages_r/
137       &                    tbar,       &                    tbar,
138       &                    sbar,       &                    sbar,
139         &                    sstbar,
140       &                    psbar,       &                    psbar,
141         &                    bpbar,
142       &                    ubar,       &                    ubar,
143       &                    vbar,       &                    vbar,
144       &                    wbar,       &                    wbar,
145       &                    tauxbar,       &                    tauxbar,
146       &                    tauybar,       &                    tauybar,
147       &                    hfluxbar,       &                    hfluxmeanbar,
148       &                    sfluxbar,       &                    sfluxmeanbar,
149       &                    Slmean,       &                    Slmean,
150       &                    Tlmean,       &                    Tlmean,
151       &                    wlmean,       &                    wlmean,
152       &                    Sfmean,       &                    Sfmean,
153       &                    Tfmean,                         &                    Tfmean,
154       &                    sbar_gen,       &                    sbar_gen,
155       &                    tbar_gen,       &                    tbar_gen,
156       &                    wfmean       &                    wfmean
157    
158  #if (defined (ALLOW_THETA_COST_CONTRIBUTION) || \  #if (defined (ALLOW_THETA_COST_CONTRIBUTION) || \
# Line 103  c             intantaneous field. Line 176  c             intantaneous field.
176        _RL sbar_gen        _RL sbar_gen
177  #endif  #endif
178    
179    #ifdef ALLOW_DAILYSST_COST_CONTRIBUTION
180    cph#ifdef ALLOW_SEAICE_COST_AREASST
181          _RL sstbar  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
182    #else
183          _RL sstbar
184    #endif
185    
186  #if (defined (ALLOW_SALT_COST_CONTRIBUTION) || \  #if (defined (ALLOW_SALT_COST_CONTRIBUTION) || \
187       defined (ALLOW_CTDS_COST_CONTRIBUTION) || \       defined (ALLOW_CTDS_COST_CONTRIBUTION) || \
188       defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \       defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \
# Line 122  c             intantaneous field. Line 202  c             intantaneous field.
202        _RL psbar        _RL psbar
203  #endif  #endif
204    
205    #ifdef ALLOW_BP_COST_CONTRIBUTION
206          _RL bpbar  (1-olx:snx+olx,1-oly:sny+oly,  nsx,nsy)
207    #else
208          _RL bpbar
209    #endif
210    
211  #if (defined (ALLOW_DRIFTER_COST_CONTRIBUTION) || \  #if (defined (ALLOW_DRIFTER_COST_CONTRIBUTION) || \
212       defined (ALLOW_OBCS_COST_CONTRIBUTION))       defined (ALLOW_OBCS_COST_CONTRIBUTION))
213        _RL ubar  (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL ubar  (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
# Line 146  c             intantaneous field. Line 232  c             intantaneous field.
232        _RL   Tlmean        _RL   Tlmean
233        _RL   Slmean        _RL   Slmean
234        _RL   Tfmean        _RL   Tfmean
235        _RL   Sfmean                _RL   Sfmean
236  #endif  #endif
237    
238  #ifdef ALLOW_DRIFTW_COST_CONTRIBUTION  #ifdef ALLOW_DRIFTW_COST_CONTRIBUTION
# Line 161  c             intantaneous field. Line 247  c             intantaneous field.
247        _RL tauxbar  (1-olx:snx+olx,1-oly:sny+oly,  nsx,nsy)        _RL tauxbar  (1-olx:snx+olx,1-oly:sny+oly,  nsx,nsy)
248        _RL tauybar  (1-olx:snx+olx,1-oly:sny+oly,  nsx,nsy)        _RL tauybar  (1-olx:snx+olx,1-oly:sny+oly,  nsx,nsy)
249  #else  #else
250        _RL tauxbar        _RL tauxbar
251        _RL tauybar        _RL tauybar
252  #endif  #endif
253    
254  #ifdef ALLOW_MEAN_HFLUX_COST_CONTRIBUTION  #ifdef ALLOW_MEAN_HFLUX_COST_CONTRIBUTION
255        _RL hfluxbar  (1-olx:snx+olx,1-oly:sny+oly,  nsx,nsy)        _RL hfluxmeanbar  (1-olx:snx+olx,1-oly:sny+oly,  nsx,nsy)
256  #else  #else
257        _RL hfluxbar        _RL hfluxmeanbar
258  #endif  #endif
259    
260  #ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION  #ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION
261        _RL sfluxbar  (1-olx:snx+olx,1-oly:sny+oly,  nsx,nsy)            _RL sfluxmeanbar  (1-olx:snx+olx,1-oly:sny+oly,  nsx,nsy)
262  #else  #else
263        _RL sfluxbar        _RL sfluxmeanbar
264  #endif  #endif
265    
266    
267        common /averages_c/        common /averages_c/
268       &                    tbarfile,       &                    tbarfile,
269       &                    sbarfile,       &                    sbarfile,
270         &                    sstbarfile,
271       &                    psbarfile,       &                    psbarfile,
272         &                    bpbarfile,
273       &                    ubarfile,       &                    ubarfile,
274       &                    vbarfile,       &                    vbarfile,
275       &                    wbarfile,       &                    wbarfile,
276       &                    tauxbarfile,       &                    tauxbarfile,
277       &                    tauybarfile,       &                    tauybarfile,
278       &                    hfluxbarfile,       &                    hfluxmeanbarfile,
279       &                    sfluxbarfile       &                    sfluxmeanbarfile,
280         &                    costTranspDataFile
281        character*(MAX_LEN_FNAM) tbarfile        character*(MAX_LEN_FNAM) tbarfile
282        character*(MAX_LEN_FNAM) sbarfile        character*(MAX_LEN_FNAM) sbarfile
283          character*(MAX_LEN_FNAM) sstbarfile
284        character*(MAX_LEN_FNAM) psbarfile        character*(MAX_LEN_FNAM) psbarfile
285          character*(MAX_LEN_FNAM) bpbarfile
286        character*(MAX_LEN_FNAM) ubarfile        character*(MAX_LEN_FNAM) ubarfile
287        character*(MAX_LEN_FNAM) vbarfile        character*(MAX_LEN_FNAM) vbarfile
288        character*(MAX_LEN_FNAM) wbarfile        character*(MAX_LEN_FNAM) wbarfile
289        character*(MAX_LEN_FNAM) tauxbarfile        character*(MAX_LEN_FNAM) tauxbarfile
290        character*(MAX_LEN_FNAM) tauybarfile        character*(MAX_LEN_FNAM) tauybarfile
291        character*(MAX_LEN_FNAM) hfluxbarfile        character*(MAX_LEN_FNAM) hfluxmeanbarfile
292        character*(MAX_LEN_FNAM) sfluxbarfile        character*(MAX_LEN_FNAM) sfluxmeanbarfile
293          character*(MAX_LEN_FNAM) costTranspDataFile
294    
295    #ifdef ALLOW_TRANSPORT_COST_CONTRIBUTION
296          common /averages_transp_r/
297         &                     transpbar
298         &                   , transpobs
299         &                   , wtransp
300          _RL transpbar(maxNumDays,nsx,nsy)
301          _RL transpobs(maxNumDays)
302          _RL wtransp(maxNumDays)
303    #endif
304    
305  c     file precision and field type  c     file precision and field type
306    
307        common /prec_type_cost/        common /prec_type_cost/
308       &                        cost_iprec,       &                        cost_iprec,
309       &                        cost_yftype       &                        cost_yftype
310    
# Line 256  c     objf_hfluxmm    - Global time-mean Line 358  c     objf_hfluxmm    - Global time-mean
358  c     objf_sfluxmm    - Global time-mean Salt flux contribution.  c     objf_sfluxmm    - Global time-mean Salt flux contribution.
359  c     objf_hmean - Mean sea surface height contribution.  c     objf_hmean - Mean sea surface height contribution.
360  c     objf_h     - Residual sea surface height contribution.  c     objf_h     - Residual sea surface height contribution.
361    c     objf_tp    - Residual sea surface height contribution from T/P
362    c     objf_ers   - Residual sea surface height contribution from T/P
363    c     objf_gfo   - Residual sea surface height contribution from T/P
364  c     objf_temp  - Temperature contribution.  c     objf_temp  - Temperature contribution.
365  c     objf_salt  - Salinity contribution.  c     objf_salt  - Salinity contribution.
366  c     objf_temp0 - Initial conditions Temperature contribution.  c     objf_temp0 - Initial conditions Temperature contribution.
# Line 263  c     objf_salt0 - Initial conditions Sa Line 368  c     objf_salt0 - Initial conditions Sa
368  c     objf_sst   - Sea surface temperature contribution.  c     objf_sst   - Sea surface temperature contribution.
369  c     objf_tmi   - Sea surface temperature contribution.  c     objf_tmi   - Sea surface temperature contribution.
370  c     objf_sss   - Sea surface salinity contribution.  c     objf_sss   - Sea surface salinity contribution.
371  c     objf_ctdt  - Temperature measurements from Woce CTD  c     objf_ctdt  - Temperature measurements from Woce CTD
372  c     objf_ctds  - Salinity measurements from Woce CTD  c     objf_ctds  - Salinity measurements from Woce CTD
373  c     objf_ctdtclim - Temperature measurements from Woce CTD without timetag  c     objf_ctdtclim - Temperature measurements from Woce CTD without timetag
374  c     objf_ctdsclim - Salinity measurements from Woce CTD without timetag  c     objf_ctdsclim - Salinity measurements from Woce CTD without timetag
375  c     objf_xbt   - XBT temperature data  c     objf_xbt   - XBT temperature data
376  c     objf_argot - ARGO temperature profiles  c     objf_argot - ARGO temperature profiles
377  c     objf_argos - ARGO salt profiles  c     objf_argos - ARGO salt profiles
378    c     objf_usercost - user defined cost contribution
379  c     objf_scatxm - time-mean zonal SCAT  contribution  c     objf_scatxm - time-mean zonal SCAT  contribution
380  c     objf_scatym - time-mean meridional SCAT  contribution  c     objf_scatym - time-mean meridional SCAT  contribution
381  c     objf_scatx  - zonal SCAT  contribution  c     objf_scatx  - zonal SCAT  contribution
382  c     objf_scaty  - meridional SCAT  contribution  c     objf_scaty  - meridional SCAT  contribution
 c     objf_ice    - sea-ice volume  
383  c     objf_kapgm  - kappa GM contribution  c     objf_kapgm  - kappa GM contribution
384    c     objf_kapredi  - kappa REDI contribution
385  c     objf_diffkr - diffusion contribution  c     objf_diffkr - diffusion contribution
386  c     objf_theta_ini_fin - final vs. initial theta misfit  c     objf_theta_ini_fin - final vs. initial theta misfit
387  c     objf_salt_ini_fin  - final vs. initial salt misfit  c     objf_salt_ini_fin  - final vs. initial salt misfit
388    c     objf_eddytau - eddy streamfunction contribution
389    c     objf_bottomdrag - bottom drag contribution
390  c  c
391  c     mult_"var" - multipliers for the individual cost  c     mult_"var" - multipliers for the individual cost
392  c                  function contributions.  c                  function contributions.
393    
394        common /ecco_cost_objf/        common /ecco_cost_objf/
395       &                objf_hflux,       &     objf_hflux, objf_hfluxm, objf_hfluxmm, objf_hfluxsmoo,
396       &                objf_hfluxm,       &     objf_sflux, objf_sfluxm, objf_sfluxmm, objf_sfluxsmoo,
397       &                objf_hfluxmm,       &     objf_tauu,  objf_tauum,  objf_tauusmoo,
398       &                objf_sflux,       &     objf_tauv,  objf_tauvm,  objf_tauvsmoo,
399       &                objf_sfluxm,       &     objf_hmean,
400       &                objf_sfluxmm,       &     objf_h, objf_tp, objf_ers, objf_gfo,
401       &                objf_tauu,       &     objf_sshv4cost,
402       &                objf_tauum,       &     objf_temp,      objf_salt,
403       &                objf_tauv,       &     objf_temp0,     objf_salt0,
404       &                objf_tauvm,       &     objf_temp0smoo, objf_salt0smoo,
405       &                objf_hmean,       &     objf_sst, objf_tmi, objf_sss,
406       &                objf_h,       &     objf_bp,
407       &                objf_temp,       &     objf_usercost,
408       &                objf_salt,       &     objf_ctdt,      objf_ctds,
409       &                objf_temp0,       &     objf_ctdtclim,  objf_ctdsclim,
410       &                objf_salt0,       &     objf_xbt, objf_argot,     objf_argos,
411       &                objf_sst,       &     objf_drift, objf_tdrift, objf_sdrift, objf_wdrift,
412       &                objf_tmi,       &     objf_scatx, objf_scaty,  objf_scatxm, objf_scatym,
413       &                objf_sss,       &     objf_atemp,      objf_atempm,      objf_atempsmoo,
414       &                objf_ctdt,       &     objf_aqh,        objf_aqhm,        objf_aqhsmoo,
415       &                objf_ctds,       &     objf_precip,     objf_precipm,     objf_precipsmoo,
416       &                objf_ctdtclim,       &     objf_swflux,     objf_swfluxm,     objf_swfluxsmoo,
417       &                objf_ctdsclim,       &     objf_swdown,     objf_swdownm,     objf_swdownsmoo,
418       &                objf_xbt,       &     objf_snowprecip, objf_snowprecipm, objf_snowprecipsmoo,
419       &                objf_argot,       &     objf_lwflux,     objf_lwfluxm,     objf_lwfluxsmoo,
420       &                objf_argos,       &     objf_lwdown,     objf_lwdownm,     objf_lwdownsmoo,
421       &                objf_drift,       &     objf_evap,       objf_evapm,       objf_evapsmoo,
422       &                objf_tdrift,       &     objf_apressure,  objf_apressurem,  objf_apressuresmoo,
423       &                objf_sdrift,       &     objf_runoff,     objf_runoffm,     objf_runoffsmoo,
424       &                objf_wdrift,       &     objf_uwind,      objf_uwindm,      objf_uwindsmoo,
425       &                objf_scatx,       &     objf_vwind,      objf_vwindm,      objf_vwindsmoo,
426       &                objf_scaty,       &     objf_obcsn, objf_obcss, objf_obcsw, objf_obcse,
427       &                objf_scatxm,       &     objf_obcsvol,
428       &                objf_scatym,       &     objf_curmtr,
429       &                objf_atemp,       &     objf_ageos,
430       &                objf_aqh,       &     objf_kapgm,
431       &                objf_precip,       &     objf_kapredi,
432       &                objf_swflux,       &     objf_diffkr,
433       &                objf_uwind,       &     objf_theta_ini_fin, objf_salt_ini_fin,
434       &                objf_vwind,       &     objf_eddytau,
435       &                objf_atempm,       &     objf_bottomdrag,
436       &                objf_aqhm,       &     objf_transp
      &                objf_precipm,  
      &                objf_swfluxm,  
      &                objf_uwindm,  
      &                objf_vwindm,  
      &                objf_obcsn,  
      &                objf_obcss,  
      &                objf_obcsw,  
      &                objf_obcse,  
      &                objf_obcsvol,  
      &                objf_curmtr,  
      &                objf_ageos,  
      &                objf_ice,  
      &                objf_diffkr,  
      &                objf_theta_ini_fin,  
      &                objf_salt_ini_fin,  
      &                objf_eddytau  
437    
438        _RL  objf_hflux  (nsx,nsy)        _RL  objf_hflux  (nsx,nsy)
439        _RL  objf_hfluxm (nsx,nsy)        _RL  objf_hfluxm (nsx,nsy)
440        _RL  objf_hfluxmm(nsx,nsy)        _RL  objf_hfluxmm
441          _RL  objf_hfluxsmoo  (nsx,nsy)
442        _RL  objf_sflux  (nsx,nsy)        _RL  objf_sflux  (nsx,nsy)
443        _RL  objf_sfluxm (nsx,nsy)        _RL  objf_sfluxm (nsx,nsy)
444        _RL  objf_sfluxmm(nsx,nsy)        _RL  objf_sfluxmm
445          _RL  objf_sfluxsmoo  (nsx,nsy)
446        _RL  objf_tauu   (nsx,nsy)        _RL  objf_tauu   (nsx,nsy)
447        _RL  objf_tauum  (nsx,nsy)        _RL  objf_tauum  (nsx,nsy)
448          _RL  objf_tauusmoo   (nsx,nsy)
449        _RL  objf_tauv   (nsx,nsy)        _RL  objf_tauv   (nsx,nsy)
450        _RL  objf_tauvm  (nsx,nsy)        _RL  objf_tauvm  (nsx,nsy)
451          _RL  objf_tauvsmoo   (nsx,nsy)
452        _RL  objf_hmean        _RL  objf_hmean
453        _RL  objf_h    (nsx,nsy)        _RL  objf_h    (nsx,nsy)
454          _RL  objf_tp   (nsx,nsy)
455          _RL  objf_ers  (nsx,nsy)
456          _RL  objf_gfo  (nsx,nsy)
457          _RL  objf_sshv4cost(NSSHV4COST,nsx,nsy)
458        _RL  objf_temp (nsx,nsy)        _RL  objf_temp (nsx,nsy)
459        _RL  objf_salt (nsx,nsy)        _RL  objf_salt (nsx,nsy)
460        _RL  objf_temp0(nsx,nsy)        _RL  objf_temp0(nsx,nsy)
461        _RL  objf_salt0(nsx,nsy)        _RL  objf_salt0(nsx,nsy)
462          _RL  objf_temp0smoo(nsx,nsy)
463          _RL  objf_salt0smoo(nsx,nsy)
464        _RL  objf_sst  (nsx,nsy)        _RL  objf_sst  (nsx,nsy)
465        _RL  objf_tmi  (nsx,nsy)        _RL  objf_tmi  (nsx,nsy)
466        _RL  objf_sss  (nsx,nsy)        _RL  objf_sss  (nsx,nsy)
467          _RL  objf_bp   (nsx,nsy)
468        _RL  objf_ctdt (nsx,nsy)        _RL  objf_ctdt (nsx,nsy)
469        _RL  objf_ctds (nsx,nsy)        _RL  objf_ctds (nsx,nsy)
470        _RL  objf_ctdtclim (nsx,nsy)        _RL  objf_ctdtclim (nsx,nsy)
471        _RL  objf_ctdsclim (nsx,nsy)        _RL  objf_ctdsclim (nsx,nsy)
472        _RL  objf_xbt  (nsx,nsy)        _RL  objf_xbt  (nsx,nsy)
473        _RL  objf_argot(nsx,nsy)        _RL  objf_argot(nsx,nsy)
474          _RL  objf_usercost(NUSERCOST,nsx,nsy)
475        _RL  objf_argos(nsx,nsy)        _RL  objf_argos(nsx,nsy)
476        _RL  objf_drift(nsx,nsy)        _RL  objf_drift(nsx,nsy)
477        _RL  objf_tdrift(nsx,nsy)        _RL  objf_tdrift(nsx,nsy)
# Line 381  c                  function contribution Line 485  c                  function contribution
485        _RL  objf_aqh  (nsx,nsy)        _RL  objf_aqh  (nsx,nsy)
486        _RL  objf_precip(nsx,nsy)        _RL  objf_precip(nsx,nsy)
487        _RL  objf_swflux(nsx,nsy)        _RL  objf_swflux(nsx,nsy)
488          _RL  objf_swdown(nsx,nsy)
489          _RL  objf_snowprecip(nsx,nsy)
490          _RL  objf_lwflux(nsx,nsy)
491          _RL  objf_lwdown(nsx,nsy)
492          _RL  objf_evap(nsx,nsy)
493          _RL  objf_apressure(nsx,nsy)
494          _RL  objf_runoff(nsx,nsy)
495        _RL  objf_uwind(nsx,nsy)        _RL  objf_uwind(nsx,nsy)
496        _RL  objf_vwind(nsx,nsy)        _RL  objf_vwind(nsx,nsy)
497        _RL  objf_atempm(nsx,nsy)        _RL  objf_atempm(nsx,nsy)
498        _RL  objf_aqhm  (nsx,nsy)        _RL  objf_aqhm  (nsx,nsy)
499        _RL  objf_precipm(nsx,nsy)        _RL  objf_precipm(nsx,nsy)
500        _RL  objf_swfluxm(nsx,nsy)        _RL  objf_swfluxm(nsx,nsy)
501          _RL  objf_swdownm(nsx,nsy)
502          _RL  objf_snowprecipm(nsx,nsy)
503          _RL  objf_lwfluxm(nsx,nsy)
504          _RL  objf_lwdownm(nsx,nsy)
505          _RL  objf_evapm(nsx,nsy)
506          _RL  objf_apressurem(nsx,nsy)
507          _RL  objf_runoffm(nsx,nsy)
508        _RL  objf_uwindm(nsx,nsy)        _RL  objf_uwindm(nsx,nsy)
509        _RL  objf_vwindm(nsx,nsy)        _RL  objf_vwindm(nsx,nsy)
510          _RL  objf_atempsmoo(nsx,nsy)
511          _RL  objf_aqhsmoo  (nsx,nsy)
512          _RL  objf_precipsmoo(nsx,nsy)
513          _RL  objf_swfluxsmoo(nsx,nsy)
514          _RL  objf_swdownsmoo(nsx,nsy)
515          _RL  objf_snowprecipsmoo(nsx,nsy)
516          _RL  objf_lwfluxsmoo(nsx,nsy)
517          _RL  objf_lwdownsmoo(nsx,nsy)
518          _RL  objf_evapsmoo(nsx,nsy)
519          _RL  objf_apressuresmoo(nsx,nsy)
520          _RL  objf_runoffsmoo(nsx,nsy)
521          _RL  objf_uwindsmoo(nsx,nsy)
522          _RL  objf_vwindsmoo(nsx,nsy)
523        _RL  objf_obcsn(nsx,nsy)        _RL  objf_obcsn(nsx,nsy)
524        _RL  objf_obcss(nsx,nsy)        _RL  objf_obcss(nsx,nsy)
525        _RL  objf_obcsw(nsx,nsy)        _RL  objf_obcsw(nsx,nsy)
# Line 396  c                  function contribution Line 527  c                  function contribution
527        _RL  objf_obcsvol        _RL  objf_obcsvol
528        _RL  objf_curmtr(nsx,nsy)        _RL  objf_curmtr(nsx,nsy)
529        _RL  objf_ageos(nsx,nsy)        _RL  objf_ageos(nsx,nsy)
       _RL  objf_ice  (nsx,nsy)  
530        _RL  objf_kapgm(nsx,nsy)        _RL  objf_kapgm(nsx,nsy)
531          _RL  objf_kapredi(nsx,nsy)
532        _RL  objf_diffkr(nsx,nsy)        _RL  objf_diffkr(nsx,nsy)
533        _RL  objf_theta_ini_fin(nsx,nsy)        _RL  objf_theta_ini_fin(nsx,nsy)
534        _RL  objf_salt_ini_fin(nsx,nsy)        _RL  objf_salt_ini_fin(nsx,nsy)
535        _RL  objf_eddytau(nsx,nsy)        _RL  objf_eddytau(nsx,nsy)
536          _RL  objf_bottomdrag(nsx,nsy)
537          _RL  objf_transp
538    
539        common /ecco_cost_num/        common /ecco_cost_num/
540       &                num_hflux,       &                num_hflux,
# Line 416  c                  function contribution Line 549  c                  function contribution
549       &                num_tauvm,       &                num_tauvm,
550       &                num_hmean,       &                num_hmean,
551       &                num_h,       &                num_h,
552         &                num_tp,
553         &                num_ers,
554         &                num_gfo,
555         &                num_sshv4cost,
556       &                num_temp,       &                num_temp,
557       &                num_salt,       &                num_salt,
558       &                num_temp0,       &                num_temp0,
# Line 423  c                  function contribution Line 560  c                  function contribution
560       &                num_sst,       &                num_sst,
561       &                num_tmi,       &                num_tmi,
562       &                num_sss,       &                num_sss,
563         &                num_bp,
564       &                num_ctdt,       &                num_ctdt,
565       &                num_ctds,       &                num_ctds,
566       &                num_ctdtclim,       &                num_ctdtclim,
# Line 430  c                  function contribution Line 568  c                  function contribution
568       &                num_xbt,       &                num_xbt,
569       &                num_argot,       &                num_argot,
570       &                num_argos,       &                num_argos,
571         &                num_usercost,
572       &                num_drift,       &                num_drift,
573       &                num_tdrift,       &                num_tdrift,
574       &                num_sdrift,       &                num_sdrift,
# Line 442  c                  function contribution Line 581  c                  function contribution
581       &                num_aqh,       &                num_aqh,
582       &                num_precip,       &                num_precip,
583       &                num_swflux,       &                num_swflux,
584         &                num_swdown,
585         &                num_snowprecip,
586         &                num_lwflux,
587         &                num_lwdown,
588         &                num_evap,
589         &                num_apressure,
590         &                num_runoff,
591       &                num_uwind,       &                num_uwind,
592       &                num_vwind,       &                num_vwind,
593       &                num_atempm,       &                num_atempm,
594       &                num_aqhm,       &                num_aqhm,
595       &                num_precipm,       &                num_precipm,
596       &                num_swfluxm,       &                num_swfluxm,
597         &                num_swdownm,
598         &                num_snowprecipm,
599         &                num_lwfluxm,
600         &                num_lwdownm,
601         &                num_evapm,
602         &                num_apressurem,
603         &                num_runoffm,
604       &                num_uwindm,       &                num_uwindm,
605       &                num_vwindm,       &                num_vwindm,
606       &                num_obcsn,       &                num_obcsn,
# Line 457  c                  function contribution Line 610  c                  function contribution
610       &                num_obcsvol,       &                num_obcsvol,
611       &                num_curmtr,       &                num_curmtr,
612       &                num_ageos,       &                num_ageos,
613       &                num_ice,       &                num_kapgm,
614         &                num_kapredi,
615       &                num_diffkr,       &                num_diffkr,
616       &                num_theta_ini_fin,       &                num_theta_ini_fin,
617       &                num_salt_ini_fin,       &                num_salt_ini_fin,
618       &                num_eddytau       &                num_eddytau,
619         &                num_bottomdrag,
620         &                num_transp
621    
622        _RL  num_hflux  (nsx,nsy)        _RL  num_hflux  (nsx,nsy)
623        _RL  num_hfluxm (nsx,nsy)        _RL  num_hfluxm (nsx,nsy)
# Line 475  c                  function contribution Line 631  c                  function contribution
631        _RL  num_tauvm  (nsx,nsy)        _RL  num_tauvm  (nsx,nsy)
632        _RL  num_hmean        _RL  num_hmean
633        _RL  num_h    (nsx,nsy)        _RL  num_h    (nsx,nsy)
634          _RL  num_tp   (nsx,nsy)
635          _RL  num_ers  (nsx,nsy)
636          _RL  num_gfo  (nsx,nsy)
637          _RL  num_sshv4cost(NSSHV4COST,nsx,nsy)
638        _RL  num_temp (nsx,nsy)        _RL  num_temp (nsx,nsy)
639        _RL  num_salt (nsx,nsy)        _RL  num_salt (nsx,nsy)
640        _RL  num_temp0(nsx,nsy)        _RL  num_temp0(nsx,nsy)
641        _RL  num_salt0(nsx,nsy)        _RL  num_salt0(nsx,nsy)
642        _RL  num_sst  (nsx,nsy)        _RL  num_sst  (nsx,nsy)
643        _RL  num_tmi  (nsx,nsy)        _RL  num_tmi  (nsx,nsy)
644        _RL  num_sss  (nsx,nsy)        _RL  num_sss  (nsx,nsy)
645          _RL  num_bp   (nsx,nsy)
646        _RL  num_ctdt (nsx,nsy)        _RL  num_ctdt (nsx,nsy)
647        _RL  num_ctds (nsx,nsy)        _RL  num_ctds (nsx,nsy)
648        _RL  num_ctdtclim (nsx,nsy)        _RL  num_ctdtclim (nsx,nsy)
# Line 489  c                  function contribution Line 650  c                  function contribution
650        _RL  num_xbt  (nsx,nsy)        _RL  num_xbt  (nsx,nsy)
651        _RL  num_argot(nsx,nsy)        _RL  num_argot(nsx,nsy)
652        _RL  num_argos(nsx,nsy)        _RL  num_argos(nsx,nsy)
653          _RL  num_usercost(NUSERCOST,nsx,nsy)
654        _RL  num_drift(nsx,nsy)        _RL  num_drift(nsx,nsy)
655        _RL  num_tdrift(nsx,nsy)        _RL  num_tdrift(nsx,nsy)
656        _RL  num_sdrift(nsx,nsy)        _RL  num_sdrift(nsx,nsy)
# Line 501  c                  function contribution Line 663  c                  function contribution
663        _RL  num_aqh  (nsx,nsy)        _RL  num_aqh  (nsx,nsy)
664        _RL  num_precip(nsx,nsy)        _RL  num_precip(nsx,nsy)
665        _RL  num_swflux(nsx,nsy)        _RL  num_swflux(nsx,nsy)
666          _RL  num_swdown(nsx,nsy)
667          _RL  num_snowprecip(nsx,nsy)
668          _RL  num_lwflux(nsx,nsy)
669          _RL  num_lwdown(nsx,nsy)
670          _RL  num_evap(nsx,nsy)
671          _RL  num_apressure(nsx,nsy)
672          _RL  num_runoff(nsx,nsy)
673        _RL  num_uwind(nsx,nsy)        _RL  num_uwind(nsx,nsy)
674        _RL  num_vwind(nsx,nsy)        _RL  num_vwind(nsx,nsy)
675        _RL  num_atempm(nsx,nsy)        _RL  num_atempm(nsx,nsy)
676        _RL  num_aqhm  (nsx,nsy)        _RL  num_aqhm  (nsx,nsy)
677        _RL  num_precipm(nsx,nsy)        _RL  num_precipm(nsx,nsy)
678        _RL  num_swfluxm(nsx,nsy)        _RL  num_swfluxm(nsx,nsy)
679          _RL  num_swdownm(nsx,nsy)
680          _RL  num_snowprecipm(nsx,nsy)
681          _RL  num_lwfluxm(nsx,nsy)
682          _RL  num_lwdownm(nsx,nsy)
683          _RL  num_evapm(nsx,nsy)
684          _RL  num_apressurem(nsx,nsy)
685          _RL  num_runoffm(nsx,nsy)
686        _RL  num_uwindm(nsx,nsy)        _RL  num_uwindm(nsx,nsy)
687        _RL  num_vwindm(nsx,nsy)        _RL  num_vwindm(nsx,nsy)
688        _RL  num_obcsn(nsx,nsy)        _RL  num_obcsn(nsx,nsy)
# Line 516  c                  function contribution Line 692  c                  function contribution
692        _RL  num_obcsvol        _RL  num_obcsvol
693        _RL  num_curmtr(nsx,nsy)        _RL  num_curmtr(nsx,nsy)
694        _RL  num_ageos(nsx,nsy)        _RL  num_ageos(nsx,nsy)
       _RL  num_ice  (nsx,nsy)  
695        _RL  num_kapgm(nsx,nsy)        _RL  num_kapgm(nsx,nsy)
696          _RL  num_kapredi(nsx,nsy)
697        _RL  num_diffkr(nsx,nsy)        _RL  num_diffkr(nsx,nsy)
698        _RL  num_theta_ini_fin(nsx,nsy)        _RL  num_theta_ini_fin(nsx,nsy)
699        _RL  num_salt_ini_fin(nsx,nsy)        _RL  num_salt_ini_fin(nsx,nsy)
700        _RL  num_eddytau(nsx,nsy)        _RL  num_eddytau(nsx,nsy)
701          _RL  num_bottomdrag(nsx,nsy)
702          _RL  num_transp
703    
704        common /ecco_cost_aux_r/        common /ecco_cost_aux_r/
705       &                    mult_hflux,       &                    mult_hflux,
706       &                    mult_sflux,       &                    mult_sflux,
707         &                    mult_hfluxmm,
708         &                    mult_sfluxmm,
709       &                    mult_tauu,       &                    mult_tauu,
710       &                    mult_tauv,       &                    mult_tauv,
711       &                    mult_hmean,       &                    mult_hmean,
712       &                    mult_h,       &                    mult_h,
713         &                    mult_tp,
714         &                    mult_ers,
715         &                    mult_gfo,
716         &                    mult_sshv4cost,
717       &                    mult_temp,       &                    mult_temp,
718       &                    mult_salt,       &                    mult_salt,
719       &                    mult_temp0,       &                    mult_temp0,
# Line 537  c                  function contribution Line 721  c                  function contribution
721       &                    mult_sst,       &                    mult_sst,
722       &                    mult_tmi,       &                    mult_tmi,
723       &                    mult_sss,       &                    mult_sss,
724         &                    mult_bp,
725       &                    mult_ctdt,       &                    mult_ctdt,
726       &                    mult_ctds,       &                    mult_ctds,
727       &                    mult_ctdtclim,       &                    mult_ctdtclim,
# Line 544  c                  function contribution Line 729  c                  function contribution
729       &                    mult_xbt,       &                    mult_xbt,
730       &                    mult_argot,       &                    mult_argot,
731       &                    mult_argos,       &                    mult_argos,
732         &                    mult_usercost,
733       &                    mult_drift,       &                    mult_drift,
734       &                    mult_tdrift,       &                    mult_tdrift,
735       &                    mult_sdrift,       &                    mult_sdrift,
# Line 554  c                  function contribution Line 740  c                  function contribution
740       &                    mult_aqh,       &                    mult_aqh,
741       &                    mult_precip,       &                    mult_precip,
742       &                    mult_swflux,       &                    mult_swflux,
743         &                    mult_swdown,
744         &                    mult_snowprecip,
745         &                    mult_lwflux,
746         &                    mult_lwdown,
747         &                    mult_evap,
748         &                    mult_apressure,
749         &                    mult_runoff,
750       &                    mult_uwind,       &                    mult_uwind,
751       &                    mult_vwind,       &                    mult_vwind,
752       &                    mult_obcsn,       &                    mult_obcsn,
# Line 563  c                  function contribution Line 756  c                  function contribution
756       &                    mult_obcsvol,       &                    mult_obcsvol,
757       &                    mult_curmtr,       &                    mult_curmtr,
758       &                    mult_ageos,       &                    mult_ageos,
      &                    mult_ice,  
759       &                    mult_kapgm,       &                    mult_kapgm,
760         &                    mult_kapredi,
761       &                    mult_diffkr,       &                    mult_diffkr,
762       &                    mult_ini_fin,       &                    mult_ini_fin,
763       &                    mult_eddytau       &                    mult_edtau,
764         &                    mult_bottomdrag,
765         &                    mult_smooth_ic,
766         &                    mult_smooth_bc,
767         &                    mult_transp
768        _RL  mult_hflux        _RL  mult_hflux
769        _RL  mult_sflux        _RL  mult_sflux
770          _RL  mult_hfluxmm
771          _RL  mult_sfluxmm
772        _RL  mult_tauu        _RL  mult_tauu
773        _RL  mult_tauv        _RL  mult_tauv
774        _RL  mult_hmean        _RL  mult_hmean
775        _RL  mult_h        _RL  mult_h
776          _RL  mult_tp
777          _RL  mult_ers
778          _RL  mult_gfo
779          _RL  mult_sshv4cost(NSSHV4COST)
780        _RL  mult_temp        _RL  mult_temp
781        _RL  mult_salt        _RL  mult_salt
782        _RL  mult_temp0        _RL  mult_temp0
# Line 582  c                  function contribution Line 784  c                  function contribution
784        _RL  mult_sst        _RL  mult_sst
785        _RL  mult_tmi        _RL  mult_tmi
786        _RL  mult_sss        _RL  mult_sss
787          _RL  mult_bp
788        _RL  mult_ctdt        _RL  mult_ctdt
789        _RL  mult_ctds        _RL  mult_ctds
790        _RL  mult_ctdtclim        _RL  mult_ctdtclim
# Line 589  c                  function contribution Line 792  c                  function contribution
792        _RL  mult_xbt        _RL  mult_xbt
793        _RL  mult_argot        _RL  mult_argot
794        _RL  mult_argos        _RL  mult_argos
795          _RL  mult_usercost(NUSERCOST)
796        _RL  mult_drift        _RL  mult_drift
797        _RL  mult_tdrift        _RL  mult_tdrift
798        _RL  mult_sdrift        _RL  mult_sdrift
# Line 599  c                  function contribution Line 803  c                  function contribution
803        _RL  mult_aqh        _RL  mult_aqh
804        _RL  mult_precip        _RL  mult_precip
805        _RL  mult_swflux        _RL  mult_swflux
806          _RL  mult_swdown
807          _RL  mult_snowprecip
808          _RL  mult_lwflux
809          _RL  mult_lwdown
810          _RL  mult_evap
811          _RL  mult_apressure
812          _RL  mult_runoff
813        _RL  mult_uwind        _RL  mult_uwind
814        _RL  mult_vwind        _RL  mult_vwind
815        _RL  mult_obcsn        _RL  mult_obcsn
# Line 608  c                  function contribution Line 819  c                  function contribution
819        _RL  mult_obcsvol        _RL  mult_obcsvol
820        _RL  mult_curmtr        _RL  mult_curmtr
821        _RL  mult_ageos        _RL  mult_ageos
       _RL  mult_ice  
822        _RL  mult_kapgm        _RL  mult_kapgm
823          _RL  mult_kapredi
824        _RL  mult_diffkr        _RL  mult_diffkr
825        _RL  mult_ini_fin        _RL  mult_ini_fin
826        _RL  mult_eddytau        _RL  mult_edtau
827          _RL  mult_bottomdrag
828          _RL  mult_smooth_ic
829          _RL  mult_smooth_bc
830          _RL  mult_transp
831    
832  c     Record counters relevant for the cost function evaluation.  c     Record counters relevant for the cost function evaluation.
833  c     ==========================================================  c     ==========================================================
834  c  c
835  c     nmonsrec - number of monthly records that will be generated by  c     nyearsrec - number of yearly records that will be generated by
836  c                the current model integration.  c                 the current model integration.
837  c     ndaysrec - number of  daily  records that will be generated by  c     nmonsrec  - number of monthly records that will be generated by
838  c                the current model integration.  c                 the current model integration.
839    c     ndaysrec  - number of  daily  records that will be generated by
840    c                 the current model integration.
841    
842        common /ecco_cost_i/        common /ecco_cost_i/
843         &                nyearsrec,
844       &                nmonsrec,       &                nmonsrec,
845       &                ndaysrec       &                ndaysrec,
846         &                nnztbar,
847         &                nnzsbar
848          integer nyearsrec
849        integer nmonsrec        integer nmonsrec
850        integer ndaysrec        integer ndaysrec
851          integer nnztbar
852          integer nnzsbar
853    
854    
855  c     Data files for the weights used in the cost function:  c     Data files for the weights used in the cost function:
# Line 651  c     salterrfile           - representa Line 874  c     salterrfile           - representa
874  c     temperrfile           - representation error due unresolved eddies  c     temperrfile           - representation error due unresolved eddies
875  c     velerrfile            - representation error  c     velerrfile            - representation error
876    
877        common /ecco_cost_c/        common /ecco_cost_c/
878       &                hflux_errfile,       &                hflux_errfile,
879       &                hfluxm_errfile,       &                hfluxm_errfile,
880       &                sflux_errfile,       &                sflux_errfile,
# Line 666  c     velerrfile            - representa Line 889  c     velerrfile            - representa
889       &                geoid_errfile,       &                geoid_errfile,
890       &                geoid_covariancefile,       &                geoid_covariancefile,
891       &                ssh_errfile,       &                ssh_errfile,
892         &                tp_errfile,
893         &                ers_errfile,
894         &                gfo_errfile,
895         &                sshv4cost_scalefile,
896         &                sshv4cost_errfile,
897       &                ctdt_errfile,       &                ctdt_errfile,
898       &                ctds_errfile,       &                ctds_errfile,
899       &                drift_errfile,       &                drift_errfile,
900       &                udrifterrfile,       &                udrifterrfile,
901       &                vdrifterrfile,       &                vdrifterrfile,
902       &                salterrfile,       &                salterrfile,
903       &                temperrfile,       &                temperrfile,
904       &                velerrfile,       &                velerrfile,
905         &                salt0errfile,
906         &                temp0errfile,
907         &                vel0errfile,
908         &                ssterrfile,
909         &                ssserrfile,
910         &                bperrfile,
911       &                atemp_errfile,       &                atemp_errfile,
912       &                aqh_errfile,       &                aqh_errfile,
913       &                precip_errfile,       &                precip_errfile,
914       &                swflux_errfile,       &                swflux_errfile,
915         &                swdown_errfile,
916         &                snowprecip_errfile,
917         &                lwflux_errfile,
918         &                lwdown_errfile,
919         &                evap_errfile,
920         &                apressure_errfile,
921         &                runoff_errfile,
922         &                edtau_errfile,
923         &                kapgm_errfile,
924         &                kapredi_errfile,
925         &                diffkr_errfile,
926         &                bottomdrag_errfile,
927         &                usercost_errfile,
928       &                uwind_errfile,       &                uwind_errfile,
929       &                vwind_errfile       &                vwind_errfile
930        character*(MAX_LEN_FNAM) hflux_errfile        character*(MAX_LEN_FNAM) hflux_errfile
# Line 694  c     velerrfile            - representa Line 941  c     velerrfile            - representa
941        character*(MAX_LEN_FNAM) geoid_errfile        character*(MAX_LEN_FNAM) geoid_errfile
942        character*(MAX_LEN_FNAM) geoid_covariancefile        character*(MAX_LEN_FNAM) geoid_covariancefile
943        character*(MAX_LEN_FNAM) ssh_errfile        character*(MAX_LEN_FNAM) ssh_errfile
944        character*(MAX_LEN_FNAM) ctdt_errfile        character*(MAX_LEN_FNAM) tp_errfile
945        character*(MAX_LEN_FNAM) ctds_errfile        character*(MAX_LEN_FNAM) ers_errfile
946          character*(MAX_LEN_FNAM) gfo_errfile
947          character*(MAX_LEN_FNAM) sshv4cost_scalefile(NSSHV4COST)
948          character*(MAX_LEN_FNAM) sshv4cost_errfile(NSSHV4COST)
949          character*(MAX_LEN_FNAM) ctdt_errfile
950          character*(MAX_LEN_FNAM) ctds_errfile
951        character*(MAX_LEN_FNAM) drift_errfile        character*(MAX_LEN_FNAM) drift_errfile
952        character*(MAX_LEN_FNAM) udrifterrfile        character*(MAX_LEN_FNAM) udrifterrfile
953        character*(MAX_LEN_FNAM) vdrifterrfile              character*(MAX_LEN_FNAM) vdrifterrfile
954        character*(MAX_LEN_FNAM) salterrfile        character*(MAX_LEN_FNAM) salterrfile
955        character*(MAX_LEN_FNAM) temperrfile        character*(MAX_LEN_FNAM) temperrfile
956        character*(MAX_LEN_FNAM) velerrfile        character*(MAX_LEN_FNAM) velerrfile
957          character*(MAX_LEN_FNAM) salt0errfile
958          character*(MAX_LEN_FNAM) temp0errfile
959          character*(MAX_LEN_FNAM) vel0errfile
960          character*(MAX_LEN_FNAM) ssterrfile
961          character*(MAX_LEN_FNAM) ssserrfile
962          character*(MAX_LEN_FNAM) bperrfile
963        character*(MAX_LEN_FNAM) atemp_errfile        character*(MAX_LEN_FNAM) atemp_errfile
964        character*(MAX_LEN_FNAM) aqh_errfile        character*(MAX_LEN_FNAM) aqh_errfile
965        character*(MAX_LEN_FNAM) precip_errfile        character*(MAX_LEN_FNAM) precip_errfile
966        character*(MAX_LEN_FNAM) swflux_errfile        character*(MAX_LEN_FNAM) swflux_errfile
967          character*(MAX_LEN_FNAM) swdown_errfile
968          character*(MAX_LEN_FNAM) snowprecip_errfile
969          character*(MAX_LEN_FNAM) lwflux_errfile
970          character*(MAX_LEN_FNAM) lwdown_errfile
971          character*(MAX_LEN_FNAM) evap_errfile
972          character*(MAX_LEN_FNAM) apressure_errfile
973          character*(MAX_LEN_FNAM) runoff_errfile
974          character*(MAX_LEN_FNAM) edtau_errfile
975          character*(MAX_LEN_FNAM) kapgm_errfile
976          character*(MAX_LEN_FNAM) kapredi_errfile
977          character*(MAX_LEN_FNAM) diffkr_errfile
978          character*(MAX_LEN_FNAM) bottomdrag_errfile
979          character*(MAX_LEN_FNAM) usercost_errfile(NUSERCOST)
980        character*(MAX_LEN_FNAM) uwind_errfile        character*(MAX_LEN_FNAM) uwind_errfile
981        character*(MAX_LEN_FNAM) vwind_errfile        character*(MAX_LEN_FNAM) vwind_errfile
982    
# Line 734  c     wctds      - weight for CTD salini Line 1005  c     wctds      - weight for CTD salini
1005  c     wudrift    - weight for mean zonal velocity from drifters.  c     wudrift    - weight for mean zonal velocity from drifters.
1006  c     wvdrift    - weight for mean meridional velocity from drifters.  c     wvdrift    - weight for mean meridional velocity from drifters.
1007    
1008        common /ecco_cost_weights_r/        common /ecco_cost_weights_r/
1009       &                      frame,       &                      frame,
1010       &                      cosphi,       &                      cosphi,
1011       &                      whflux,wsflux,wtauu,wtauv,       &                      whflux,wsflux,wtauu,wtauv,
1012       &                      watemp,waqh,wprecip,wswflux,wuwind,wvwind,       &                      watemp,waqh,wprecip,wsnowprecip,
1013         &                      wswflux,wswdown,wlwflux,wlwdown,
1014         &                      wevap,wapressure,wrunoff,
1015         &                      wbottomdrag,
1016         &                      wuwind,wvwind,
1017       &                      wscatx,wscaty,       &                      wscatx,wscaty,
1018       &                      wtheta,wtheta2,wthetaLev,       &                      wtheta,wtheta2,wthetaLev,
1019       &                      wsalt,wsalt2,wsaltLev,       &                      wsalt,wsalt2,wsaltLev,
1020       &                      wsst,wsss,       &                      wdiffkr,wdiffkr2,wdiffkrFld,
1021       &                      wtp,wers,       &                      wkapgm,wkapgm2,wkapgmFld,
1022       &                      wp,       &                      wkapredi,wkapredi2,wkaprediFld,
1023         &                      wedtaux,wedtaux2,wedtauxFld,
1024         &                      wedtauy,wedtauy2,wedtauyFld,
1025         &                      wsst,wsss,wbp,
1026         &                      wtp,wers,wgfo,
1027         &                      wp,wsshv4,
1028       &                      wctdt,wctds,       &                      wctdt,wctds,
1029       &                      wudrift,wvdrift,       &                      wudrift,wvdrift,
1030       &                      whfluxmm,wsfluxmm,       &                      whfluxmm,wsfluxmm,
# Line 769  c     wvdrift    - weight for mean merid Line 1049  c     wvdrift    - weight for mean merid
1049        _RL waqh    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL waqh    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1050        _RL wprecip (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wprecip (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1051        _RL wswflux (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wswflux (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1052          _RL wswdown (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1053          _RL wsnowprecip (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1054          _RL wlwflux (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1055          _RL wlwdown (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1056          _RL wevap   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1057          _RL wapressure(1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1058          _RL wrunoff (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1059          _RL wbottomdrag (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
1060        _RL wuwind  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wuwind  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1061        _RL wvwind  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wvwind  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1062        _RL wtheta  (                            nr,nsx,nsy)        _RL wtheta  (                            nr,nsx,nsy)
# Line 779  c     wvdrift    - weight for mean merid Line 1067  c     wvdrift    - weight for mean merid
1067        _RL wsaltLev  (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL wsaltLev  (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1068        _RL wsst    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wsst    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1069        _RL wsss    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wsss    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1070          _RL wbp     (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1071        _RL wtp     (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wtp     (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1072          _RL wsshv4  (1-olx:snx+olx,1-oly:sny+oly,NSSHV4COST,nsx,nsy)
1073        _RL wers    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wers    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1074          _RL wgfo    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1075        _RL wp      (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wp      (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1076        _RL wctdt   (                            nr,nsx,nsy)        _RL wctdt   (                            nr,nsx,nsy)
1077        _RL wctds   (                            nr,nsx,nsy)        _RL wctds   (                            nr,nsx,nsy)
# Line 790  c     wvdrift    - weight for mean merid Line 1081  c     wvdrift    - weight for mean merid
1081        _RL wcurrent2   (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL wcurrent2   (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1082        _RL wcurrentLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL wcurrentLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1083        _RL wbaro        _RL wbaro
1084          _RL wdiffkr (                            nr,nsx,nsy)
1085          _RL wdiffkr2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1086          _RL wdiffkrFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1087          _RL wkapgm (                            nr,nsx,nsy)
1088          _RL wkapgm2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1089          _RL wkapgmFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1090          _RL wkapredi (                            nr,nsx,nsy)
1091          _RL wkapredi2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1092          _RL wkaprediFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1093          _RL wedtaux (                            nr,nsx,nsy)
1094          _RL wedtaux2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1095          _RL wedtauxFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1096          _RL wedtauy (                            nr,nsx,nsy)
1097          _RL wedtauy2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1098          _RL wedtauyFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1099    
1100        common /ecco_cost_weights_0_r/        common /ecco_cost_weights_0_r/
1101       &        whflux0, wsflux0, wtau0,       &        whflux0, wsflux0, wtau0,
1102       &        watemp0, waqh0, wprecip0, wswflux0, wwind0       &        watemp0, waqh0, wprecip0, wsnowprecip0, wwind0,
1103         &        wswflux0, wswdown0, wlwflux0, wlwdown0,
1104         &        wevap0, wapressure0, wrunoff0, wkapredi0,
1105         &        wbottomdrag0,wdiffkr0, wkapgm0, wedtau0
1106        _RL whflux0        _RL whflux0
1107        _RL wsflux0        _RL wsflux0
1108        _RL wtau0        _RL wtau0
# Line 801  c     wvdrift    - weight for mean merid Line 1110  c     wvdrift    - weight for mean merid
1110        _RL waqh0        _RL waqh0
1111        _RL wprecip0        _RL wprecip0
1112        _RL wswflux0        _RL wswflux0
1113          _RL wswdown0
1114          _RL wsnowprecip0
1115          _RL wlwflux0
1116          _RL wlwdown0
1117          _RL wevap0
1118          _RL wapressure0
1119          _RL wrunoff0
1120          _RL wbottomdrag0
1121        _RL wwind0        _RL wwind0
1122          _RL wdiffkr0
1123          _RL wkapgm0
1124          _RL wkapredi0
1125          _RL wedtau0
1126    
1127        common /ecco_cost_weights_mean_r/        common /ecco_cost_weights_mean_r/
1128       &        wmean_hflux, wmean_sflux, wmean_tau,       &        wmean_hflux, wmean_sflux, wmean_tau,
1129       &        wmean_atemp, wmean_aqh,       &        wmean_atemp, wmean_aqh,
1130       &        wmean_precip, wmean_swflux, wmean_wind       &        wmean_precip, wmean_snowprecip, wmean_wind,
1131         &        wmean_swflux, wmean_swdown, wmean_lwflux, wmean_lwdown,
1132         &        wmean_evap, wmean_apressure, wmean_runoff
1133        _RL wmean_hflux        _RL wmean_hflux
1134        _RL wmean_sflux        _RL wmean_sflux
1135        _RL wmean_tau        _RL wmean_tau
# Line 814  c     wvdrift    - weight for mean merid Line 1137  c     wvdrift    - weight for mean merid
1137        _RL wmean_aqh        _RL wmean_aqh
1138        _RL wmean_precip        _RL wmean_precip
1139        _RL wmean_swflux        _RL wmean_swflux
1140          _RL wmean_swdown
1141          _RL wmean_snowprecip
1142          _RL wmean_lwflux
1143          _RL wmean_lwdown
1144          _RL wmean_evap
1145          _RL wmean_apressure
1146          _RL wmean_runoff
1147        _RL wmean_wind        _RL wmean_wind
1148                                                    
1149        common /ecco_cost_weights_2_r/        common /ecco_cost_weights_2_r/
1150       &                      whflux2,wsflux2,wtauu2,wtauv2       &                      whflux2,wsflux2,wtauu2,wtauv2
1151        _RL whflux2 (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL whflux2 (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1152        _RL wsflux2 (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wsflux2 (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1153        _RL wtauu2  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wtauu2  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1154        _RL wtauv2  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wtauv2  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
                                                   
                         
1155    
1156  #if (defined (ALLOW_OBCSN_COST_CONTRIBUTION) || \  #if (defined (ALLOW_OBCSN_COST_CONTRIBUTION) || \
1157       defined (ALLOW_OBCSN_CONTROL))       defined (ALLOW_OBCSN_CONTROL))
# Line 864  c     scatydat   - reference meridional Line 1192  c     scatydat   - reference meridional
1192  c     sstdat     - reference sea surface temperature data.  c     sstdat     - reference sea surface temperature data.
1193  c     tmidat     - reference TMI sea surface temperature data.  c     tmidat     - reference TMI sea surface temperature data.
1194  c     sssdat     - reference sea surface temperature data.  c     sssdat     - reference sea surface temperature data.
1195    c     bpdat      - bottom pressure from time-varying GRACE.
1196  c     tauxmask   - mask for reference wind stress data.  c     tauxmask   - mask for reference wind stress data.
1197  c     tauymask   - mask for reference wind stress data.  c     tauymask   - mask for reference wind stress data.
1198  c     scatxmask  - mask for scat wind stress data.  c     scatxmask  - mask for scat wind stress data.
1199  c     scatymask  - mask for scat wind stress data.  c     scatymask  - mask for scat wind stress data.
1200  c     sstmask    - mask for reference sea surface temperature data.  c     sstmask    - mask for reference sea surface temperature data.
1201  c     tmimask    - mask for reference sea surface temperature data.  c     tmimask    - mask for reference sea surface temperature data.
1202  c     sssmask    - mask for reference sea surface temperature data.  c     sssmask    - mask for reference sea surface temperature data.
# Line 880  c     ersobs     - ERS data. Line 1209  c     ersobs     - ERS data.
1209  c     ersmask    - mask for ERS data.  c     ersmask    - mask for ERS data.
1210  c     ctdtobs    - CTD temperature data  c     ctdtobs    - CTD temperature data
1211  c     ctdsobs    - CTD salinity data  c     ctdsobs    - CTD salinity data
1212  c     xbtobs     - XBT data  c     xbtobs     - XBT data
1213  c     argot      - ARGO  temperature data  c     argot      - ARGO  temperature data
1214  c     argos      - ARGO  salt data  c     argos      - ARGO  salt data
1215  c     udriftdat  - drifters zonal velocities  c     udriftdat  - drifters zonal velocities
1216  c     vdriftdat  - drifters meridional velocities  c     vdriftdat  - drifters meridional velocities
1217    
# Line 890  c     vdriftdat  - drifters meridional v Line 1219  c     vdriftdat  - drifters meridional v
1219       &                     tdat,       &                     tdat,
1220       &                     scatxdat,       &                     scatxdat,
1221       &                     scatydat,       &                     scatydat,
1222       &                     sstdat,       &                     bpdat,
      &                     tmidat,  
      &                     sssdat,  
1223       &                     sstmask,       &                     sstmask,
1224       &                     tmimask,       &                     tmimask,
1225       &                     sssmask,       &                     sssmask,
1226         &                     bpmask,
1227       &                     tauxmask,       &                     tauxmask,
1228       &                     tauymask,       &                     tauymask,
1229       &                     scatxmask,       &                     scatxmask,
# Line 907  c     vdriftdat  - drifters meridional v Line 1235  c     vdriftdat  - drifters meridional v
1235       &                     tpmask,       &                     tpmask,
1236       &                     ersobs,       &                     ersobs,
1237       &                     ersmask,       &                     ersmask,
1238         &                     gfoobs,
1239         &                     gfomask,
1240       &                     ctdtobs,       &                     ctdtobs,
1241       &                     ctdsobs,       &                     ctdsobs,
1242       &                     xbtobs,       &                     xbtobs,
# Line 916  c     vdriftdat  - drifters meridional v Line 1246  c     vdriftdat  - drifters meridional v
1246       &                     vdriftdat,       &                     vdriftdat,
1247       &                     curmtruobs,       &                     curmtruobs,
1248       &                     curmtrvobs       &                     curmtrvobs
1249        
1250        _RL tdat      (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL tdat      (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1251        _RL scatxdat  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL scatxdat  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1252        _RL scatydat  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL scatydat  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1253        _RL sstdat    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL bpdat     (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
       _RL tmidat    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)  
       _RL sssdat    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)  
1254        _RL tauxmask  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tauxmask  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1255        _RL tauymask  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tauymask  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1256        _RL scatxmask (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL scatxmask (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
# Line 930  c     vdriftdat  - drifters meridional v Line 1258  c     vdriftdat  - drifters meridional v
1258        _RL sstmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL sstmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1259        _RL tmimask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tmimask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1260        _RL sssmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL sssmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1261          _RL bpmask    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1262        _RL sdat      (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL sdat      (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1263        _RL tpmean    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tpmean    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1264        _RL tpmeanmask(1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tpmeanmask(1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
# Line 937  c     vdriftdat  - drifters meridional v Line 1266  c     vdriftdat  - drifters meridional v
1266        _RL tpmask    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tpmask    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1267        _RL ersobs    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL ersobs    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1268        _RL ersmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL ersmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1269          _RL gfoobs    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1270          _RL gfomask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1271        _RL ctdtobs   (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL ctdtobs   (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1272        _RL ctdsobs   (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL ctdsobs   (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1273        _RL xbtobs    (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL xbtobs    (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
# Line 962  c     topexfile     - reference data fil Line 1293  c     topexfile     - reference data fil
1293  c                     (TOPEX/POSEIDON).  c                     (TOPEX/POSEIDON).
1294  c     ersfile       - reference data file for sea surface height data  c     ersfile       - reference data file for sea surface height data
1295  c                     (ERS).  c                     (ERS).
1296  c ctdtfile, ctdsfile- reference data file for temperature and salinity  c ctdtfile, ctdsfile- reference data file for temperature and salinity
1297  c                     from CTD  c                     from CTD
1298  c ctdtclimfile, ctdsclimfile- reference data file for temperature  c ctdtclimfile, ctdsclimfile- reference data file for temperature
1299  c                      and salinity from CTD with out timetag  c                      and salinity from CTD with out timetag
1300  c     xbtfile       - reference data file for xbt  c     xbtfile       - reference data file for xbt
1301  c     ARGOtfile     - reference data file for ARGO  c     ARGOtfile     - reference data file for ARGO
1302  c     ARGOsfile     - reference data file for ARGO  c     ARGOsfile     - reference data file for ARGO
1303  c     driftfile     - reference data file for drifter's mean velocities  c     driftfile     - reference data file for drifter mean velocities
1304    
1305        common /ecco_cost_data_c/        common /ecco_cost_data_c/
1306       &                     tdatfile,       &                     tdatfile,
# Line 979  c     driftfile     - reference data fil Line 1310  c     driftfile     - reference data fil
1310       &                     sstdatfile,       &                     sstdatfile,
1311       &                     tmidatfile,       &                     tmidatfile,
1312       &                     sssdatfile,       &                     sssdatfile,
1313         &                     bpdatfile,
1314       &                     topexmeanfile,       &                     topexmeanfile,
1315       &                     topexfile,       &                     topexfile,
1316       &                     ersfile,       &                     ersfile,
1317         &                     gfofile,
1318       &                     ctdtfile,       &                     ctdtfile,
1319       &                     ctdsfile,       &                     ctdsfile,
1320       &                     ctdtclimfile,       &                     ctdtclimfile,
# Line 989  c     driftfile     - reference data fil Line 1322  c     driftfile     - reference data fil
1322       &                     xbtfile,       &                     xbtfile,
1323       &                     argotfile,       &                     argotfile,
1324       &                     argosfile,       &                     argosfile,
1325       &                     udriftfile,       &                     udriftfile,
1326       &                     vdriftfile,       &                     vdriftfile,
1327         &                     usercost_datafile,
1328       &                     curmtrufile,       &                     curmtrufile,
1329       &                     curmtrvfile       &                     curmtrvfile
1330    
# Line 1001  c     driftfile     - reference data fil Line 1335  c     driftfile     - reference data fil
1335        character*(MAX_LEN_FNAM) sstdatfile        character*(MAX_LEN_FNAM) sstdatfile
1336        character*(MAX_LEN_FNAM) tmidatfile        character*(MAX_LEN_FNAM) tmidatfile
1337        character*(MAX_LEN_FNAM) sssdatfile        character*(MAX_LEN_FNAM) sssdatfile
1338          character*(MAX_LEN_FNAM) bpdatfile
1339        character*(MAX_LEN_FNAM) topexmeanfile        character*(MAX_LEN_FNAM) topexmeanfile
1340        character*(MAX_LEN_FNAM) topexfile        character*(MAX_LEN_FNAM) topexfile
1341        character*(MAX_LEN_FNAM) ersfile        character*(MAX_LEN_FNAM) ersfile
1342          character*(MAX_LEN_FNAM) gfofile
1343        character*(MAX_LEN_FNAM) ctdtfile        character*(MAX_LEN_FNAM) ctdtfile
1344        character*(MAX_LEN_FNAM) ctdsfile        character*(MAX_LEN_FNAM) ctdsfile
1345        character*(MAX_LEN_FNAM) ctdtclimfile        character*(MAX_LEN_FNAM) ctdtclimfile
# Line 1012  c     driftfile     - reference data fil Line 1348  c     driftfile     - reference data fil
1348        character*(MAX_LEN_FNAM) argotfile        character*(MAX_LEN_FNAM) argotfile
1349        character*(MAX_LEN_FNAM) argosfile        character*(MAX_LEN_FNAM) argosfile
1350        character*(MAX_LEN_FNAM) argofile        character*(MAX_LEN_FNAM) argofile
1351          character*(MAX_LEN_FNAM) usercost_datafile(NUSERCOST)
1352        character*(MAX_LEN_FNAM) udriftfile        character*(MAX_LEN_FNAM) udriftfile
1353        character*(MAX_LEN_FNAM) vdriftfile              character*(MAX_LEN_FNAM) vdriftfile
1354        character*(MAX_LEN_FNAM) curmtrufile        character*(MAX_LEN_FNAM) curmtrufile
1355        character*(MAX_LEN_FNAM) curmtrvfile        character*(MAX_LEN_FNAM) curmtrvfile
1356    
# Line 1025  c     using_ers - flag that indicates th Line 1362  c     using_ers - flag that indicates th
1362    
1363        common /ecco_cost_data_flags/        common /ecco_cost_data_flags/
1364       &                         using_topex,       &                         using_topex,
1365       &                         using_ers       &                         using_ers,
1366         &                         using_gfo
1367        logical using_topex        logical using_topex
1368        logical using_ers        logical using_ers
1369          logical using_gfo
1370    
1371  c     Calendar information for the observations:  c     Calendar information for the observations:
1372  c     ==========================================  c     ==========================================
# Line 1046  c     sshperiod      - sampling interval Line 1385  c     sshperiod      - sampling interval
1385       &                           argosstartdate,       &                           argosstartdate,
1386       &                           tmistartdate,       &                           tmistartdate,
1387       &                           sssstartdate,       &                           sssstartdate,
1388         &                           bpstartdate,
1389       &                           topexstartdate,       &                           topexstartdate,
1390       &                           ersstartdate       &                           ersstartdate,
1391         &                           gfostartdate
1392        integer scatxstartdate(4)        integer scatxstartdate(4)
1393        integer scatystartdate(4)        integer scatystartdate(4)
1394        integer sststartdate(4)        integer sststartdate(4)
# Line 1055  c     sshperiod      - sampling interval Line 1396  c     sshperiod      - sampling interval
1396        integer argosstartdate(4)        integer argosstartdate(4)
1397        integer tmistartdate(4)        integer tmistartdate(4)
1398        integer sssstartdate(4)        integer sssstartdate(4)
1399          integer bpstartdate(4)
1400        integer topexstartdate(4)        integer topexstartdate(4)
1401        integer ersstartdate(4)        integer ersstartdate(4)
1402          integer gfostartdate(4)
1403    
1404        common /ecco_cost_data_aux_i/        common /ecco_cost_data_aux_i/
1405       &                           tmistartdate1,       &                           tmistartdate1,
# Line 1065  c     sshperiod      - sampling interval Line 1408  c     sshperiod      - sampling interval
1408       &                           sststartdate2,       &                           sststartdate2,
1409       &                           sssstartdate1,       &                           sssstartdate1,
1410       &                           sssstartdate2,       &                           sssstartdate2,
1411         &                           bpstartdate1,
1412         &                           bpstartdate2,
1413       &                           argotstartdate1,       &                           argotstartdate1,
1414       &                           argotstartdate2,       &                           argotstartdate2,
1415       &                           argosstartdate1,       &                           argosstartdate1,
# Line 1073  c     sshperiod      - sampling interval Line 1418  c     sshperiod      - sampling interval
1418       &                           topexstartdate2,       &                           topexstartdate2,
1419       &                           ersstartdate1,       &                           ersstartdate1,
1420       &                           ersstartdate2,       &                           ersstartdate2,
1421         &                           gfostartdate1,
1422         &                           gfostartdate2,
1423       &                           scatstartdate1,       &                           scatstartdate1,
1424       &                           scatstartdate2,       &                           scatstartdate2
      &                           costIceStart1,  
      &                           costIceStart2,  
      &                           costIceEnd1,  
      &                           costIceEnd2  
1425    
1426        integer tmistartdate1        integer tmistartdate1
1427        integer tmistartdate2        integer tmistartdate2
# Line 1086  c     sshperiod      - sampling interval Line 1429  c     sshperiod      - sampling interval
1429        integer sststartdate2        integer sststartdate2
1430        integer sssstartdate1        integer sssstartdate1
1431        integer sssstartdate2        integer sssstartdate2
1432          integer bpstartdate1
1433          integer bpstartdate2
1434        integer argotstartdate1        integer argotstartdate1
1435        integer argotstartdate2        integer argotstartdate2
1436        integer argosstartdate1        integer argosstartdate1
# Line 1094  c     sshperiod      - sampling interval Line 1439  c     sshperiod      - sampling interval
1439        integer topexstartdate2        integer topexstartdate2
1440        integer ersstartdate1        integer ersstartdate1
1441        integer ersstartdate2        integer ersstartdate2
1442          integer gfostartdate1
1443          integer gfostartdate2
1444        integer scatstartdate1        integer scatstartdate1
1445        integer scatstartdate2        integer scatstartdate2
       integer costIceStart1  
       integer costIceStart2  
       integer costIceEnd1  
       integer costIceEnd2  
1446    
1447        common /ecco_cost_data_times_r/        common /ecco_cost_data_times_r/
1448       &                           topexperiod,       &                           topexperiod,
1449       &                           ersperiod,       &                           ersperiod,
1450       &                           scatperiod,       &                           gfoperiod,
1451       &                           costIceStart,       &                           scatperiod
      &                           costIceEnd  
1452        _RL topexperiod        _RL topexperiod
1453        _RL ersperiod        _RL ersperiod
1454          _RL gfoperiod
1455        _RL scatperiod        _RL scatperiod
       _RL costIceStart  
       _RL costIceEnd  
1456    
1457  c     cost_ice_flag  - cost_ice flag (see cost_ice.F)        common /ecco_cost_data_detrend/
1458         &                           topexintercept,
1459         &                           ersintercept,
1460         &                           gfointercept,
1461         &                           topexslope,
1462         &                           ersslope,
1463         &                           gfoslope
1464          _RL topexintercept
1465          _RL ersintercept
1466          _RL gfointercept
1467          _RL topexslope
1468          _RL ersslope
1469          _RL gfoslope
1470    
1471    cgf factor to convert sshv4cost_errfile in m
1472          common /ecco_cost_errfactor/
1473         &         sshv4cost_errfactor
1474          _RL  sshv4cost_errfactor(NSSHV4COST)
1475    
1476    #ifdef ALLOW_SSH_COST_CONTRIBUTION
1477          common /ecco_ssh_daymask_r/
1478         &       tpTimeMask, ersTimeMask, gfoTimeMask
1479          _RL tpTimeMask(maxNumDays)
1480          _RL ersTimeMask(maxNumDays)
1481          _RL gfoTimeMask(maxNumDays)
1482    #endif
1483    
1484        common /ecco_cost_ice_i/ cost_ice_flag        common /ecco_ssh_daymask_c/
1485        integer cost_ice_flag       &       tpTimeMaskFile, ersTimeMaskFile, gfoTimeMaskFile
1486          character*(MAX_LEN_FNAM) tpTimeMaskFile
1487          character*(MAX_LEN_FNAM) ersTimeMaskFile
1488          character*(MAX_LEN_FNAM) gfoTimeMaskFile
1489    
1490  c     ==================================================================  c     ==================================================================
1491  c     END OF HEADER COST  c     END OF HEADER COST

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.52

  ViewVC Help
Powered by ViewVC 1.1.22