/[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.9 - (show annotations) (download)
Mon Feb 23 19:15:37 2004 UTC (20 years, 3 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint52l_pre, hrcube5, checkpoint56b_post, checkpoint54d_post, checkpoint54e_post, checkpoint52l_post, checkpoint52k_post, checkpoint55, checkpoint54, checkpoint56, checkpoint53, checkpoint54f_post, checkpoint55i_post, checkpoint55c_post, checkpoint53d_post, checkpoint54b_post, checkpoint52m_post, checkpoint55g_post, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint53g_post, checkpoint56a_post, checkpoint53f_post, checkpoint52n_post, checkpoint53b_pre, checkpoint56c_post, checkpoint55a_post, checkpoint53b_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post
Changes since 1.8: +4 -2 lines
o set all ...Freq to zero after cost_final
  taveFreq, dumpFreq, pChkptFreq

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_final.F,v 1.8 2003/11/14 23:07:30 heimbach Exp $
2
3 #include "PACKAGES_CONFIG.h"
4 #include "COST_CPPOPTIONS.h"
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 changed: Christian Eckert eckert@mit.edu 25-Feb-2000
16 c heimbach@mit.edu 05-Nov-2003 Modularize cost package
17 c
18 c ==================================================================
19 c SUBROUTINE cost_final
20 c ==================================================================
21
22 implicit none
23
24 c == global variables ==
25
26 #include "EEPARAMS.h"
27 #include "SIZE.h"
28 #include "PARAMS.h"
29
30 #include "cost.h"
31 #include "ctrl.h"
32
33 c == routine arguments ==
34
35 integer mythid
36
37 #ifdef ALLOW_COST
38 c == local variables ==
39
40 integer i,j,k
41 integer bi,bj
42 integer itlo,ithi
43 integer jtlo,jthi
44
45 c == end of interface ==
46
47 jtlo = mybylo(mythid)
48 jthi = mybyhi(mythid)
49 itlo = mybxlo(mythid)
50 ithi = mybxhi(mythid)
51
52 #if (defined (ALLOW_ECCO))
53 CALL ECCO_COST_FINAL (myThid)
54
55 #elif (defined (ALLOW_COST_VECTOR))
56 CALL COST_VECTOR (myThid)
57
58 #elif (defined (ALLOW_COST_STATE_FINAL))
59 CALL COST_STATE_FINAL (myThid)
60
61 #endif /* above stuff undef */
62
63 #ifndef ALLOW_ECCO
64
65 # ifdef ALLOW_COST_TEST
66 CALL COST_TEST (myThid)
67 # endif
68 # ifdef ALLOW_COST_ATLANTIC_HEAT
69 CALL COST_ATLANTIC_HEAT (myThid)
70 # endif
71
72 c-- Sum up all contributions.
73 do bj = jtlo,jthi
74 do bi = itlo,ithi
75
76 print*,' --> objf_test(bi,bj) =',objf_test(bi,bj)
77 print*,' --> objf_tracer(bi,bj) =',objf_tracer(bi,bj)
78 print*,' --> objf_atl(bi,bj) =',objf_atl(bi,bj)
79
80 fc = fc
81 & + mult_test * objf_test(bi,bj)
82 & + mult_tracer * objf_tracer(bi,bj)
83 & + mult_atl * objf_atl(bi,bj)
84 enddo
85 enddo
86
87 print*,' local fc = ', fc
88
89 c-- Do global summation.
90 _GLOBAL_SUM_R8( fc , myThid )
91
92 print*,' global fc = ', fc
93
94 #endif /* ALLOW_ECCO */
95
96 c-- set averaging freq. to zero to avoid re-write of
97 c-- averaged fields in reverse checkpointing loops
98 taveFreq = 0.
99 dumpFreq = 0.
100 pChkptFreq = 0.
101
102 #endif /* ALLOW_COST */
103
104 return
105 end
106

  ViewVC Help
Powered by ViewVC 1.1.22