/[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.14 by heimbach, Thu Dec 22 21:13:21 2005 UTC revision 1.54 by gforget, Wed May 18 03:16:05 2011 UTC
# Line 1  Line 1 
1    C $Header$
2    C $Name$
3    
4  c     ==================================================================  c     ==================================================================
5  c     HEADER AVERAGES  c     HEADER AVERAGES
# Line 20  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=20 )
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 41  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 53  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 101  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 120  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 144  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 159  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 254  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 261  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
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_hfluxsmoo,       &     objf_tauv,  objf_tauvm,  objf_tauvsmoo,
399       &                objf_sflux,       &     objf_hmean,
400       &                objf_sfluxm,       &     objf_h, objf_tp, objf_ers, objf_gfo,
401       &                objf_sfluxmm,       &     objf_sshv4cost,
402       &                objf_sfluxsmoo,       &     objf_temp,      objf_salt,
403       &                objf_tauu,       &     objf_temp0,     objf_salt0,
404       &                objf_tauum,       &     objf_temp0smoo, objf_salt0smoo,
405       &                objf_tauusmoo,       &     objf_etan0, objf_uvel0, objf_vvel0,
406       &                objf_tauv,       &     objf_sst, objf_tmi, objf_sss,
407       &                objf_tauvm,       &     objf_bp,
408       &                objf_tauvsmoo,       &     objf_usercost,
409       &                objf_hmean,       &     objf_ctdt,      objf_ctds,
410       &                objf_h,       &     objf_ctdtclim,  objf_ctdsclim,
411       &                objf_temp,       &     objf_xbt, objf_argot,     objf_argos,
412       &                objf_salt,       &     objf_drift, objf_tdrift, objf_sdrift, objf_wdrift,
413       &                objf_temp0,       &     objf_scatx, objf_scaty,  objf_scatxm, objf_scatym,
414       &                objf_salt0,       &     objf_atemp,      objf_atempm,      objf_atempsmoo,
415       &                objf_temp0smoo,       &     objf_aqh,        objf_aqhm,        objf_aqhsmoo,
416       &                objf_salt0smoo,       &     objf_precip,     objf_precipm,     objf_precipsmoo,
417       &                objf_sst,       &     objf_swflux,     objf_swfluxm,     objf_swfluxsmoo,
418       &                objf_tmi,       &     objf_swdown,     objf_swdownm,     objf_swdownsmoo,
419       &                objf_sss,       &     objf_snowprecip, objf_snowprecipm, objf_snowprecipsmoo,
420       &                objf_ctdt,       &     objf_lwflux,     objf_lwfluxm,     objf_lwfluxsmoo,
421       &                objf_ctds,       &     objf_lwdown,     objf_lwdownm,     objf_lwdownsmoo,
422       &                objf_ctdtclim,       &     objf_evap,       objf_evapm,       objf_evapsmoo,
423       &                objf_ctdsclim,       &     objf_apressure,  objf_apressurem,  objf_apressuresmoo,
424       &                objf_xbt,       &     objf_runoff,     objf_runoffm,     objf_runoffsmoo,
425       &                objf_argot,       &     objf_uwind,      objf_uwindm,      objf_uwindsmoo,
426       &                objf_argos,       &     objf_vwind,      objf_vwindm,      objf_vwindsmoo,
427       &                objf_drift,       &     objf_obcsn, objf_obcss, objf_obcsw, objf_obcse,
428       &                objf_tdrift,       &     objf_obcsvol,
429       &                objf_sdrift,       &     objf_curmtr,
430       &                objf_wdrift,       &     objf_ageos,
431       &                objf_scatx,       &     objf_kapgm,
432       &                objf_scaty,       &     objf_kapredi,
433       &                objf_scatxm,       &     objf_diffkr,
434       &                objf_scatym,       &     objf_theta_ini_fin, objf_salt_ini_fin,
435       &                objf_atemp,       &     objf_eddytau,
436       &                objf_aqh,       &     objf_bottomdrag,
437       &                objf_precip,       &     objf_transp
      &                objf_swflux,  
      &                objf_swdown,  
      &                objf_uwind,  
      &                objf_vwind,  
      &                objf_atempm,  
      &                objf_aqhm,  
      &                objf_precipm,  
      &                objf_swfluxm,  
      &                objf_swdownm,  
      &                objf_uwindm,  
      &                objf_vwindm,  
      &                objf_atempsmoo,  
      &                objf_aqhsmoo,  
      &                objf_precipsmoo,  
      &                objf_swfluxsmoo,  
      &                objf_swdownsmoo,  
      &                objf_uwindsmoo,  
      &                objf_vwindsmoo,  
      &                objf_obcsn,  
      &                objf_obcss,  
      &                objf_obcsw,  
      &                objf_obcse,  
      &                objf_obcsvol,  
      &                objf_curmtr,  
      &                objf_ageos,  
      &                objf_kapgm,  
      &                objf_diffkr,  
      &                objf_theta_ini_fin,  
      &                objf_salt_ini_fin,  
      &                objf_eddytau  
438    
439        _RL  objf_hflux  (nsx,nsy)        _RL  objf_hflux  (nsx,nsy)
440        _RL  objf_hfluxm (nsx,nsy)        _RL  objf_hfluxm (nsx,nsy)
441        _RL  objf_hfluxmm(nsx,nsy)        _RL  objf_hfluxmm
442        _RL  objf_hfluxsmoo  (nsx,nsy)        _RL  objf_hfluxsmoo  (nsx,nsy)
443        _RL  objf_sflux  (nsx,nsy)        _RL  objf_sflux  (nsx,nsy)
444        _RL  objf_sfluxm (nsx,nsy)        _RL  objf_sfluxm (nsx,nsy)
445        _RL  objf_sfluxmm(nsx,nsy)        _RL  objf_sfluxmm
446        _RL  objf_sfluxsmoo  (nsx,nsy)        _RL  objf_sfluxsmoo  (nsx,nsy)
447        _RL  objf_tauu   (nsx,nsy)        _RL  objf_tauu   (nsx,nsy)
448        _RL  objf_tauum  (nsx,nsy)        _RL  objf_tauum  (nsx,nsy)
# Line 371  c                  function contribution Line 452  c                  function contribution
452        _RL  objf_tauvsmoo   (nsx,nsy)        _RL  objf_tauvsmoo   (nsx,nsy)
453        _RL  objf_hmean        _RL  objf_hmean
454        _RL  objf_h    (nsx,nsy)        _RL  objf_h    (nsx,nsy)
455          _RL  objf_tp   (nsx,nsy)
456          _RL  objf_ers  (nsx,nsy)
457          _RL  objf_gfo  (nsx,nsy)
458          _RL  objf_sshv4cost(NSSHV4COST,nsx,nsy)
459        _RL  objf_temp (nsx,nsy)        _RL  objf_temp (nsx,nsy)
460        _RL  objf_salt (nsx,nsy)        _RL  objf_salt (nsx,nsy)
461        _RL  objf_temp0(nsx,nsy)        _RL  objf_temp0(nsx,nsy)
462        _RL  objf_salt0(nsx,nsy)        _RL  objf_salt0(nsx,nsy)
463        _RL  objf_temp0smoo(nsx,nsy)        _RL  objf_temp0smoo(nsx,nsy)
464        _RL  objf_salt0smoo(nsx,nsy)        _RL  objf_salt0smoo(nsx,nsy)
465          _RL  objf_etan0(nsx,nsy)
466          _RL  objf_uvel0(nsx,nsy)
467          _RL  objf_vvel0(nsx,nsy)
468        _RL  objf_sst  (nsx,nsy)        _RL  objf_sst  (nsx,nsy)
469        _RL  objf_tmi  (nsx,nsy)        _RL  objf_tmi  (nsx,nsy)
470        _RL  objf_sss  (nsx,nsy)        _RL  objf_sss  (nsx,nsy)
471          _RL  objf_bp   (nsx,nsy)
472        _RL  objf_ctdt (nsx,nsy)        _RL  objf_ctdt (nsx,nsy)
473        _RL  objf_ctds (nsx,nsy)        _RL  objf_ctds (nsx,nsy)
474        _RL  objf_ctdtclim (nsx,nsy)        _RL  objf_ctdtclim (nsx,nsy)
475        _RL  objf_ctdsclim (nsx,nsy)        _RL  objf_ctdsclim (nsx,nsy)
476        _RL  objf_xbt  (nsx,nsy)        _RL  objf_xbt  (nsx,nsy)
477        _RL  objf_argot(nsx,nsy)        _RL  objf_argot(nsx,nsy)
478          _RL  objf_usercost(NUSERCOST,nsx,nsy)
479        _RL  objf_argos(nsx,nsy)        _RL  objf_argos(nsx,nsy)
480        _RL  objf_drift(nsx,nsy)        _RL  objf_drift(nsx,nsy)
481        _RL  objf_tdrift(nsx,nsy)        _RL  objf_tdrift(nsx,nsy)
# Line 400  c                  function contribution Line 490  c                  function contribution
490        _RL  objf_precip(nsx,nsy)        _RL  objf_precip(nsx,nsy)
491        _RL  objf_swflux(nsx,nsy)        _RL  objf_swflux(nsx,nsy)
492        _RL  objf_swdown(nsx,nsy)        _RL  objf_swdown(nsx,nsy)
493          _RL  objf_snowprecip(nsx,nsy)
494          _RL  objf_lwflux(nsx,nsy)
495          _RL  objf_lwdown(nsx,nsy)
496          _RL  objf_evap(nsx,nsy)
497          _RL  objf_apressure(nsx,nsy)
498          _RL  objf_runoff(nsx,nsy)
499        _RL  objf_uwind(nsx,nsy)        _RL  objf_uwind(nsx,nsy)
500        _RL  objf_vwind(nsx,nsy)        _RL  objf_vwind(nsx,nsy)
501        _RL  objf_atempm(nsx,nsy)        _RL  objf_atempm(nsx,nsy)
# Line 407  c                  function contribution Line 503  c                  function contribution
503        _RL  objf_precipm(nsx,nsy)        _RL  objf_precipm(nsx,nsy)
504        _RL  objf_swfluxm(nsx,nsy)        _RL  objf_swfluxm(nsx,nsy)
505        _RL  objf_swdownm(nsx,nsy)        _RL  objf_swdownm(nsx,nsy)
506          _RL  objf_snowprecipm(nsx,nsy)
507          _RL  objf_lwfluxm(nsx,nsy)
508          _RL  objf_lwdownm(nsx,nsy)
509          _RL  objf_evapm(nsx,nsy)
510          _RL  objf_apressurem(nsx,nsy)
511          _RL  objf_runoffm(nsx,nsy)
512        _RL  objf_uwindm(nsx,nsy)        _RL  objf_uwindm(nsx,nsy)
513        _RL  objf_vwindm(nsx,nsy)        _RL  objf_vwindm(nsx,nsy)
514        _RL  objf_atempsmoo(nsx,nsy)        _RL  objf_atempsmoo(nsx,nsy)
# Line 414  c                  function contribution Line 516  c                  function contribution
516        _RL  objf_precipsmoo(nsx,nsy)        _RL  objf_precipsmoo(nsx,nsy)
517        _RL  objf_swfluxsmoo(nsx,nsy)        _RL  objf_swfluxsmoo(nsx,nsy)
518        _RL  objf_swdownsmoo(nsx,nsy)        _RL  objf_swdownsmoo(nsx,nsy)
519          _RL  objf_snowprecipsmoo(nsx,nsy)
520          _RL  objf_lwfluxsmoo(nsx,nsy)
521          _RL  objf_lwdownsmoo(nsx,nsy)
522          _RL  objf_evapsmoo(nsx,nsy)
523          _RL  objf_apressuresmoo(nsx,nsy)
524          _RL  objf_runoffsmoo(nsx,nsy)
525        _RL  objf_uwindsmoo(nsx,nsy)        _RL  objf_uwindsmoo(nsx,nsy)
526        _RL  objf_vwindsmoo(nsx,nsy)        _RL  objf_vwindsmoo(nsx,nsy)
527        _RL  objf_obcsn(nsx,nsy)        _RL  objf_obcsn(nsx,nsy)
# Line 424  c                  function contribution Line 532  c                  function contribution
532        _RL  objf_curmtr(nsx,nsy)        _RL  objf_curmtr(nsx,nsy)
533        _RL  objf_ageos(nsx,nsy)        _RL  objf_ageos(nsx,nsy)
534        _RL  objf_kapgm(nsx,nsy)        _RL  objf_kapgm(nsx,nsy)
535          _RL  objf_kapredi(nsx,nsy)
536        _RL  objf_diffkr(nsx,nsy)        _RL  objf_diffkr(nsx,nsy)
537        _RL  objf_theta_ini_fin(nsx,nsy)        _RL  objf_theta_ini_fin(nsx,nsy)
538        _RL  objf_salt_ini_fin(nsx,nsy)        _RL  objf_salt_ini_fin(nsx,nsy)
539        _RL  objf_eddytau(nsx,nsy)        _RL  objf_eddytau(nsx,nsy)
540          _RL  objf_bottomdrag(nsx,nsy)
541          _RL  objf_transp
542    
543        common /ecco_cost_num/        common /ecco_cost_num/
544       &                num_hflux,       &                num_hflux,
# Line 442  c                  function contribution Line 553  c                  function contribution
553       &                num_tauvm,       &                num_tauvm,
554       &                num_hmean,       &                num_hmean,
555       &                num_h,       &                num_h,
556         &                num_tp,
557         &                num_ers,
558         &                num_gfo,
559         &                num_sshv4cost,
560       &                num_temp,       &                num_temp,
561       &                num_salt,       &                num_salt,
562       &                num_temp0,       &                num_temp0,
563       &                num_salt0,       &                num_salt0,
564         &                num_etan0,
565         &                num_uvel0,
566         &                num_vvel0,
567       &                num_sst,       &                num_sst,
568       &                num_tmi,       &                num_tmi,
569       &                num_sss,       &                num_sss,
570         &                num_bp,
571       &                num_ctdt,       &                num_ctdt,
572       &                num_ctds,       &                num_ctds,
573       &                num_ctdtclim,       &                num_ctdtclim,
# Line 456  c                  function contribution Line 575  c                  function contribution
575       &                num_xbt,       &                num_xbt,
576       &                num_argot,       &                num_argot,
577       &                num_argos,       &                num_argos,
578         &                num_usercost,
579       &                num_drift,       &                num_drift,
580       &                num_tdrift,       &                num_tdrift,
581       &                num_sdrift,       &                num_sdrift,
# Line 469  c                  function contribution Line 589  c                  function contribution
589       &                num_precip,       &                num_precip,
590       &                num_swflux,       &                num_swflux,
591       &                num_swdown,       &                num_swdown,
592         &                num_snowprecip,
593         &                num_lwflux,
594         &                num_lwdown,
595         &                num_evap,
596         &                num_apressure,
597         &                num_runoff,
598       &                num_uwind,       &                num_uwind,
599       &                num_vwind,       &                num_vwind,
600       &                num_atempm,       &                num_atempm,
# Line 476  c                  function contribution Line 602  c                  function contribution
602       &                num_precipm,       &                num_precipm,
603       &                num_swfluxm,       &                num_swfluxm,
604       &                num_swdownm,       &                num_swdownm,
605         &                num_snowprecipm,
606         &                num_lwfluxm,
607         &                num_lwdownm,
608         &                num_evapm,
609         &                num_apressurem,
610         &                num_runoffm,
611       &                num_uwindm,       &                num_uwindm,
612       &                num_vwindm,       &                num_vwindm,
613       &                num_obcsn,       &                num_obcsn,
# Line 486  c                  function contribution Line 618  c                  function contribution
618       &                num_curmtr,       &                num_curmtr,
619       &                num_ageos,       &                num_ageos,
620       &                num_kapgm,       &                num_kapgm,
621         &                num_kapredi,
622       &                num_diffkr,       &                num_diffkr,
623       &                num_theta_ini_fin,       &                num_theta_ini_fin,
624       &                num_salt_ini_fin,       &                num_salt_ini_fin,
625       &                num_eddytau       &                num_eddytau,
626         &                num_bottomdrag,
627         &                num_transp
628    
629        _RL  num_hflux  (nsx,nsy)        _RL  num_hflux  (nsx,nsy)
630        _RL  num_hfluxm (nsx,nsy)        _RL  num_hfluxm (nsx,nsy)
# Line 503  c                  function contribution Line 638  c                  function contribution
638        _RL  num_tauvm  (nsx,nsy)        _RL  num_tauvm  (nsx,nsy)
639        _RL  num_hmean        _RL  num_hmean
640        _RL  num_h    (nsx,nsy)        _RL  num_h    (nsx,nsy)
641          _RL  num_tp   (nsx,nsy)
642          _RL  num_ers  (nsx,nsy)
643          _RL  num_gfo  (nsx,nsy)
644          _RL  num_sshv4cost(NSSHV4COST,nsx,nsy)
645        _RL  num_temp (nsx,nsy)        _RL  num_temp (nsx,nsy)
646        _RL  num_salt (nsx,nsy)        _RL  num_salt (nsx,nsy)
647        _RL  num_temp0(nsx,nsy)        _RL  num_temp0(nsx,nsy)
648        _RL  num_salt0(nsx,nsy)        _RL  num_salt0(nsx,nsy)
649          _RL  num_etan0(nsx,nsy)
650          _RL  num_uvel0(nsx,nsy)
651          _RL  num_vvel0(nsx,nsy)
652        _RL  num_sst  (nsx,nsy)        _RL  num_sst  (nsx,nsy)
653        _RL  num_tmi  (nsx,nsy)        _RL  num_tmi  (nsx,nsy)
654        _RL  num_sss  (nsx,nsy)        _RL  num_sss  (nsx,nsy)
655          _RL  num_bp   (nsx,nsy)
656        _RL  num_ctdt (nsx,nsy)        _RL  num_ctdt (nsx,nsy)
657        _RL  num_ctds (nsx,nsy)        _RL  num_ctds (nsx,nsy)
658        _RL  num_ctdtclim (nsx,nsy)        _RL  num_ctdtclim (nsx,nsy)
# Line 517  c                  function contribution Line 660  c                  function contribution
660        _RL  num_xbt  (nsx,nsy)        _RL  num_xbt  (nsx,nsy)
661        _RL  num_argot(nsx,nsy)        _RL  num_argot(nsx,nsy)
662        _RL  num_argos(nsx,nsy)        _RL  num_argos(nsx,nsy)
663          _RL  num_usercost(NUSERCOST,nsx,nsy)
664        _RL  num_drift(nsx,nsy)        _RL  num_drift(nsx,nsy)
665        _RL  num_tdrift(nsx,nsy)        _RL  num_tdrift(nsx,nsy)
666        _RL  num_sdrift(nsx,nsy)        _RL  num_sdrift(nsx,nsy)
# Line 530  c                  function contribution Line 674  c                  function contribution
674        _RL  num_precip(nsx,nsy)        _RL  num_precip(nsx,nsy)
675        _RL  num_swflux(nsx,nsy)        _RL  num_swflux(nsx,nsy)
676        _RL  num_swdown(nsx,nsy)        _RL  num_swdown(nsx,nsy)
677          _RL  num_snowprecip(nsx,nsy)
678          _RL  num_lwflux(nsx,nsy)
679          _RL  num_lwdown(nsx,nsy)
680          _RL  num_evap(nsx,nsy)
681          _RL  num_apressure(nsx,nsy)
682          _RL  num_runoff(nsx,nsy)
683        _RL  num_uwind(nsx,nsy)        _RL  num_uwind(nsx,nsy)
684        _RL  num_vwind(nsx,nsy)        _RL  num_vwind(nsx,nsy)
685        _RL  num_atempm(nsx,nsy)        _RL  num_atempm(nsx,nsy)
# Line 537  c                  function contribution Line 687  c                  function contribution
687        _RL  num_precipm(nsx,nsy)        _RL  num_precipm(nsx,nsy)
688        _RL  num_swfluxm(nsx,nsy)        _RL  num_swfluxm(nsx,nsy)
689        _RL  num_swdownm(nsx,nsy)        _RL  num_swdownm(nsx,nsy)
690          _RL  num_snowprecipm(nsx,nsy)
691          _RL  num_lwfluxm(nsx,nsy)
692          _RL  num_lwdownm(nsx,nsy)
693          _RL  num_evapm(nsx,nsy)
694          _RL  num_apressurem(nsx,nsy)
695          _RL  num_runoffm(nsx,nsy)
696        _RL  num_uwindm(nsx,nsy)        _RL  num_uwindm(nsx,nsy)
697        _RL  num_vwindm(nsx,nsy)        _RL  num_vwindm(nsx,nsy)
698        _RL  num_obcsn(nsx,nsy)        _RL  num_obcsn(nsx,nsy)
# Line 547  c                  function contribution Line 703  c                  function contribution
703        _RL  num_curmtr(nsx,nsy)        _RL  num_curmtr(nsx,nsy)
704        _RL  num_ageos(nsx,nsy)        _RL  num_ageos(nsx,nsy)
705        _RL  num_kapgm(nsx,nsy)        _RL  num_kapgm(nsx,nsy)
706          _RL  num_kapredi(nsx,nsy)
707        _RL  num_diffkr(nsx,nsy)        _RL  num_diffkr(nsx,nsy)
708        _RL  num_theta_ini_fin(nsx,nsy)        _RL  num_theta_ini_fin(nsx,nsy)
709        _RL  num_salt_ini_fin(nsx,nsy)        _RL  num_salt_ini_fin(nsx,nsy)
710        _RL  num_eddytau(nsx,nsy)        _RL  num_eddytau(nsx,nsy)
711          _RL  num_bottomdrag(nsx,nsy)
712          _RL  num_transp
713    
714        common /ecco_cost_aux_r/        common /ecco_cost_aux_r/
715       &                    mult_hflux,       &                    mult_hflux,
716       &                    mult_sflux,       &                    mult_sflux,
717         &                    mult_hfluxmm,
718         &                    mult_sfluxmm,
719       &                    mult_tauu,       &                    mult_tauu,
720       &                    mult_tauv,       &                    mult_tauv,
721       &                    mult_hmean,       &                    mult_hmean,
722       &                    mult_h,       &                    mult_h,
723         &                    mult_tp,
724         &                    mult_ers,
725         &                    mult_gfo,
726         &                    mult_sshv4cost,
727       &                    mult_temp,       &                    mult_temp,
728       &                    mult_salt,       &                    mult_salt,
729       &                    mult_temp0,       &                    mult_temp0,
730       &                    mult_salt0,       &                    mult_salt0,
731         &                    mult_etan0,
732         &                    mult_uvel0,
733         &                    mult_vvel0,
734       &                    mult_sst,       &                    mult_sst,
735       &                    mult_tmi,       &                    mult_tmi,
736       &                    mult_sss,       &                    mult_sss,
737         &                    mult_bp,
738       &                    mult_ctdt,       &                    mult_ctdt,
739       &                    mult_ctds,       &                    mult_ctds,
740       &                    mult_ctdtclim,       &                    mult_ctdtclim,
# Line 573  c                  function contribution Line 742  c                  function contribution
742       &                    mult_xbt,       &                    mult_xbt,
743       &                    mult_argot,       &                    mult_argot,
744       &                    mult_argos,       &                    mult_argos,
745         &                    mult_usercost,
746       &                    mult_drift,       &                    mult_drift,
747       &                    mult_tdrift,       &                    mult_tdrift,
748       &                    mult_sdrift,       &                    mult_sdrift,
# Line 584  c                  function contribution Line 754  c                  function contribution
754       &                    mult_precip,       &                    mult_precip,
755       &                    mult_swflux,       &                    mult_swflux,
756       &                    mult_swdown,       &                    mult_swdown,
757         &                    mult_snowprecip,
758         &                    mult_lwflux,
759         &                    mult_lwdown,
760         &                    mult_evap,
761         &                    mult_apressure,
762         &                    mult_runoff,
763       &                    mult_uwind,       &                    mult_uwind,
764       &                    mult_vwind,       &                    mult_vwind,
765       &                    mult_obcsn,       &                    mult_obcsn,
# Line 594  c                  function contribution Line 770  c                  function contribution
770       &                    mult_curmtr,       &                    mult_curmtr,
771       &                    mult_ageos,       &                    mult_ageos,
772       &                    mult_kapgm,       &                    mult_kapgm,
773         &                    mult_kapredi,
774       &                    mult_diffkr,       &                    mult_diffkr,
775       &                    mult_ini_fin,       &                    mult_ini_fin,
776       &                    mult_eddytau,       &                    mult_edtau,
777         &                    mult_bottomdrag,
778       &                    mult_smooth_ic,       &                    mult_smooth_ic,
779       &                    mult_smooth_bc       &                    mult_smooth_bc,
780         &                    mult_transp
781        _RL  mult_hflux        _RL  mult_hflux
782        _RL  mult_sflux        _RL  mult_sflux
783          _RL  mult_hfluxmm
784          _RL  mult_sfluxmm
785        _RL  mult_tauu        _RL  mult_tauu
786        _RL  mult_tauv        _RL  mult_tauv
787        _RL  mult_hmean        _RL  mult_hmean
788        _RL  mult_h        _RL  mult_h
789          _RL  mult_tp
790          _RL  mult_ers
791          _RL  mult_gfo
792          _RL  mult_sshv4cost(NSSHV4COST)
793        _RL  mult_temp        _RL  mult_temp
794        _RL  mult_salt        _RL  mult_salt
795        _RL  mult_temp0        _RL  mult_temp0
796        _RL  mult_salt0        _RL  mult_salt0
797          _RL  mult_etan0
798          _RL  mult_uvel0
799          _RL  mult_vvel0
800        _RL  mult_sst        _RL  mult_sst
801        _RL  mult_tmi        _RL  mult_tmi
802        _RL  mult_sss        _RL  mult_sss
803          _RL  mult_bp
804        _RL  mult_ctdt        _RL  mult_ctdt
805        _RL  mult_ctds        _RL  mult_ctds
806        _RL  mult_ctdtclim        _RL  mult_ctdtclim
# Line 620  c                  function contribution Line 808  c                  function contribution
808        _RL  mult_xbt        _RL  mult_xbt
809        _RL  mult_argot        _RL  mult_argot
810        _RL  mult_argos        _RL  mult_argos
811          _RL  mult_usercost(NUSERCOST)
812        _RL  mult_drift        _RL  mult_drift
813        _RL  mult_tdrift        _RL  mult_tdrift
814        _RL  mult_sdrift        _RL  mult_sdrift
# Line 631  c                  function contribution Line 820  c                  function contribution
820        _RL  mult_precip        _RL  mult_precip
821        _RL  mult_swflux        _RL  mult_swflux
822        _RL  mult_swdown        _RL  mult_swdown
823          _RL  mult_snowprecip
824          _RL  mult_lwflux
825          _RL  mult_lwdown
826          _RL  mult_evap
827          _RL  mult_apressure
828          _RL  mult_runoff
829        _RL  mult_uwind        _RL  mult_uwind
830        _RL  mult_vwind        _RL  mult_vwind
831        _RL  mult_obcsn        _RL  mult_obcsn
# Line 641  c                  function contribution Line 836  c                  function contribution
836        _RL  mult_curmtr        _RL  mult_curmtr
837        _RL  mult_ageos        _RL  mult_ageos
838        _RL  mult_kapgm        _RL  mult_kapgm
839          _RL  mult_kapredi
840        _RL  mult_diffkr        _RL  mult_diffkr
841        _RL  mult_ini_fin        _RL  mult_ini_fin
842        _RL  mult_eddytau        _RL  mult_edtau
843          _RL  mult_bottomdrag
844        _RL  mult_smooth_ic        _RL  mult_smooth_ic
845        _RL  mult_smooth_bc        _RL  mult_smooth_bc
846          _RL  mult_transp
847    
848  c     Record counters relevant for the cost function evaluation.  c     Record counters relevant for the cost function evaluation.
849  c     ==========================================================  c     ==========================================================
850  c  c
851  c     nmonsrec - number of monthly records that will be generated by  c     nyearsrec - number of yearly records that will be generated by
852  c                the current model integration.  c                 the current model integration.
853  c     ndaysrec - number of  daily  records that will be generated by  c     nmonsrec  - number of monthly records that will be generated by
854  c                the current model integration.  c                 the current model integration.
855    c     ndaysrec  - number of  daily  records that will be generated by
856    c                 the current model integration.
857    
858        common /ecco_cost_i/        common /ecco_cost_i/
859         &                nyearsrec,
860       &                nmonsrec,       &                nmonsrec,
861       &                ndaysrec,       &                ndaysrec,
862       &                nnztbar,       &                nnztbar,
863       &                nnzsbar       &                nnzsbar
864          integer nyearsrec
865        integer nmonsrec        integer nmonsrec
866        integer ndaysrec        integer ndaysrec
867        integer nnztbar        integer nnztbar
# Line 688  c     salterrfile           - representa Line 890  c     salterrfile           - representa
890  c     temperrfile           - representation error due unresolved eddies  c     temperrfile           - representation error due unresolved eddies
891  c     velerrfile            - representation error  c     velerrfile            - representation error
892    
893        common /ecco_cost_c/        common /ecco_cost_c/
894       &                hflux_errfile,       &                hflux_errfile,
895       &                hfluxm_errfile,       &                hfluxm_errfile,
896       &                sflux_errfile,       &                sflux_errfile,
# Line 703  c     velerrfile            - representa Line 905  c     velerrfile            - representa
905       &                geoid_errfile,       &                geoid_errfile,
906       &                geoid_covariancefile,       &                geoid_covariancefile,
907       &                ssh_errfile,       &                ssh_errfile,
908         &                tp_errfile,
909         &                ers_errfile,
910         &                gfo_errfile,
911         &                sshv4cost_scalefile,
912         &                sshv4cost_errfile,
913       &                ctdt_errfile,       &                ctdt_errfile,
914       &                ctds_errfile,       &                ctds_errfile,
915       &                drift_errfile,       &                drift_errfile,
916       &                udrifterrfile,       &                udrifterrfile,
917       &                vdrifterrfile,       &                vdrifterrfile,
918       &                salterrfile,       &                salterrfile,
919       &                temperrfile,       &                temperrfile,
920       &                velerrfile,       &                velerrfile,
921       &                salt0errfile,       &                salt0errfile,
922       &                temp0errfile,       &                temp0errfile,
923         &                etan0errfile,
924         &                uvel0errfile,
925         &                vvel0errfile,
926       &                vel0errfile,       &                vel0errfile,
927         &                ssterrfile,
928         &                ssserrfile,
929         &                bperrfile,
930       &                atemp_errfile,       &                atemp_errfile,
931       &                aqh_errfile,       &                aqh_errfile,
932       &                precip_errfile,       &                precip_errfile,
933       &                swflux_errfile,       &                swflux_errfile,
934       &                swdown_errfile,       &                swdown_errfile,
935         &                snowprecip_errfile,
936         &                lwflux_errfile,
937         &                lwdown_errfile,
938         &                evap_errfile,
939         &                apressure_errfile,
940         &                runoff_errfile,
941         &                edtau_errfile,
942         &                kapgm_errfile,
943         &                kapredi_errfile,
944         &                diffkr_errfile,
945         &                bottomdrag_errfile,
946         &                usercost_errfile,
947       &                uwind_errfile,       &                uwind_errfile,
948       &                vwind_errfile       &                vwind_errfile
949        character*(MAX_LEN_FNAM) hflux_errfile        character*(MAX_LEN_FNAM) hflux_errfile
# Line 735  c     velerrfile            - representa Line 960  c     velerrfile            - representa
960        character*(MAX_LEN_FNAM) geoid_errfile        character*(MAX_LEN_FNAM) geoid_errfile
961        character*(MAX_LEN_FNAM) geoid_covariancefile        character*(MAX_LEN_FNAM) geoid_covariancefile
962        character*(MAX_LEN_FNAM) ssh_errfile        character*(MAX_LEN_FNAM) ssh_errfile
963        character*(MAX_LEN_FNAM) ctdt_errfile        character*(MAX_LEN_FNAM) tp_errfile
964        character*(MAX_LEN_FNAM) ctds_errfile        character*(MAX_LEN_FNAM) ers_errfile
965          character*(MAX_LEN_FNAM) gfo_errfile
966          character*(MAX_LEN_FNAM) sshv4cost_scalefile(NSSHV4COST)
967          character*(MAX_LEN_FNAM) sshv4cost_errfile(NSSHV4COST)
968          character*(MAX_LEN_FNAM) ctdt_errfile
969          character*(MAX_LEN_FNAM) ctds_errfile
970        character*(MAX_LEN_FNAM) drift_errfile        character*(MAX_LEN_FNAM) drift_errfile
971        character*(MAX_LEN_FNAM) udrifterrfile        character*(MAX_LEN_FNAM) udrifterrfile
972        character*(MAX_LEN_FNAM) vdrifterrfile              character*(MAX_LEN_FNAM) vdrifterrfile
973        character*(MAX_LEN_FNAM) salterrfile        character*(MAX_LEN_FNAM) salterrfile
974        character*(MAX_LEN_FNAM) temperrfile        character*(MAX_LEN_FNAM) temperrfile
975        character*(MAX_LEN_FNAM) velerrfile        character*(MAX_LEN_FNAM) velerrfile
976        character*(MAX_LEN_FNAM) salt0errfile        character*(MAX_LEN_FNAM) salt0errfile
977        character*(MAX_LEN_FNAM) temp0errfile        character*(MAX_LEN_FNAM) temp0errfile
978          character*(MAX_LEN_FNAM) etan0errfile
979          character*(MAX_LEN_FNAM) uvel0errfile
980          character*(MAX_LEN_FNAM) vvel0errfile
981        character*(MAX_LEN_FNAM) vel0errfile        character*(MAX_LEN_FNAM) vel0errfile
982          character*(MAX_LEN_FNAM) ssterrfile
983          character*(MAX_LEN_FNAM) ssserrfile
984          character*(MAX_LEN_FNAM) bperrfile
985        character*(MAX_LEN_FNAM) atemp_errfile        character*(MAX_LEN_FNAM) atemp_errfile
986        character*(MAX_LEN_FNAM) aqh_errfile        character*(MAX_LEN_FNAM) aqh_errfile
987        character*(MAX_LEN_FNAM) precip_errfile        character*(MAX_LEN_FNAM) precip_errfile
988        character*(MAX_LEN_FNAM) swflux_errfile        character*(MAX_LEN_FNAM) swflux_errfile
989        character*(MAX_LEN_FNAM) swdown_errfile        character*(MAX_LEN_FNAM) swdown_errfile
990          character*(MAX_LEN_FNAM) snowprecip_errfile
991          character*(MAX_LEN_FNAM) lwflux_errfile
992          character*(MAX_LEN_FNAM) lwdown_errfile
993          character*(MAX_LEN_FNAM) evap_errfile
994          character*(MAX_LEN_FNAM) apressure_errfile
995          character*(MAX_LEN_FNAM) runoff_errfile
996          character*(MAX_LEN_FNAM) edtau_errfile
997          character*(MAX_LEN_FNAM) kapgm_errfile
998          character*(MAX_LEN_FNAM) kapredi_errfile
999          character*(MAX_LEN_FNAM) diffkr_errfile
1000          character*(MAX_LEN_FNAM) bottomdrag_errfile
1001          character*(MAX_LEN_FNAM) usercost_errfile(NUSERCOST)
1002        character*(MAX_LEN_FNAM) uwind_errfile        character*(MAX_LEN_FNAM) uwind_errfile
1003        character*(MAX_LEN_FNAM) vwind_errfile        character*(MAX_LEN_FNAM) vwind_errfile
1004    
# Line 778  c     wctdt      - weight for CTD temper Line 1026  c     wctdt      - weight for CTD temper
1026  c     wctds      - weight for CTD salinity.  c     wctds      - weight for CTD salinity.
1027  c     wudrift    - weight for mean zonal velocity from drifters.  c     wudrift    - weight for mean zonal velocity from drifters.
1028  c     wvdrift    - weight for mean meridional velocity from drifters.  c     wvdrift    - weight for mean meridional velocity from drifters.
1029    c     wetan      - weight for etan0
1030    
1031        common /ecco_cost_weights_r/        common /ecco_cost_weights_r/
1032       &                      frame,       &                      frame,
1033       &                      cosphi,       &                      cosphi,
1034       &                      whflux,wsflux,wtauu,wtauv,       &                      whflux,wsflux,wtauu,wtauv,
1035       &                      watemp,waqh,wprecip,wswflux,wswdown,       &                      watemp,waqh,wprecip,wsnowprecip,
1036         &                      wswflux,wswdown,wlwflux,wlwdown,
1037         &                      wevap,wapressure,wrunoff,
1038         &                      wbottomdrag,
1039       &                      wuwind,wvwind,       &                      wuwind,wvwind,
1040       &                      wscatx,wscaty,       &                      wscatx,wscaty,
1041       &                      wtheta,wtheta2,wthetaLev,       &                      wtheta,wtheta2,wthetaLev,
1042       &                      wsalt,wsalt2,wsaltLev,       &                      wsalt,wsalt2,wsaltLev,
1043       &                      wsst,wsss,       &                      wdiffkr,wdiffkr2,wdiffkrFld,
1044       &                      wtp,wers,       &                      wkapgm,wkapgm2,wkapgmFld,
1045       &                      wp,       &                      wkapredi,wkapredi2,wkaprediFld,
1046         &                      wedtaux,wedtaux2,wedtauxFld,
1047         &                      wedtauy,wedtauy2,wedtauyFld,
1048         &                      wsst,wsss,wbp,
1049         &                      wtp,wers,wgfo,
1050         &                      wp,wsshv4,
1051       &                      wctdt,wctds,       &                      wctdt,wctds,
1052       &                      wudrift,wvdrift,       &                      wudrift,wvdrift,
1053       &                      whfluxmm,wsfluxmm,       &                      whfluxmm,wsfluxmm,
1054       &                      wcurrent,wcurrent2,       &                      wcurrent,wcurrent2,
1055       &                      wcurrentLev,wbaro       &                      wcurrentLev,wbaro,wetan,
1056         &                      wuvel,wvvel
1057    
1058        _RL frame   (1-olx:snx+olx,1-oly:sny+oly           )        _RL frame   (1-olx:snx+olx,1-oly:sny+oly           )
1059        _RL cosphi  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL cosphi  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
# Line 816  c     wvdrift    - weight for mean merid Line 1074  c     wvdrift    - weight for mean merid
1074        _RL wprecip (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wprecip (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1075        _RL wswflux (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wswflux (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1076        _RL wswdown (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wswdown (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1077          _RL wsnowprecip (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1078          _RL wlwflux (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1079          _RL wlwdown (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1080          _RL wevap   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1081          _RL wapressure(1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1082          _RL wrunoff (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1083          _RL wbottomdrag (1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
1084        _RL wuwind  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wuwind  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1085        _RL wvwind  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wvwind  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1086        _RL wtheta  (                            nr,nsx,nsy)        _RL wtheta  (                            nr,nsx,nsy)
# Line 824  c     wvdrift    - weight for mean merid Line 1089  c     wvdrift    - weight for mean merid
1089        _RL wsalt2  (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL wsalt2  (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1090        _RL wthetaLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL wthetaLev (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1091        _RL wsaltLev  (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL wsaltLev  (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1092          _RL wuvel   (                            nr,nsx,nsy)
1093          _RL wvvel   (                            nr,nsx,nsy)
1094        _RL wsst    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wsst    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1095        _RL wsss    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wsss    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1096          _RL wbp     (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1097        _RL wtp     (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wtp     (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1098          _RL wsshv4  (1-olx:snx+olx,1-oly:sny+oly,NSSHV4COST,nsx,nsy)
1099        _RL wers    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wers    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1100          _RL wgfo    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1101        _RL wp      (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wp      (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1102        _RL wctdt   (                            nr,nsx,nsy)        _RL wctdt   (                            nr,nsx,nsy)
1103        _RL wctds   (                            nr,nsx,nsy)        _RL wctds   (                            nr,nsx,nsy)
# Line 837  c     wvdrift    - weight for mean merid Line 1107  c     wvdrift    - weight for mean merid
1107        _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)
1108        _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)
1109        _RL wbaro        _RL wbaro
1110          _RL wdiffkr (                            nr,nsx,nsy)
1111          _RL wdiffkr2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1112          _RL wdiffkrFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1113          _RL wkapgm (                            nr,nsx,nsy)
1114          _RL wkapgm2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1115          _RL wkapgmFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1116          _RL wkapredi (                            nr,nsx,nsy)
1117          _RL wkapredi2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1118          _RL wkaprediFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1119          _RL wedtaux (                            nr,nsx,nsy)
1120          _RL wedtaux2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1121          _RL wedtauxFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1122          _RL wedtauy (                            nr,nsx,nsy)
1123          _RL wedtauy2 (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1124          _RL wedtauyFld (1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1125          _RL wetan   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1126    
1127    #if (defined (ALLOW_UVEL0_COST_CONTRIBUTION) || defined (ALLOW_UVEL0_CONTROL))
1128    #if (defined (ALLOW_VVEL0_COST_CONTRIBUTION) || defined (ALLOW_VVEL0_CONTROL))
1129    c     wuvel3d      - weight for uvel0
1130    c     wvvel3d      - weight for vvel0
1131    c
1132          common /ecco_cost_weights_vel_r/
1133         &                      wuvel3d, wvvel3d  
1134    c
1135          _RL wuvel3d(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1136          _RL wvvel3d(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
1137    #endif
1138    #endif
1139    
1140        common /ecco_cost_weights_0_r/        common /ecco_cost_weights_0_r/
1141       &        whflux0, wsflux0, wtau0,       &        whflux0, wsflux0, wtau0,
1142       &        watemp0, waqh0, wprecip0, wswflux0, wswdown0, wwind0       &        watemp0, waqh0, wprecip0, wsnowprecip0, wwind0,
1143         &        wswflux0, wswdown0, wlwflux0, wlwdown0,
1144         &        wevap0, wapressure0, wrunoff0, wkapredi0,
1145         &        wbottomdrag0,wdiffkr0, wkapgm0, wedtau0
1146        _RL whflux0        _RL whflux0
1147        _RL wsflux0        _RL wsflux0
1148        _RL wtau0        _RL wtau0
# Line 849  c     wvdrift    - weight for mean merid Line 1151  c     wvdrift    - weight for mean merid
1151        _RL wprecip0        _RL wprecip0
1152        _RL wswflux0        _RL wswflux0
1153        _RL wswdown0        _RL wswdown0
1154          _RL wsnowprecip0
1155          _RL wlwflux0
1156          _RL wlwdown0
1157          _RL wevap0
1158          _RL wapressure0
1159          _RL wrunoff0
1160          _RL wbottomdrag0
1161        _RL wwind0        _RL wwind0
1162          _RL wdiffkr0
1163          _RL wkapgm0
1164          _RL wkapredi0
1165          _RL wedtau0
1166    
1167        common /ecco_cost_weights_mean_r/        common /ecco_cost_weights_mean_r/
1168       &        wmean_hflux, wmean_sflux, wmean_tau,       &        wmean_hflux, wmean_sflux, wmean_tau,
1169       &        wmean_atemp, wmean_aqh,       &        wmean_atemp, wmean_aqh,
1170       &        wmean_precip, wmean_swflux, wmean_swdown, wmean_wind       &        wmean_precip, wmean_snowprecip, wmean_wind,
1171         &        wmean_swflux, wmean_swdown, wmean_lwflux, wmean_lwdown,
1172         &        wmean_evap, wmean_apressure, wmean_runoff
1173        _RL wmean_hflux        _RL wmean_hflux
1174        _RL wmean_sflux        _RL wmean_sflux
1175        _RL wmean_tau        _RL wmean_tau
# Line 863  c     wvdrift    - weight for mean merid Line 1178  c     wvdrift    - weight for mean merid
1178        _RL wmean_precip        _RL wmean_precip
1179        _RL wmean_swflux        _RL wmean_swflux
1180        _RL wmean_swdown        _RL wmean_swdown
1181          _RL wmean_snowprecip
1182          _RL wmean_lwflux
1183          _RL wmean_lwdown
1184          _RL wmean_evap
1185          _RL wmean_apressure
1186          _RL wmean_runoff
1187        _RL wmean_wind        _RL wmean_wind
1188                                                    
1189        common /ecco_cost_weights_2_r/        common /ecco_cost_weights_2_r/
1190       &                      whflux2,wsflux2,wtauu2,wtauv2       &                      whflux2,wsflux2,wtauu2,wtauv2
1191        _RL whflux2 (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL whflux2 (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1192        _RL wsflux2 (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wsflux2 (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1193        _RL wtauu2  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wtauu2  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1194        _RL wtauv2  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL wtauv2  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
                                                   
                         
1195    
1196  #if (defined (ALLOW_OBCSN_COST_CONTRIBUTION) || \  #if (defined (ALLOW_OBCSN_COST_CONTRIBUTION) || \
1197       defined (ALLOW_OBCSN_CONTROL))       defined (ALLOW_OBCSN_CONTROL))
# Line 913  c     scatydat   - reference meridional Line 1232  c     scatydat   - reference meridional
1232  c     sstdat     - reference sea surface temperature data.  c     sstdat     - reference sea surface temperature data.
1233  c     tmidat     - reference TMI sea surface temperature data.  c     tmidat     - reference TMI sea surface temperature data.
1234  c     sssdat     - reference sea surface temperature data.  c     sssdat     - reference sea surface temperature data.
1235    c     bpdat      - bottom pressure from time-varying GRACE.
1236  c     tauxmask   - mask for reference wind stress data.  c     tauxmask   - mask for reference wind stress data.
1237  c     tauymask   - mask for reference wind stress data.  c     tauymask   - mask for reference wind stress data.
1238  c     scatxmask  - mask for scat wind stress data.  c     scatxmask  - mask for scat wind stress data.
1239  c     scatymask  - mask for scat wind stress data.  c     scatymask  - mask for scat wind stress data.
1240  c     sstmask    - mask for reference sea surface temperature data.  c     sstmask    - mask for reference sea surface temperature data.
1241  c     tmimask    - mask for reference sea surface temperature data.  c     tmimask    - mask for reference sea surface temperature data.
1242  c     sssmask    - mask for reference sea surface temperature data.  c     sssmask    - mask for reference sea surface temperature data.
# Line 929  c     ersobs     - ERS data. Line 1249  c     ersobs     - ERS data.
1249  c     ersmask    - mask for ERS data.  c     ersmask    - mask for ERS data.
1250  c     ctdtobs    - CTD temperature data  c     ctdtobs    - CTD temperature data
1251  c     ctdsobs    - CTD salinity data  c     ctdsobs    - CTD salinity data
1252  c     xbtobs     - XBT data  c     xbtobs     - XBT data
1253  c     argot      - ARGO  temperature data  c     argot      - ARGO  temperature data
1254  c     argos      - ARGO  salt data  c     argos      - ARGO  salt data
1255  c     udriftdat  - drifters zonal velocities  c     udriftdat  - drifters zonal velocities
1256  c     vdriftdat  - drifters meridional velocities  c     vdriftdat  - drifters meridional velocities
1257    
# Line 939  c     vdriftdat  - drifters meridional v Line 1259  c     vdriftdat  - drifters meridional v
1259       &                     tdat,       &                     tdat,
1260       &                     scatxdat,       &                     scatxdat,
1261       &                     scatydat,       &                     scatydat,
1262       &                     sstdat,       &                     bpdat,
      &                     tmidat,  
      &                     sssdat,  
1263       &                     sstmask,       &                     sstmask,
1264       &                     tmimask,       &                     tmimask,
1265       &                     sssmask,       &                     sssmask,
1266         &                     bpmask,
1267       &                     tauxmask,       &                     tauxmask,
1268       &                     tauymask,       &                     tauymask,
1269       &                     scatxmask,       &                     scatxmask,
# Line 956  c     vdriftdat  - drifters meridional v Line 1275  c     vdriftdat  - drifters meridional v
1275       &                     tpmask,       &                     tpmask,
1276       &                     ersobs,       &                     ersobs,
1277       &                     ersmask,       &                     ersmask,
1278         &                     gfoobs,
1279         &                     gfomask,
1280       &                     ctdtobs,       &                     ctdtobs,
1281       &                     ctdsobs,       &                     ctdsobs,
1282       &                     xbtobs,       &                     xbtobs,
# Line 965  c     vdriftdat  - drifters meridional v Line 1286  c     vdriftdat  - drifters meridional v
1286       &                     vdriftdat,       &                     vdriftdat,
1287       &                     curmtruobs,       &                     curmtruobs,
1288       &                     curmtrvobs       &                     curmtrvobs
1289        
1290        _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)
1291        _RL scatxdat  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL scatxdat  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1292        _RL scatydat  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL scatydat  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1293        _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)  
1294        _RL tauxmask  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tauxmask  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1295        _RL tauymask  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tauymask  (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1296        _RL scatxmask (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL scatxmask (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
# Line 979  c     vdriftdat  - drifters meridional v Line 1298  c     vdriftdat  - drifters meridional v
1298        _RL sstmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL sstmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1299        _RL tmimask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tmimask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1300        _RL sssmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL sssmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1301          _RL bpmask    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1302        _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)
1303        _RL tpmean    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tpmean    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1304        _RL tpmeanmask(1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tpmeanmask(1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
# Line 986  c     vdriftdat  - drifters meridional v Line 1306  c     vdriftdat  - drifters meridional v
1306        _RL tpmask    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL tpmask    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1307        _RL ersobs    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL ersobs    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1308        _RL ersmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)        _RL ersmask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1309          _RL gfoobs    (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1310          _RL gfomask   (1-olx:snx+olx,1-oly:sny+oly,   nsx,nsy)
1311        _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)
1312        _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)
1313        _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 1011  c     topexfile     - reference data fil Line 1333  c     topexfile     - reference data fil
1333  c                     (TOPEX/POSEIDON).  c                     (TOPEX/POSEIDON).
1334  c     ersfile       - reference data file for sea surface height data  c     ersfile       - reference data file for sea surface height data
1335  c                     (ERS).  c                     (ERS).
1336  c ctdtfile, ctdsfile- reference data file for temperature and salinity  c ctdtfile, ctdsfile- reference data file for temperature and salinity
1337  c                     from CTD  c                     from CTD
1338  c ctdtclimfile, ctdsclimfile- reference data file for temperature  c ctdtclimfile, ctdsclimfile- reference data file for temperature
1339  c                      and salinity from CTD with out timetag  c                      and salinity from CTD with out timetag
1340  c     xbtfile       - reference data file for xbt  c     xbtfile       - reference data file for xbt
1341  c     ARGOtfile     - reference data file for ARGO  c     ARGOtfile     - reference data file for ARGO
1342  c     ARGOsfile     - reference data file for ARGO  c     ARGOsfile     - reference data file for ARGO
1343  c     driftfile     - reference data file for drifter's mean velocities  c     driftfile     - reference data file for drifter mean velocities
1344    
1345        common /ecco_cost_data_c/        common /ecco_cost_data_c/
1346       &                     tdatfile,       &                     tdatfile,
# Line 1028  c     driftfile     - reference data fil Line 1350  c     driftfile     - reference data fil
1350       &                     sstdatfile,       &                     sstdatfile,
1351       &                     tmidatfile,       &                     tmidatfile,
1352       &                     sssdatfile,       &                     sssdatfile,
1353         &                     bpdatfile,
1354       &                     topexmeanfile,       &                     topexmeanfile,
1355       &                     topexfile,       &                     topexfile,
1356       &                     ersfile,       &                     ersfile,
1357         &                     gfofile,
1358       &                     ctdtfile,       &                     ctdtfile,
1359       &                     ctdsfile,       &                     ctdsfile,
1360       &                     ctdtclimfile,       &                     ctdtclimfile,
# Line 1038  c     driftfile     - reference data fil Line 1362  c     driftfile     - reference data fil
1362       &                     xbtfile,       &                     xbtfile,
1363       &                     argotfile,       &                     argotfile,
1364       &                     argosfile,       &                     argosfile,
1365       &                     udriftfile,       &                     udriftfile,
1366       &                     vdriftfile,       &                     vdriftfile,
1367         &                     usercost_datafile,
1368       &                     curmtrufile,       &                     curmtrufile,
1369       &                     curmtrvfile       &                     curmtrvfile
1370    
# Line 1050  c     driftfile     - reference data fil Line 1375  c     driftfile     - reference data fil
1375        character*(MAX_LEN_FNAM) sstdatfile        character*(MAX_LEN_FNAM) sstdatfile
1376        character*(MAX_LEN_FNAM) tmidatfile        character*(MAX_LEN_FNAM) tmidatfile
1377        character*(MAX_LEN_FNAM) sssdatfile        character*(MAX_LEN_FNAM) sssdatfile
1378          character*(MAX_LEN_FNAM) bpdatfile
1379        character*(MAX_LEN_FNAM) topexmeanfile        character*(MAX_LEN_FNAM) topexmeanfile
1380        character*(MAX_LEN_FNAM) topexfile        character*(MAX_LEN_FNAM) topexfile
1381        character*(MAX_LEN_FNAM) ersfile        character*(MAX_LEN_FNAM) ersfile
1382          character*(MAX_LEN_FNAM) gfofile
1383        character*(MAX_LEN_FNAM) ctdtfile        character*(MAX_LEN_FNAM) ctdtfile
1384        character*(MAX_LEN_FNAM) ctdsfile        character*(MAX_LEN_FNAM) ctdsfile
1385        character*(MAX_LEN_FNAM) ctdtclimfile        character*(MAX_LEN_FNAM) ctdtclimfile
# Line 1061  c     driftfile     - reference data fil Line 1388  c     driftfile     - reference data fil
1388        character*(MAX_LEN_FNAM) argotfile        character*(MAX_LEN_FNAM) argotfile
1389        character*(MAX_LEN_FNAM) argosfile        character*(MAX_LEN_FNAM) argosfile
1390        character*(MAX_LEN_FNAM) argofile        character*(MAX_LEN_FNAM) argofile
1391          character*(MAX_LEN_FNAM) usercost_datafile(NUSERCOST)
1392        character*(MAX_LEN_FNAM) udriftfile        character*(MAX_LEN_FNAM) udriftfile
1393        character*(MAX_LEN_FNAM) vdriftfile              character*(MAX_LEN_FNAM) vdriftfile
1394        character*(MAX_LEN_FNAM) curmtrufile        character*(MAX_LEN_FNAM) curmtrufile
1395        character*(MAX_LEN_FNAM) curmtrvfile        character*(MAX_LEN_FNAM) curmtrvfile
1396    
# Line 1074  c     using_ers - flag that indicates th Line 1402  c     using_ers - flag that indicates th
1402    
1403        common /ecco_cost_data_flags/        common /ecco_cost_data_flags/
1404       &                         using_topex,       &                         using_topex,
1405       &                         using_ers       &                         using_ers,
1406         &                         using_gfo
1407        logical using_topex        logical using_topex
1408        logical using_ers        logical using_ers
1409          logical using_gfo
1410    
1411  c     Calendar information for the observations:  c     Calendar information for the observations:
1412  c     ==========================================  c     ==========================================
# Line 1095  c     sshperiod      - sampling interval Line 1425  c     sshperiod      - sampling interval
1425       &                           argosstartdate,       &                           argosstartdate,
1426       &                           tmistartdate,       &                           tmistartdate,
1427       &                           sssstartdate,       &                           sssstartdate,
1428         &                           bpstartdate,
1429       &                           topexstartdate,       &                           topexstartdate,
1430       &                           ersstartdate       &                           ersstartdate,
1431         &                           gfostartdate
1432        integer scatxstartdate(4)        integer scatxstartdate(4)
1433        integer scatystartdate(4)        integer scatystartdate(4)
1434        integer sststartdate(4)        integer sststartdate(4)
# Line 1104  c     sshperiod      - sampling interval Line 1436  c     sshperiod      - sampling interval
1436        integer argosstartdate(4)        integer argosstartdate(4)
1437        integer tmistartdate(4)        integer tmistartdate(4)
1438        integer sssstartdate(4)        integer sssstartdate(4)
1439          integer bpstartdate(4)
1440        integer topexstartdate(4)        integer topexstartdate(4)
1441        integer ersstartdate(4)        integer ersstartdate(4)
1442          integer gfostartdate(4)
1443    
1444        common /ecco_cost_data_aux_i/        common /ecco_cost_data_aux_i/
1445       &                           tmistartdate1,       &                           tmistartdate1,
# Line 1114  c     sshperiod      - sampling interval Line 1448  c     sshperiod      - sampling interval
1448       &                           sststartdate2,       &                           sststartdate2,
1449       &                           sssstartdate1,       &                           sssstartdate1,
1450       &                           sssstartdate2,       &                           sssstartdate2,
1451         &                           bpstartdate1,
1452         &                           bpstartdate2,
1453       &                           argotstartdate1,       &                           argotstartdate1,
1454       &                           argotstartdate2,       &                           argotstartdate2,
1455       &                           argosstartdate1,       &                           argosstartdate1,
# Line 1122  c     sshperiod      - sampling interval Line 1458  c     sshperiod      - sampling interval
1458       &                           topexstartdate2,       &                           topexstartdate2,
1459       &                           ersstartdate1,       &                           ersstartdate1,
1460       &                           ersstartdate2,       &                           ersstartdate2,
1461         &                           gfostartdate1,
1462         &                           gfostartdate2,
1463       &                           scatstartdate1,       &                           scatstartdate1,
1464       &                           scatstartdate2       &                           scatstartdate2
1465    
# Line 1131  c     sshperiod      - sampling interval Line 1469  c     sshperiod      - sampling interval
1469        integer sststartdate2        integer sststartdate2
1470        integer sssstartdate1        integer sssstartdate1
1471        integer sssstartdate2        integer sssstartdate2
1472          integer bpstartdate1
1473          integer bpstartdate2
1474        integer argotstartdate1        integer argotstartdate1
1475        integer argotstartdate2        integer argotstartdate2
1476        integer argosstartdate1        integer argosstartdate1
# Line 1139  c     sshperiod      - sampling interval Line 1479  c     sshperiod      - sampling interval
1479        integer topexstartdate2        integer topexstartdate2
1480        integer ersstartdate1        integer ersstartdate1
1481        integer ersstartdate2        integer ersstartdate2
1482          integer gfostartdate1
1483          integer gfostartdate2
1484        integer scatstartdate1        integer scatstartdate1
1485        integer scatstartdate2        integer scatstartdate2
1486    
1487        common /ecco_cost_data_times_r/        common /ecco_cost_data_times_r/
1488       &                           topexperiod,       &                           topexperiod,
1489       &                           ersperiod,       &                           ersperiod,
1490         &                           gfoperiod,
1491       &                           scatperiod       &                           scatperiod
1492        _RL topexperiod        _RL topexperiod
1493        _RL ersperiod        _RL ersperiod
1494          _RL gfoperiod
1495        _RL scatperiod        _RL scatperiod
1496    
1497          common /ecco_cost_data_detrend/
1498         &                           topexintercept,
1499         &                           ersintercept,
1500         &                           gfointercept,
1501         &                           topexslope,
1502         &                           ersslope,
1503         &                           gfoslope
1504          _RL topexintercept
1505          _RL ersintercept
1506          _RL gfointercept
1507          _RL topexslope
1508          _RL ersslope
1509          _RL gfoslope
1510    
1511    cgf factor to convert sshv4cost_errfile in m
1512          common /ecco_cost_errfactor/
1513         &         sshv4cost_errfactor
1514          _RL  sshv4cost_errfactor(NSSHV4COST)
1515    
1516    #ifdef ALLOW_SSH_COST_CONTRIBUTION
1517          common /ecco_ssh_daymask_r/
1518         &       tpTimeMask, ersTimeMask, gfoTimeMask
1519          _RL tpTimeMask(maxNumDays)
1520          _RL ersTimeMask(maxNumDays)
1521          _RL gfoTimeMask(maxNumDays)
1522    #endif
1523    
1524          common /ecco_ssh_daymask_c/
1525         &       tpTimeMaskFile, ersTimeMaskFile, gfoTimeMaskFile
1526          character*(MAX_LEN_FNAM) tpTimeMaskFile
1527          character*(MAX_LEN_FNAM) ersTimeMaskFile
1528          character*(MAX_LEN_FNAM) gfoTimeMaskFile
1529    
1530  c     ==================================================================  c     ==================================================================
1531  c     END OF HEADER COST  c     END OF HEADER COST
1532  c     ==================================================================  c     ==================================================================

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.22