/[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.6 by heimbach, Thu Oct 2 21:34:45 2003 UTC revision 1.7 by heimbach, Thu Nov 6 22:03:49 2003 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    
3    #include "PACKAGES_CONFIG.h"
4  #include "COST_CPPOPTIONS.h"  #include "COST_CPPOPTIONS.h"
5    
   
6        subroutine cost_final( mythid )        subroutine cost_final( mythid )
7    
8  c     ==================================================================  c     ==================================================================
# Line 12  c Line 12  c
12  c     o Sum of all cost function contributions.  c     o Sum of all cost function contributions.
13  c  c
14  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999
 c  
15  c     changed: Christian Eckert eckert@mit.edu 25-Feb-2000  c     changed: Christian Eckert eckert@mit.edu 25-Feb-2000
16  c  c     heimbach@mit.edu 05-Nov-2003 Modularize cost package
 c              - Restructured the code in order to create a package  
 c                for the MITgcmUV.  
17  c  c
18  c     ==================================================================  c     ==================================================================
19  c     SUBROUTINE cost_final  c     SUBROUTINE cost_final
# Line 52  c     == end of interface == Line 49  c     == end of interface ==
49        itlo = mybxlo(mythid)        itlo = mybxlo(mythid)
50        ithi = mybxhi(mythid)        ithi = mybxhi(mythid)
51    
52  #if (defined (ALLOW_COST_VECTOR))  #if (defined (ALLOW_ECCO))
53          CALL ECCO_COST_FINAL (myThid)
54    
55    #elif (defined (ALLOW_COST_VECTOR))
56        CALL COST_VECTOR (myThid)        CALL COST_VECTOR (myThid)
57    
58  #elif (defined (ALLOW_COST_STATE_FINAL))  #elif (defined (ALLOW_COST_STATE_FINAL))
   
59        CALL COST_STATE_FINAL (myThid)        CALL COST_STATE_FINAL (myThid)
60    
61  #else /* ALLOW_COST_VECTOR undef */  #else /* above stuff undef */
62    
63  #ifdef ALLOW_COST_TEST  # ifdef ALLOW_COST_TEST
64        CALL COST_TEST (myThid)        CALL COST_TEST (myThid)
65  #endif  # endif
66    # ifdef ALLOW_COST_ATLANTIC_HEAT
 #ifdef ALLOW_COST_ATLANTIC_HEAT  
67        CALL COST_ATLANTIC_HEAT (myThid)        CALL COST_ATLANTIC_HEAT (myThid)
68  #endif  # endif
69    
70  c--   Sum up all contributions.  c--   Sum up all contributions.
71        do bj = jtlo,jthi        do bj = jtlo,jthi
# Line 76  c--   Sum up all contributions. Line 73  c--   Sum up all contributions.
73    
74            print*,' --> objf_test(bi,bj)   =',objf_test(bi,bj)            print*,' --> objf_test(bi,bj)   =',objf_test(bi,bj)
75            print*,' --> objf_tracer(bi,bj) =',objf_tracer(bi,bj)            print*,' --> objf_tracer(bi,bj) =',objf_tracer(bi,bj)
76            print*,' --> objf_atl(bi,bj) =',objf_atl(bi,bj)            print*,' --> objf_atl(bi,bj)    =',objf_atl(bi,bj)
77    
78            fc = fc            fc = fc
79       &            + mult_test   * objf_test(bi,bj)       &            + mult_test   * objf_test(bi,bj)
# Line 90  c--   Sum up all contributions. Line 87  c--   Sum up all contributions.
87  c--   Do global summation.  c--   Do global summation.
88        _GLOBAL_SUM_R8( fc , myThid )        _GLOBAL_SUM_R8( fc , myThid )
89    
 #endif /* ALLOW_COST_VECTOR */  
   
90        print*,' global fc = ', fc        print*,' global fc = ', fc
91    
92    #endif /* ALLOW_ECCO */
93    
94  c--   set averaging freq. to zero to avoid re-write of  c--   set averaging freq. to zero to avoid re-write of
95  c--   averaged fields in reverse checkpointing loops  c--   averaged fields in reverse checkpointing loops
96        taveFreq = 0.        taveFreq = 0.

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22