/[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.3 by heimbach, Thu Feb 16 21:48:55 2006 UTC revision 1.4 by heimbach, Fri Feb 17 23:48:14 2006 UTC
# Line 56  c     == local variables == Line 56  c     == local variables ==
56        integer ilsalt        integer ilsalt
57    
58        _RL fctilemm        _RL fctilemm
       _RL fcthreadmm  
59        _RL tmpx        _RL tmpx
60        _RL sumcos        _RL sumcos
61    
# Line 96  c--   Read tiled data. Line 95  c--   Read tiled data.
95       &    sfluxbarfile(1:ilsalt),'.',optimcycle       &    sfluxbarfile(1:ilsalt),'.',optimcycle
96        endif        endif
97    
       fcthreadmm       = 0. _d 0  
   
98        irec = 1        irec = 1
99    
100  c--     Read time averages and the monthly mean data.  c--     Read time averages and the monthly mean data.
# Line 115  c--     Read time averages and the month Line 112  c--     Read time averages and the month
112                do i = imin,imax                do i = imin,imax
113                  tmpx=tmpfld2d(i,j,bi,bj)                  tmpx=tmpfld2d(i,j,bi,bj)
114                  if (maskC(i,j,kk,bi,bj) .ne. 0.) then                  if (maskC(i,j,kk,bi,bj) .ne. 0.) then
115                     fctilemm = fctilemm+tmpx*cos(yc(i,j,bi,bj)*deg2rad)                     fctilemm = fctilemm + tmpx
116                    sumcos = sumcos + cos(yc(i,j,bi,bj)*deg2rad)       &                  *cos(yc(i,j,bi,bj)*deg2rad)
117                       sumcos = sumcos + cos(yc(i,j,bi,bj)*deg2rad)
118                       num_sfluxmm(bi,bj) = num_sfluxmm(bi,bj) + 1
119                  endif                  endif
120                enddo                enddo
121              enddo              enddo
122    
123              if(sumcos.eq.0) sumcos=1.0              _GLOBAL_SUM_R8( sumcos , myThid )
124              fctilemm = (fctilemm / sumcos)              if (sumcos.eq.0.) sumcos = 1.
             fctilemm = wsfluxmm(bi,bj) * (fctilemm )  
125    
126              objf_sfluxmm(bi,bj) = fctilemm              fctilemm = fctilemm / sumcos
127              fcthreadmm          = fcthreadmm + fctilemm              objf_sfluxmm(bi,bj) = wsfluxmm(bi,bj) * fctilemm
128    
129            enddo            enddo
130          enddo          enddo

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

  ViewVC Help
Powered by ViewVC 1.1.22