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

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

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


Revision 1.60 - (show annotations) (download)
Tue Mar 26 22:09:52 2013 UTC (11 years, 2 months ago) by gforget
Branch: MAIN
Changes since 1.59: +7 -1 lines
File MIME type: text/plain
- add call to new routine ECCO_PHYS
- add option to apply global steric correction to psbar.

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

  ViewVC Help
Powered by ViewVC 1.1.22