/[MITgcm]/MITgcm/pkg/cost/cost_final.F
ViewVC logotype

Contents of /MITgcm/pkg/cost/cost_final.F

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


Revision 1.2.4.1 - (show annotations) (download)
Mon Apr 8 20:10:38 2002 UTC (22 years, 2 months ago) by heimbach
Branch: release1
CVS Tags: release1_p13_pre, release1_p13, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, release1_chkpt44d_post, release1_p12, release1_p10, release1_p11, release1_p16, release1_p17, release1_p14, release1_p15, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.2: +28 -6 lines
Changes encapsulated by checkpoint43a-release1mods and chkpt44d_post
on the main trunk.
These are:

 o added missing EXCLUDE_MONITOR flags
 o changed "e" to "_d" in gmredi_slope_limit, gmredi_slope_psi
   (incompatible typ in MIN/MAX expressions caused problems
   on IBM SP3)
 o in genmake added variable MAKEDEPEND
   plus resetting for case SunOS
 o added timer_stats.c routine for IBM SP3
 o removed variables in dynamics
 o real fresh water flux implemented with non-linear free-surface.
 o few fix (mask in shap_s2, EmPmR in external_field_load,
   USE_NATURAL_BCS in solve_for_P);
 o add arguments myIter & myTime to S/R obcs_calc & solve_for_P
 o merge of relevant stuff from the ecco-branch:
   - genmake: removed $S64 overwrite for case SunOS
   - pkg/exf: update and corrections for field swapping and obcs
   - pkg/ecco: parameter lists for the_model_main, the_main_loop
               harmonized between ECCO and MITgcm
   - pkg/autodiff: added flow directives for obcs, mdsio_gl_slice
                   updated checkpointing_lev... lists for obcs
   - model/src: minor changes in forward_step, plot_field
                added directive for divided adjoint in the_main_loop
   - pkg/mdsio: added mdsio_gl_slice
 o check parameters & config (chkpt44a_pre,post)
 o OBC and NonLin_FrSurf.
 o fix bug in mom_vi_del2uv
 o select when filters are applied ; add options to zonal_filter (data.zonfilt)
 o gmredi: fix Pb in the adiabatic form ; add options (.e.g. Bolus advection)
 o update AIM experiments (NCEP input files)
 o improve and extend diagnostics (Monitor, TimeAve with NonLin-FrSurf)
 o added some stuff for AD

These were merged with
cvs co -r release1 -P MITgcm
cd MITgcm
cvs update -kk
cvs update -j checkpoint43a-release1mods -j chkpt44d_post -d -P -kk

1 C $Header$
2
3 #include "COST_CPPOPTIONS.h"
4
5
6 subroutine cost_final( mythid )
7
8 c ==================================================================
9 c SUBROUTINE cost_final
10 c ==================================================================
11 c
12 c o Sum of all cost function contributions.
13 c
14 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
15 c
16 c changed: Christian Eckert eckert@mit.edu 25-Feb-2000
17 c
18 c - Restructured the code in order to create a package
19 c for the MITgcmUV.
20 c
21 c ==================================================================
22 c SUBROUTINE cost_final
23 c ==================================================================
24
25 implicit none
26
27 c == global variables ==
28
29 #include "EEPARAMS.h"
30 #include "SIZE.h"
31
32 #include "cost.h"
33 #include "ctrl.h"
34
35 c == routine arguments ==
36
37 integer mythid
38
39 #ifdef ALLOW_COST
40 c == local variables ==
41
42 integer i,j,k
43 integer bi,bj
44 integer itlo,ithi
45 integer jtlo,jthi
46
47 c == end of interface ==
48
49 jtlo = mybylo(mythid)
50 jthi = mybyhi(mythid)
51 itlo = mybxlo(mythid)
52 ithi = mybxhi(mythid)
53
54 #ifdef ALLOW_COST_VECTOR
55
56 CALL COST_VECTOR (myThid)
57
58 do bj = jtlo,jthi
59 do bi = itlo,ithi
60 do i = 1,sNx
61 print*,' --> objf_vector(i,bi,bj) = ',
62 & objf_vector(i,bi,bj)
63 end do
64 end do
65 end do
66
67 #else /* ALLOW_COST_VECTOR undef */
68
69 #ifdef ALLOW_COST_TEST
70 CALL COST_TEST (myThid)
71 #endif
72
73 #ifdef ALLOW_COST_ATLANTIC_HEAT
74 CALL COST_ATLANTIC_HEAT (myThid)
75 #endif
76
77 c-- Sum up all contributions.
78 do bj = jtlo,jthi
79 do bi = itlo,ithi
80
81 print*,' --> objf_test(bi,bj) =',objf_test(bi,bj)
82 print*,' --> objf_tracer(bi,bj) =',objf_tracer(bi,bj)
83 print*,' --> objf_atl(bi,bj) =',objf_atl(bi,bj)
84
85 fc = fc
86 & + mult_test * objf_test(bi,bj)
87 & + mult_tracer * objf_tracer(bi,bj)
88 & + mult_atl * objf_atl(bi,bj)
89 enddo
90 enddo
91
92 print*,' fc = ', fc
93
94 c-- Do global summation.
95 _GLOBAL_SUM_R8( fc , myThid )
96
97 #endif /* ALLOW_COST_VECTOR */
98
99 #endif /* ALLOW_COST */
100
101 return
102 end
103

  ViewVC Help
Powered by ViewVC 1.1.22