/[MITgcm]/MITgcm/pkg/ecco/cost_mean_saltflux.F
ViewVC logotype

Diff of /MITgcm/pkg/ecco/cost_mean_saltflux.F

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

revision 1.1 by heimbach, Thu Nov 6 22:10:07 2003 UTC revision 1.2 by heimbach, Mon Oct 11 16:38:53 2004 UTC
# Line 45  c     == routine arguments == Line 45  c     == routine arguments ==
45  c     == local variables ==  c     == local variables ==
46    
47        integer bi,bj        integer bi,bj
48        integer i,j,k,kk        integer i,j,kk
49        integer itlo,ithi        integer itlo,ithi
50        integer jtlo,jthi        integer jtlo,jthi
51        integer jmin,jmax        integer jmin,jmax
# Line 90  c--   Read tiled data. Line 90  c--   Read tiled data.
90    
91  #ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION  #ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION
92    
 #ifdef ECCO_VERBOSE  
       _BEGIN_MASTER( mythid )  
         write(msgbuf,'(a)') ' '  
         call print_message( msgbuf, standardmessageunit,  
      &                      SQUEEZE_RIGHT , mythid)  
         write(msgbuf,'(a,i8.8)')  
      &    ' cost_mean_saltflux: no. of records to process = ',nmonsrec  
         call print_message( msgbuf, standardmessageunit,  
      &                      SQUEEZE_RIGHT , mythid)  
         write(msgbuf,'(a)') ' '  
         call print_message( msgbuf, standardmessageunit,  
      &                      SQUEEZE_RIGHT , mythid)  
       _END_MASTER( mythid )  
 #endif  
   
93        if (optimcycle .ge. 0) then        if (optimcycle .ge. 0) then
94          ilsalt = ilnblnk( sfluxbarfile )          ilsalt = ilnblnk( sfluxbarfile )
95          write(fnamesflux(1:80),'(2a,i10.10)')          write(fnamesflux(1:80),'(2a,i10.10)')
# Line 129  c--     Read time averages and the month Line 114  c--     Read time averages and the month
114              do j = jmin,jmax              do j = jmin,jmax
115                do i = imin,imax                do i = imin,imax
116                  tmpx=tmpfld2d(i,j,bi,bj)                  tmpx=tmpfld2d(i,j,bi,bj)
117                  if (maskw(i,j,kk,bi,bj) .ne. 0.) then                  if (maskC(i,j,kk,bi,bj) .ne. 0.) then
118                    fctilemm = fctilemm + tmpx*cos(yc(i,j,bi,bj)*deg2rad)                     fctilemm = fctilemm+tmpx*cos(yc(i,j,bi,bj)*deg2rad)
119                    sumcos = sumcos + cos(yc(i,j,bi,bj)*deg2rad)                    sumcos = sumcos + cos(yc(i,j,bi,bj)*deg2rad)
120                  endif                  endif
121                enddo                enddo
122              enddo              enddo
123    
124              if(sumcos .eq. 0.) sumcos = 1.              if(sumcos.eq.0) sumcos=1.0
125              fctilemm = (fctilemm / sumcos)              fctilemm = (fctilemm / sumcos)
126              fctilemm = wsfluxmm(bi,bj)*fctilemm              fctilemm = wsfluxmm(bi,bj) * (fctilemm )
127    
128              objf_sfluxmm(bi,bj) = fctilemm              objf_sfluxmm(bi,bj) = fctilemm
129              fcthreadmm          = fcthreadmm + fctilemm              fcthreadmm          = fcthreadmm + fctilemm

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22