/[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.4 - (hide annotations) (download)
Sat Jul 13 03:01:39 2002 UTC (21 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, checkpoint46f_post, checkpoint46b_post, checkpoint46l_pre, checkpoint47d_pre, checkpoint47a_post, checkpoint47i_post, checkpoint47d_post, checkpoint46d_pre, checkpoint46j_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint46k_post, branch-exfmods-tag, checkpoint46e_pre, checkpoint46b_pre, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint46g_post, checkpoint47f_post, checkpoint46i_post, checkpoint46c_post, checkpoint46e_post, checkpoint47, checkpoint46h_post, checkpoint47h_post, checkpoint46d_post
Branch point for: branch-exfmods-curt
Changes since 1.3: +1 -1 lines
Merging from release1_p5:
o Compatible with new ctrl package
o added Eliassen Palm cost hooks
o modif's of existing cost functions

1 heimbach 1.4 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_final.F,v 1.2.4.1 2002/04/08 20:10:38 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    
32     #include "cost.h"
33     #include "ctrl.h"
34    
35     c == routine arguments ==
36    
37     integer mythid
38    
39 heimbach 1.2 #ifdef ALLOW_COST
40 heimbach 1.1 c == local variables ==
41    
42 heimbach 1.3 integer i,j,k
43 heimbach 1.1 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 heimbach 1.3 #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 heimbach 1.2 #ifdef ALLOW_COST_TEST
70     CALL COST_TEST (myThid)
71 heimbach 1.1 #endif
72    
73 heimbach 1.3 #ifdef ALLOW_COST_ATLANTIC_HEAT
74     CALL COST_ATLANTIC_HEAT (myThid)
75     #endif
76    
77 heimbach 1.1 c-- Sum up all contributions.
78     do bj = jtlo,jthi
79     do bi = itlo,ithi
80    
81 heimbach 1.2 print*,' --> objf_test(bi,bj) =',objf_test(bi,bj)
82     print*,' --> objf_tracer(bi,bj) =',objf_tracer(bi,bj)
83 heimbach 1.3 print*,' --> objf_atl(bi,bj) =',objf_atl(bi,bj)
84 heimbach 1.1
85     fc = fc
86 heimbach 1.2 & + mult_test * objf_test(bi,bj)
87     & + mult_tracer * objf_tracer(bi,bj)
88 heimbach 1.3 & + mult_atl * objf_atl(bi,bj)
89 heimbach 1.1 enddo
90     enddo
91    
92 heimbach 1.2 print*,' fc = ', fc
93 heimbach 1.1
94     c-- Do global summation.
95     _GLOBAL_SUM_R8( fc , myThid )
96 heimbach 1.3
97     #endif /* ALLOW_COST_VECTOR */
98 heimbach 1.1
99 heimbach 1.2 #endif /* ALLOW_COST */
100 heimbach 1.1
101     return
102     end
103    

  ViewVC Help
Powered by ViewVC 1.1.22