/[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.13 - (hide annotations) (download)
Thu Aug 25 16:10:42 2005 UTC (18 years, 9 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57s_post, checkpoint58b_post, checkpoint57y_post, checkpoint57r_post, checkpoint58, checkpoint58a_post, checkpoint57z_post, checkpoint57t_post, checkpoint57v_post, checkpoint57y_pre, checkpint57u_post, checkpoint57w_post, checkpoint57x_post, checkpoint58c_post
Changes since 1.12: +5 -1 lines
Moving seaice-related cost to pkg/seaice/

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

  ViewVC Help
Powered by ViewVC 1.1.22