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

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

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

revision 1.14 by heimbach, Tue Apr 4 14:52:43 2006 UTC revision 1.21 by jmc, Mon Apr 19 15:21:49 2010 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    C $Name$
3    
4  #include "PACKAGES_CONFIG.h"  #include "PACKAGES_CONFIG.h"
5  #include "COST_CPPOPTIONS.h"  #include "COST_CPPOPTIONS.h"
# Line 31  c     == global variables == Line 32  c     == global variables ==
32  #ifdef ALLOW_CTRL  #ifdef ALLOW_CTRL
33  # include "ctrl.h"  # include "ctrl.h"
34  #endif  #endif
35    #ifdef ALLOW_DIC
36    cph-- quickly for testing
37    # include "DIC_COST.h"
38    #endif
39    #ifdef ALLOW_MNC
40    # include "MNC_PARAMS.h"
41    #endif
42    
43  c     == routine arguments ==  c     == routine arguments ==
44    
# Line 74  c     == end of interface == Line 82  c     == end of interface ==
82  # ifdef ALLOW_COST_ATLANTIC_HEAT  # ifdef ALLOW_COST_ATLANTIC_HEAT
83        CALL COST_ATLANTIC_HEAT (myThid)        CALL COST_ATLANTIC_HEAT (myThid)
84  # endif  # endif
85    #ifdef ALLOW_COST_HFLUXM
86          CALL COST_HFLUX (myThid)
87    #endif
88    #ifdef ALLOW_COST_TEMP
89          CALL COST_TEMP (myThid)
90    #endif
91    
92  c--   Sum up all contributions.  c--   Sum up all contributions.
93        do bj = jtlo,jthi        do bj = jtlo,jthi
94          do bi = itlo,ithi          do bi = itlo,ithi
95    
96            write(standardmessageunit,'(A,D22.15)')            write(standardmessageunit,'(A,D22.15)')
97       &          ' --> objf_test(bi,bj)   = ', objf_test(bi,bj)       &          ' --> objf_test(bi,bj)   = ', objf_test(bi,bj)
98            write(standardmessageunit,'(A,D22.15)')            write(standardmessageunit,'(A,D22.15)')
99       &         ' --> objf_tracer(bi,bj) = ', objf_tracer(bi,bj)       &         ' --> objf_tracer(bi,bj) = ', objf_tracer(bi,bj)
100            write(standardmessageunit,'(A,D22.15)')            write(standardmessageunit,'(A,D22.15)')
101       &         ' --> objf_atl(bi,bj)    = ', objf_atl(bi,bj)       &         ' --> objf_atl(bi,bj)    = ', objf_atl(bi,bj)
102    #ifdef ALLOW_COST_TEMP
103              write(standardmessageunit,'(A,D22.15)')
104         &          ' --> objf_temp_tut(bi,bj)   = ', objf_temp_tut(bi,bj)
105    #endif
106    #ifdef ALLOW_COST_HFLUXM
107              write(standardmessageunit,'(A,D22.15)')
108         &         ' --> objf_hflux_tut(bi,bj) = ', objf_hflux_tut(bi,bj)
109    #endif
110    #ifdef ALLOW_COST_TRANSPORT
111              write(standardmessageunit,'(A,D22.15)')
112         &         ' --> objf_transport(bi,bj) = ', objf_transport(bi,bj)
113    #endif
114    
115            fc = fc            fc = fc
116       &            + mult_test   * objf_test(bi,bj)       &            + mult_test   * objf_test(bi,bj)
117       &            + mult_tracer * objf_tracer(bi,bj)       &            + mult_tracer * objf_tracer(bi,bj)
118       &            + mult_atl    * objf_atl(bi,bj)       &            + mult_atl    * objf_atl(bi,bj)
119    #ifdef ALLOW_COST_TRANSPORT
120         &            + mult_transport * objf_transport(bi,bj)
121    #endif
122    #ifdef ALLOW_COST_TEMP
123         &            + mult_temp_tut  * objf_temp_tut(bi,bj)
124    #endif
125    #ifdef ALLOW_COST_HFLUXM
126         &            + mult_hflux_tut * objf_hflux_tut(bi,bj)
127    #endif
128          enddo          enddo
129        enddo        enddo
130    
131        write(standardmessageunit,'(A,D22.15)') '  local fc = ', fc        write(standardmessageunit,'(A,D22.15)') '  local fc = ', fc
132    
133  c--   Do global summation.  c--   Do global summation.
134        _GLOBAL_SUM_R8( fc , myThid )        _GLOBAL_SUM_RL( fc , myThid )
135    
136    #ifdef ALLOW_DIC
137    cph-- quickly for testing
138          fc = totcost
139    #endif
140    
141        write(standardmessageunit,'(A,D22.15)') ' global fc = ', fc        write(standardmessageunit,'(A,D22.15)') ' global fc = ', fc
142    
# Line 108  c--   averaged fields in reverse checkpo Line 148  c--   averaged fields in reverse checkpo
148        dumpFreq    = 0.        dumpFreq    = 0.
149        pChkptFreq  = 0.        pChkptFreq  = 0.
150        monitorFreq = 0.        monitorFreq = 0.
151          useDiagnostics = .FALSE.
152    #ifdef ALLOW_MNC
153          monitor_mnc=.FALSE.
154          snapshot_mnc=.FALSE.
155          timeave_mnc=.FALSE.
156    #endif
157    
158  #endif /* ALLOW_COST */  #endif /* ALLOW_COST */
159    
160        return        return
161        end        end
   

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.22