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

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

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


Revision 1.33 - (hide annotations) (download)
Sat Oct 18 12:42:30 2008 UTC (15 years, 8 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint61f, checkpoint61g, checkpoint61e, checkpoint61h, checkpoint61i
Changes since 1.32: +10 -1 lines
File MIME type: text/plain
Add call.

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

  ViewVC Help
Powered by ViewVC 1.1.22