/[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.27 by heimbach, Wed Aug 17 10:19:29 2011 UTC revision 1.28 by gforget, Fri Aug 10 14:43:57 2012 UTC
# Line 61  c     == end of interface == Line 61  c     == end of interface ==
61        CALL SHELFICE_COST_FINAL (myThid)        CALL SHELFICE_COST_FINAL (myThid)
62  #endif  #endif
63    
64  #if (defined (ALLOW_ECCO))  #ifdef ALLOW_ECCO
65        CALL ECCO_COST_FINAL (myThid)        CALL ECCO_COST_FINAL (myThid)
66    #endif
67    
68  #elif (defined (ALLOW_COST_VECTOR))  #ifdef ALLOW_COST_STATE_FINAL
       CALL COST_VECTOR (myThid)  
   
 #elif (defined (ALLOW_COST_STATE_FINAL))  
69        CALL COST_STATE_FINAL (myThid)        CALL COST_STATE_FINAL (myThid)
70    cgf : effectively using this in adjoint requires the
71    c     use of adjoint_state_final. That will activate the
72    c     objf_state_final vector in place of the fc scalar.
73    c     objf_state_final is therefore not added to fc.
74    #endif
75    
76  #endif /* above stuff undef */  #ifdef ALLOW_COST_VECTOR
77    cgf : same idea as for ALLOW_COST_STATE_FINAL
78  #ifndef ALLOW_ECCO        CALL COST_VECTOR (myThid)
79    #endif
80    
81  # ifdef ALLOW_COST_TEST  # ifdef ALLOW_COST_TEST
82        CALL COST_TEST (myThid)        CALL COST_TEST (myThid)
83  # endif  # endif
84    
85  # ifdef ALLOW_COST_ATLANTIC_HEAT  # ifdef ALLOW_COST_ATLANTIC_HEAT
86        CALL COST_ATLANTIC_HEAT (myThid)        CALL COST_ATLANTIC_HEAT (myThid)
87  # endif  # endif
88    
89  #ifdef ALLOW_COST_HFLUXM  #ifdef ALLOW_COST_HFLUXM
90    cgf : to compile previous line user is expected to provide cost_hflux.F
91        CALL COST_HFLUX (myThid)        CALL COST_HFLUX (myThid)
92  #endif  #endif
93    
94  #ifdef ALLOW_COST_TEMP  #ifdef ALLOW_COST_TEMP
95        CALL COST_TEMP (myThid)        CALL COST_TEMP (myThid)
96    cgf : to compile previous line user is expected to provide cost_temp.F
97  #endif  #endif
98    
99  c--   Sum up all contributions.  c--   Sum up all contributions.
# Line 95  c--   Sum up all contributions. Line 104  c--   Sum up all contributions.
104       &          ' --> objf_test(bi,bj)   = ', objf_test(bi,bj)       &          ' --> objf_test(bi,bj)   = ', objf_test(bi,bj)
105            write(standardmessageunit,'(A,D22.15)')            write(standardmessageunit,'(A,D22.15)')
106       &         ' --> objf_tracer(bi,bj) = ', objf_tracer(bi,bj)       &         ' --> objf_tracer(bi,bj) = ', objf_tracer(bi,bj)
107    #if ( !defined (ALLOW_ECCO) || !defined (ALLOW_COST_ATLANTIC) )
108            write(standardmessageunit,'(A,D22.15)')            write(standardmessageunit,'(A,D22.15)')
109       &         ' --> objf_atl(bi,bj)    = ', objf_atl(bi,bj)       &         ' --> objf_atl(bi,bj)    = ', objf_atl(bi,bj)
110    #endif
111  #ifdef ALLOW_COST_TEMP  #ifdef ALLOW_COST_TEMP
112            write(standardmessageunit,'(A,D22.15)')            write(standardmessageunit,'(A,D22.15)')
113       &          ' --> objf_temp_tut(bi,bj)   = ', objf_temp_tut(bi,bj)       &          ' --> objf_temp_tut(bi,bj)   = ', objf_temp_tut(bi,bj)
# Line 113  c--   Sum up all contributions. Line 124  c--   Sum up all contributions.
124            fc = fc            fc = fc
125       &            + mult_test   * objf_test(bi,bj)       &            + mult_test   * objf_test(bi,bj)
126       &            + mult_tracer * objf_tracer(bi,bj)       &            + mult_tracer * objf_tracer(bi,bj)
127    #if ( !defined (ALLOW_ECCO) || !defined (ALLOW_COST_ATLANTIC) )
128       &            + mult_atl    * objf_atl(bi,bj)       &            + mult_atl    * objf_atl(bi,bj)
129    #endif
130  #ifdef ALLOW_COST_TRANSPORT  #ifdef ALLOW_COST_TRANSPORT
131       &            + mult_transport * objf_transport(bi,bj)       &            + mult_transport * objf_transport(bi,bj)
132  #endif  #endif
# Line 138  cph-- quickly for testing Line 151  cph-- quickly for testing
151    
152        write(standardmessageunit,'(A,D22.15)') ' global fc = ', fc        write(standardmessageunit,'(A,D22.15)') ' global fc = ', fc
153    
 #endif /* ALLOW_ECCO */  
   
154  c--   to avoid re-write of output in reverse checkpointing loops,  c--   to avoid re-write of output in reverse checkpointing loops,
155  c--   switch off output flag :  c--   switch off output flag :
156        CALL TURNOFF_MODEL_IO( 0, myThid )        CALL TURNOFF_MODEL_IO( 0, myThid )

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.22