/[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.8 by heimbach, Fri Nov 14 23:07:30 2003 UTC revision 1.22 by jmc, Sun May 9 16:23:01 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 28  c     == global variables == Line 29  c     == global variables ==
29  #include "PARAMS.h"  #include "PARAMS.h"
30    
31  #include "cost.h"  #include "cost.h"
32  #include "ctrl.h"  #ifdef ALLOW_CTRL
33    # include "ctrl.h"
34    #endif
35    #ifdef ALLOW_DIC
36    cph-- quickly for testing
37    # include "DIC_COST.h"
38    #endif
39    
40  c     == routine arguments ==  c     == routine arguments ==
41    
# Line 49  c     == end of interface == Line 56  c     == end of interface ==
56        itlo = mybxlo(mythid)        itlo = mybxlo(mythid)
57        ithi = mybxhi(mythid)        ithi = mybxhi(mythid)
58    
59    #ifdef ALLOW_SEAICE
60          CALL SEAICE_COST_FINAL (myThid)
61    #endif
62    
63  #if (defined (ALLOW_ECCO))  #if (defined (ALLOW_ECCO))
64        CALL ECCO_COST_FINAL (myThid)        CALL ECCO_COST_FINAL (myThid)
65    
# Line 68  c     == end of interface == Line 79  c     == end of interface ==
79  # ifdef ALLOW_COST_ATLANTIC_HEAT  # ifdef ALLOW_COST_ATLANTIC_HEAT
80        CALL COST_ATLANTIC_HEAT (myThid)        CALL COST_ATLANTIC_HEAT (myThid)
81  # endif  # endif
82    #ifdef ALLOW_COST_HFLUXM
83          CALL COST_HFLUX (myThid)
84    #endif
85    #ifdef ALLOW_COST_TEMP
86          CALL COST_TEMP (myThid)
87    #endif
88    
89  c--   Sum up all contributions.  c--   Sum up all contributions.
90        do bj = jtlo,jthi        do bj = jtlo,jthi
91          do bi = itlo,ithi          do bi = itlo,ithi
92    
93            print*,' --> objf_test(bi,bj)   =',objf_test(bi,bj)            write(standardmessageunit,'(A,D22.15)')
94            print*,' --> objf_tracer(bi,bj) =',objf_tracer(bi,bj)       &          ' --> objf_test(bi,bj)   = ', objf_test(bi,bj)
95            print*,' --> objf_atl(bi,bj)    =',objf_atl(bi,bj)            write(standardmessageunit,'(A,D22.15)')
96         &         ' --> objf_tracer(bi,bj) = ', objf_tracer(bi,bj)
97              write(standardmessageunit,'(A,D22.15)')
98         &         ' --> objf_atl(bi,bj)    = ', objf_atl(bi,bj)
99    #ifdef ALLOW_COST_TEMP
100              write(standardmessageunit,'(A,D22.15)')
101         &          ' --> objf_temp_tut(bi,bj)   = ', objf_temp_tut(bi,bj)
102    #endif
103    #ifdef ALLOW_COST_HFLUXM
104              write(standardmessageunit,'(A,D22.15)')
105         &         ' --> objf_hflux_tut(bi,bj) = ', objf_hflux_tut(bi,bj)
106    #endif
107    #ifdef ALLOW_COST_TRANSPORT
108              write(standardmessageunit,'(A,D22.15)')
109         &         ' --> objf_transport(bi,bj) = ', objf_transport(bi,bj)
110    #endif
111    
112            fc = fc            fc = fc
113       &            + mult_test   * objf_test(bi,bj)       &            + mult_test   * objf_test(bi,bj)
114       &            + mult_tracer * objf_tracer(bi,bj)       &            + mult_tracer * objf_tracer(bi,bj)
115       &            + mult_atl    * objf_atl(bi,bj)       &            + mult_atl    * objf_atl(bi,bj)
116    #ifdef ALLOW_COST_TRANSPORT
117         &            + mult_transport * objf_transport(bi,bj)
118    #endif
119    #ifdef ALLOW_COST_TEMP
120         &            + mult_temp_tut  * objf_temp_tut(bi,bj)
121    #endif
122    #ifdef ALLOW_COST_HFLUXM
123         &            + mult_hflux_tut * objf_hflux_tut(bi,bj)
124    #endif
125          enddo          enddo
126        enddo        enddo
127    
128        print*,' local fc = ', fc        write(standardmessageunit,'(A,D22.15)') '  local fc = ', fc
129    
130  c--   Do global summation.  c--   Do global summation.
131        _GLOBAL_SUM_R8( fc , myThid )        _GLOBAL_SUM_RL( fc , myThid )
132    
133    #ifdef ALLOW_DIC
134    cph-- quickly for testing
135          fc = totcost
136    #endif
137    
138        print*,' global fc = ', fc        write(standardmessageunit,'(A,D22.15)') ' global fc = ', fc
139    
140  #endif /* ALLOW_ECCO */  #endif /* ALLOW_ECCO */
141    
142  c--   set averaging freq. to zero to avoid re-write of  c--   to avoid re-write of output in reverse checkpointing loops,
143  c--   averaged fields in reverse checkpointing loops  c--   switch off output flag :
144        taveFreq = 0.        CALL TURNOFF_MODEL_IO( 0, myThid )
145    
146  #endif /* ALLOW_COST */  #endif /* ALLOW_COST */
147    
148        return        return
149        end        end
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.22