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

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

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


Revision 1.5 - (hide annotations) (download)
Tue Jan 21 19:20:52 2003 UTC (21 years, 4 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint50c_post, checkpoint48e_post, checkpoint50c_pre, checkpoint48i_post, checkpoint51, checkpoint50, checkpoint50d_post, checkpoint50b_pre, checkpoint51f_post, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint48d_pre, checkpoint48d_post, checkpoint48f_post, checkpoint48h_post, checkpoint51b_pre, checkpoint48a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint47j_post, branchpoint-genmake2, checkpoint48c_post, checkpoint51b_post, checkpoint51c_post, checkpoint50g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint50e_post, checkpoint50d_pre, checkpoint51e_post, checkpoint48, checkpoint49, checkpoint51f_pre, checkpoint48g_post, checkpoint50b_post, checkpoint51a_post
Branch point for: branch-genmake2
Changes since 1.4: +6 -1 lines
Set averaging freq. to zero to avoid re-write of
averaged fields in reverse checkpointing loops.

1 heimbach 1.5 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_final.F,v 1.4 2002/07/13 03:01:39 heimbach Exp $
2 heimbach 1.1
3     #include "COST_CPPOPTIONS.h"
4    
5    
6 heimbach 1.3 subroutine cost_final( mythid )
7 heimbach 1.1
8     c ==================================================================
9 heimbach 1.3 c SUBROUTINE cost_final
10 heimbach 1.1 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 heimbach 1.3 c SUBROUTINE cost_final
23 heimbach 1.1 c ==================================================================
24    
25     implicit none
26    
27     c == global variables ==
28    
29     #include "EEPARAMS.h"
30     #include "SIZE.h"
31 heimbach 1.5 #include "PARAMS.h"
32 heimbach 1.1
33     #include "cost.h"
34     #include "ctrl.h"
35    
36     c == routine arguments ==
37    
38     integer mythid
39    
40 heimbach 1.2 #ifdef ALLOW_COST
41 heimbach 1.1 c == local variables ==
42    
43 heimbach 1.3 integer i,j,k
44 heimbach 1.1 integer bi,bj
45     integer itlo,ithi
46     integer jtlo,jthi
47    
48     c == end of interface ==
49    
50     jtlo = mybylo(mythid)
51     jthi = mybyhi(mythid)
52     itlo = mybxlo(mythid)
53     ithi = mybxhi(mythid)
54    
55 heimbach 1.3 #ifdef ALLOW_COST_VECTOR
56    
57     CALL COST_VECTOR (myThid)
58    
59     do bj = jtlo,jthi
60     do bi = itlo,ithi
61     do i = 1,sNx
62     print*,' --> objf_vector(i,bi,bj) = ',
63     & objf_vector(i,bi,bj)
64     end do
65     end do
66     end do
67    
68     #else /* ALLOW_COST_VECTOR undef */
69    
70 heimbach 1.2 #ifdef ALLOW_COST_TEST
71     CALL COST_TEST (myThid)
72 heimbach 1.1 #endif
73    
74 heimbach 1.3 #ifdef ALLOW_COST_ATLANTIC_HEAT
75     CALL COST_ATLANTIC_HEAT (myThid)
76     #endif
77    
78 heimbach 1.1 c-- Sum up all contributions.
79     do bj = jtlo,jthi
80     do bi = itlo,ithi
81    
82 heimbach 1.2 print*,' --> objf_test(bi,bj) =',objf_test(bi,bj)
83     print*,' --> objf_tracer(bi,bj) =',objf_tracer(bi,bj)
84 heimbach 1.3 print*,' --> objf_atl(bi,bj) =',objf_atl(bi,bj)
85 heimbach 1.1
86     fc = fc
87 heimbach 1.2 & + mult_test * objf_test(bi,bj)
88     & + mult_tracer * objf_tracer(bi,bj)
89 heimbach 1.3 & + mult_atl * objf_atl(bi,bj)
90 heimbach 1.1 enddo
91     enddo
92    
93 heimbach 1.2 print*,' fc = ', fc
94 heimbach 1.1
95     c-- Do global summation.
96     _GLOBAL_SUM_R8( fc , myThid )
97 heimbach 1.3
98     #endif /* ALLOW_COST_VECTOR */
99 heimbach 1.5
100     c-- set averaging freq. to zero to avoid re-write of
101     c-- averaged fields in reverse checkpointing loops
102     taveFreq = 0.
103 heimbach 1.1
104 heimbach 1.2 #endif /* ALLOW_COST */
105 heimbach 1.1
106     return
107     end
108    

  ViewVC Help
Powered by ViewVC 1.1.22