/[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.69 - (show annotations) (download)
Thu Oct 16 20:02:34 2014 UTC (9 years, 8 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65g, HEAD
Changes since 1.68: +5 -1 lines
File MIME type: text/plain
- remove variables associated with NON-generic costs
  unless ECCO_CTRL_DEPRECATED is defined
- ecco_readparms.F : include ecco.h and ecco_local_params.h,
  instead of ecco_cost.h, unless ECCO_CTRL_DEPRECATED is defined
- ecco_cost_init_varia.F, ecco_cost_init_barfiles.F,
  ecco_cost_final.F, ecco_cost_init_fixed.F : include ecco.h,
  instead of ecco_cost.h, unless ECCO_CTRL_DEPRECATED is defined
- ecco_toolbox.F, ecco_cost_init_barfiles.F : bug fixes.

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

  ViewVC Help
Powered by ViewVC 1.1.22