/[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.56 - (show annotations) (download)
Tue Dec 6 04:14:04 2011 UTC (12 years, 6 months ago) by mmazloff
Branch: MAIN
CVS Tags: checkpoint63p, checkpoint63q, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63g
Changes since 1.55: +33 -3 lines
File MIME type: text/plain
Enabling inverted echo sounder constraint (IES).  Turned on with ALLOW_IESTAU_COST_CONTRIBUTION.  Code copied primarily from ALLOW_BP_COST_CONTRIBUTION

This includes determining sound speed setting the stage for tomography constraints.  For now sound speed is determined in cost_averagesfields.F.  Would be better to have its own function but cause numerous recomputations.  Needs more thought

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

  ViewVC Help
Powered by ViewVC 1.1.22