/[MITgcm]/MITgcm/pkg/seaice/seaice_cost_final.F
ViewVC logotype

Diff of /MITgcm/pkg/seaice/seaice_cost_final.F

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

revision 1.3 by heimbach, Thu Aug 25 18:23:12 2005 UTC revision 1.4 by heimbach, Thu Sep 1 05:34:31 2005 UTC
# Line 42  c     == local variables == Line 42  c     == local variables ==
42        integer totnum        integer totnum
43    
44        _RL f_ice        _RL f_ice
45          _RL f_smrarea
46    
47        _RL no_ice        _RL no_ice
48          _RL no_smrarea
49    
50        character*20 cfname        character*20 cfname
51  #ifdef ECCO_VERBOSE  #ifdef ECCO_VERBOSE
# Line 59  c     == end of interface == Line 61  c     == end of interface ==
61    
62        ifc = 30        ifc = 30
63                
64        f_ice     = 0. _d 0        f_ice      = 0. _d 0
65        no_ice    = 0. _d 0        f_smrarea  = 0. _d 0
66    c
67          no_ice     = 0. _d 0
68          no_smrarea = 0. _d 0
69    
70  c--   Sum up all contributions.  c--   Sum up all contributions.
71        do bj = jtlo,jthi        do bj = jtlo,jthi
# Line 68  c--   Sum up all contributions. Line 73  c--   Sum up all contributions.
73    
74            fc = fc            fc = fc
75       &            + mult_ice     * objf_ice(bi,bj)       &            + mult_ice     * objf_ice(bi,bj)
76         &            + mult_smrarea * objf_smrarea(bi,bj)
77    
78            f_ice = f_ice + objf_ice(bi,bj)            f_ice = f_ice + objf_ice(bi,bj)
79              f_smrarea = f_smrarea + objf_smrarea(bi,bj)
80    
81            no_ice = no_ice + num_ice(bi,bj)            no_ice = no_ice + num_ice(bi,bj)
82              no_smrarea = no_smrarea + num_smrarea(bi,bj)
83    
84          enddo          enddo
85        enddo        enddo
# Line 82  c--   Do global summation. Line 90  c--   Do global summation.
90  c--   Do global summation for each part of the cost function  c--   Do global summation for each part of the cost function
91                            
92        _GLOBAL_SUM_R8( f_ice , myThid )        _GLOBAL_SUM_R8( f_ice , myThid )
93          _GLOBAL_SUM_R8( f_smrarea , myThid )
94    
95        _GLOBAL_SUM_R8( no_ice , myThid )        _GLOBAL_SUM_R8( no_ice , myThid )
96          _GLOBAL_SUM_R8( no_smrarea , myThid )
97    
98        write(standardmessageunit,'(A,D22.15)')        write(standardmessageunit,'(A,D22.15)')
99       &     ' --> f_ice     =',f_ice       &     ' --> f_ice     =',f_ice
100          write(standardmessageunit,'(A,D22.15)')
101         &     ' --> f_smrarea =',f_smrarea
102    
103  c--   Each process has calculated the global part for itself.  c--   Each process has calculated the global part for itself.
104        _BEGIN_MASTER( mythid )        _BEGIN_MASTER( mythid )
# Line 96  c--   Each process has calculated the gl Line 108  c--   Each process has calculated the gl
108                
109          write(ifc,*) 'fc =', fc          write(ifc,*) 'fc =', fc
110          write(ifc,*) 'f_ice   =', f_ice, no_ice          write(ifc,*) 'f_ice   =', f_ice, no_ice
111            write(ifc,*) 'f_smrarea   =', f_smrarea, no_smrarea
112    
113          close(ifc)          close(ifc)
114                    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22