/[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.11 by heimbach, Wed Apr 8 02:39:07 2009 UTC revision 1.12 by dimitri, Wed Apr 8 11:03:03 2009 UTC
# Line 32  c     == routine arguments == Line 32  c     == routine arguments ==
32    
33  #ifdef ALLOW_COST  #ifdef ALLOW_COST
34    
35    C     === Functions ====
36          LOGICAL  MASTER_CPU_THREAD
37          EXTERNAL MASTER_CPU_THREAD
38    
39  c     == local variables ==  c     == local variables ==
40    
41        integer bi,bj        integer bi,bj
# Line 47  c     == local variables == Line 51  c     == local variables ==
51        _RL no_smrarea        _RL no_smrarea
52    
53        character*23 cfname        character*23 cfname
   
       integer il1, il2  
       character*(MAX_LEN_MBUF) yname1  
       character*(MAX_LEN_MBUF) yname2  
   
54  #ifdef ECCO_VERBOSE  #ifdef ECCO_VERBOSE
55        character*(MAX_LEN_MBUF) msgbuf        character*(MAX_LEN_MBUF) msgbuf
56  #endif  #endif
57    
 c     == external ==  
   
       integer  ilnblnk  
       external ilnblnk  
   
58  c     == end of interface ==  c     == end of interface ==
59    
60        jtlo = mybylo(mythid)        jtlo = mybylo(mythid)
# Line 116  c--   Do global summation for each part Line 110  c--   Do global summation for each part
110       &     ' --> f_smrarea =',f_smrarea       &     ' --> f_smrarea =',f_smrarea
111    
112  c--   Each process has calculated the global part for itself.  c--   Each process has calculated the global part for itself.
113        _BEGIN_MASTER( mythid )        IF ( MASTER_CPU_THREAD(myThid) ) THEN
114    
115          write(cfname,'(A,i4.4)') 'costfunction_seaice',optimcycle          write(cfname,'(A,i4.4)') 'costfunction_seaice',optimcycle
116          open(unit=ifc,file=cfname)          open(unit=ifc,file=cfname)
# Line 124  c--   Each process has calculated the gl Line 118  c--   Each process has calculated the gl
118          write(ifc,*) 'fc =', fc          write(ifc,*) 'fc =', fc
119          write(ifc,*) 'f_ice   =', f_ice, no_ice          write(ifc,*) 'f_ice   =', f_ice, no_ice
120          write(ifc,*) 'f_smrarea   =', f_smrarea, no_smrarea          write(ifc,*) 'f_smrarea   =', f_smrarea, no_smrarea
 #ifdef TEST_FOR_DIMITRIS  
         il1 = ilnblnk('costfunction_seaice')  
         write(yname1,'(A)') 'costfunction_seaice'  
 c  
         il2 = ilnblnk('fc')  
         write(yname2,'(A)') 'fc'  
         call autodiff_cost_summary  
      &       ( yname1(1:il1), yname2(1:il2),  
      &         fc, 1., mythid )  
 c  
         il2 = ilnblnk('f_smrarea')  
         write(yname2,'(A)') 'f_smrarea'  
         call autodiff_cost_summary  
      &       ( yname1(1:il1), yname2(1:il2),  
      &         f_smrarea, no_smrarea, mythid )  
 #endif  
121    
122          close(ifc)          close(ifc)
123    
124        _END_MASTER( mythid )        ENDIF
125    
126        SEAICE_dumpFreq = 0.        SEAICE_dumpFreq = 0.
127        SEAICE_taveFreq = 0.        SEAICE_taveFreq = 0.
128    
129  #endif  #endif /* ALLOW_COST */
130    
131        end        end

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22