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

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

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

revision 1.4 by heimbach, Mon Oct 11 16:38:53 2004 UTC revision 1.5 by heimbach, Mon Mar 28 23:49:49 2005 UTC
# Line 69  c     == local variables == Line 69  c     == local variables ==
69    
70        _RL cmask (1-olx:snx+olx,1-oly:sny+oly)          _RL cmask (1-olx:snx+olx,1-oly:sny+oly)  
71        _RL spval        _RL spval
72          _RL spmax
73    
74        character*(80) fnametheta        character*(80) fnametheta
75    
# Line 96  c     == end of interface == Line 97  c     == end of interface ==
97        imax = snx        imax = snx
98    
99        spval = -1.8        spval = -1.8
100          spmax = 40.
101    
102  c--   Read tiled data.  c--   Read tiled data.
103        doglobalread = .false.        doglobalread = .false.
# Line 171  c--         Loop over the model layers Line 173  c--         Loop over the model layers
173  c--           Determine the mask on weights  c--           Determine the mask on weights
174                do j = jmin,jmax                do j = jmin,jmax
175                  do i = imin,imax                  do i = imin,imax
176                    cmask(i,j) = 1. _d 0                    cmask(i,j) = cosphi(i,j,bi,bj)
177                    if (tdat(i,j,k,bi,bj) .eq. 0.) then                    if (tdat(i,j,k,bi,bj) .eq. 0.) then
178                      cmask(i,j) = 0. _d 0                      cmask(i,j) = 0. _d 0
179                    endif                    else if (tdat(i,j,k,bi,bj) .lt. spval) then
180                                        cmask(i,j) = 0. _d 0
181                    if (tdat(i,j,k,bi,bj) .lt. spval) then                    else if (tdat(i,j,k,bi,bj) .gt. spmax) then
182                      cmask(i,j) = 0. _d 0                      cmask(i,j) = 0. _d 0
183                    endif                    endif
184                                        
# Line 187  cph               to make it independnet Line 189  cph               to make it independnet
189  cph  cph
190  cph               if ( rC(K) .GT. -1000. ) then  cph               if ( rC(K) .GT. -1000. ) then
191  cph)  cph)
 c                 set cmask=0 in areas shallower than 1000m  
                   if (_hFacC(i,j,13,bi,bj) .eq. 0.) then  
                     cmask(i,j) = 0. _d 0  
                   endif  
192                  enddo                  enddo
193                enddo                enddo
194    
# Line 198  c--           Compute model data misfit Line 196  c--           Compute model data misfit
196  c             the temperature field.  c             the temperature field.
197                do j = jmin,jmax                do j = jmin,jmax
198                  do i = imin,imax                  do i = imin,imax
199                    if (_hFacC(i,j,k,bi,bj) .ne. 0.) then                    if ( _hFacC(i,j,k,bi,bj) .ne. 0. .AND.
200         &                 _hFacC(i,j,13,bi,bj) .ne. 0. ) then
201                       fctile = fctile +                       fctile = fctile +
202       &                    (wtheta(k,bi,bj)*cosphi(i,j,bi,bj)*cmask(i,j)*       &                    (wtheta(k,bi,bj)*cmask(i,j)*
203       &                    (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj))*       &                    (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj))*
204       &                    (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj))      )       &                    (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj)) )
205                         if ( wtheta(k,bi,bj)*cmask(i,j) .ne. 0. )
206         &                    num_temp(bi,bj) = num_temp(bi,bj) + 1. _d 0
207                    endif                    endif
208                  enddo                  enddo
209                enddo                enddo

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

  ViewVC Help
Powered by ViewVC 1.1.22