/[MITgcm]/MITgcm/pkg/ctrl/ctrl_getobcse.F
ViewVC logotype

Diff of /MITgcm/pkg/ctrl/ctrl_getobcse.F

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

revision 1.8 by mlosch, Wed Jan 19 08:42:06 2011 UTC revision 1.9 by mlosch, Mon Mar 7 09:24:10 2011 UTC
# Line 68  c     == local variables == Line 68  c     == local variables ==
68        integer ip1        integer ip1
69    
70  cgg      _RL maskyz   (1-oly:sny+oly,nr,nsx,nsy)  cgg      _RL maskyz   (1-oly:sny+oly,nr,nsx,nsy)
71          _RL tmpfldyz (1-oly:sny+oly,nr,nsx,nsy)
72    
73        logical doglobalread        logical doglobalread
74        logical ladinit        logical ladinit
# Line 147  cgg         The barotropic velocity is s Line 148  cgg         The barotropic velocity is s
148                      do k = 1,Nr                      do k = 1,Nr
149  cgg    If cells are not full, this should be modified with hFac.  cgg    If cells are not full, this should be modified with hFac.
150  cgg  cgg
151  cgg    The xx field (tmpfldxz) does not contain the velocity at the  cgg    The xx field (tmpfldyz) does not contain the velocity at the
152  cgg    surface level. This velocity is not independent; it must  cgg    surface level. This velocity is not independent; it must
153  cgg    exactly balance the volume flux, since we are dealing with  cgg    exactly balance the volume flux, since we are dealing with
154  cgg    the baroclinic velocity structure..  cgg    the baroclinic velocity structure..
# Line 182  cgg         The barotropic velocity is s Line 183  cgg         The barotropic velocity is s
183                      do k = 1,Nr                      do k = 1,Nr
184  cgg    If cells are not full, this should be modified with hFac.  cgg    If cells are not full, this should be modified with hFac.
185  cgg  cgg
186  cgg    The xx field (tmpfldxz) does not contain the velocity at the  cgg    The xx field (tmpfldyz) does not contain the velocity at the
187  cgg    surface level. This velocity is not independent; it must  cgg    surface level. This velocity is not independent; it must
188  cgg    exactly balance the volume flux, since we are dealing with  cgg    exactly balance the volume flux, since we are dealing with
189  cgg    the baroclinic velocity structure..  cgg    the baroclinic velocity structure..
# Line 254  cgg         The barotropic velocity is s Line 255  cgg         The barotropic velocity is s
255                      do k = 1,Nr                      do k = 1,Nr
256  cgg    If cells are not full, this should be modified with hFac.  cgg    If cells are not full, this should be modified with hFac.
257  cgg  cgg
258  cgg    The xx field (tmpfldxz) does not contain the velocity at the  cgg    The xx field (tmpfldyz) does not contain the velocity at the
259  cgg    surface level. This velocity is not independent; it must  cgg    surface level. This velocity is not independent; it must
260  cgg    exactly balance the volume flux, since we are dealing with  cgg    exactly balance the volume flux, since we are dealing with
261  cgg    the baroclinic velocity structure..  cgg    the baroclinic velocity structure..
# Line 289  cgg         The barotropic velocity is s Line 290  cgg         The barotropic velocity is s
290                      do k = 1,Nr                      do k = 1,Nr
291  cgg    If cells are not full, this should be modified with hFac.  cgg    If cells are not full, this should be modified with hFac.
292  cgg  cgg
293  cgg    The xx field (tmpfldxz) does not contain the velocity at the  cgg    The xx field (tmpfldyz) does not contain the velocity at the
294  cgg    surface level. This velocity is not independent; it must  cgg    surface level. This velocity is not independent; it must
295  cgg    exactly balance the volume flux, since we are dealing with  cgg    exactly balance the volume flux, since we are dealing with
296  cgg    the baroclinic velocity structure..  cgg    the baroclinic velocity structure..
# Line 323  cgg     & Line 324  cgg     &
324            enddo            enddo
325          endif          endif
326    
327  c--     Add control to model variable.  c--   Add control to model variable.
328          do bj = jtlo,jthi          do bj = jtlo,jthi
329             do bi = itlo,ithi           do bi = itlo,ithi
330  c--        Calculate mask for tracer cells (0 => land, 1 => water).  c--   Calculate mask for tracer cells (0 => land, 1 => water).
331                do k = 1,nr            do k = 1,nr
332                   do j = 1,sny             do j = 1,sny
333                      i = OB_Ie(j,bi,bj)              i = OB_Ie(j,bi,bj)
334                      if (iobcs .EQ. 1) then              if (iobcs .EQ. 1) then
335                         OBEt(j,k,bi,bj) = OBEt (j,k,bi,bj)               OBEt(j,k,bi,bj) = OBEt(j,k,bi,bj)
336       &                 + obcsefac            *xx_obcse0(j,k,bi,bj,iobcs)       &            + obcsefac            *xx_obcse0(j,k,bi,bj,iobcs)
337       &                 + (1. _d 0 - obcsefac)*xx_obcse1(j,k,bi,bj,iobcs)       &            + (1. _d 0 - obcsefac)*xx_obcse1(j,k,bi,bj,iobcs)
338                         OBEt(j,k,bi,bj) = OBEt(j,k,bi,bj)               OBEt(j,k,bi,bj) = OBEt(j,k,bi,bj)
339       &                      *maskW(i+ip1,j,k,bi,bj)       &            *maskW(i+ip1,j,k,bi,bj)
340                      else if (iobcs .EQ. 2) then              else if (iobcs .EQ. 2) then
341                         OBEs(j,k,bi,bj) = OBEs (j,k,bi,bj)               OBEs(j,k,bi,bj) = OBEs(j,k,bi,bj)
342       &                 + obcsefac            *xx_obcse0(j,k,bi,bj,iobcs)       &            + obcsefac            *xx_obcse0(j,k,bi,bj,iobcs)
343       &                 + (1. _d 0 - obcsefac)*xx_obcse1(j,k,bi,bj,iobcs)       &            + (1. _d 0 - obcsefac)*xx_obcse1(j,k,bi,bj,iobcs)
344                         OBEs(j,k,bi,bj) = OBEs(j,k,bi,bj)               OBEs(j,k,bi,bj) = OBEs(j,k,bi,bj)
345       &                      *maskW(i+ip1,j,k,bi,bj)       &            *maskW(i+ip1,j,k,bi,bj)
346                      else if (iobcs .EQ. 3) then              else if (iobcs .EQ. 3) then
347                         OBEu(j,k,bi,bj) = OBEu (j,k,bi,bj)               OBEu(j,k,bi,bj) = OBEu(j,k,bi,bj)
348       &                 + obcsefac            *xx_obcse0(j,k,bi,bj,iobcs)       &            + obcsefac            *xx_obcse0(j,k,bi,bj,iobcs)
349       &                 + (1. _d 0 - obcsefac)*xx_obcse1(j,k,bi,bj,iobcs)       &            + (1. _d 0 - obcsefac)*xx_obcse1(j,k,bi,bj,iobcs)
350                         OBEu(j,k,bi,bj) = OBEu(j,k,bi,bj)               OBEu(j,k,bi,bj) = OBEu(j,k,bi,bj)
351       &                      *maskW(i+ip1,j,k,bi,bj)       &            *maskW(i+ip1,j,k,bi,bj)
352                      else if (iobcs .EQ. 4) then              else if (iobcs .EQ. 4) then
353                         OBEv(j,k,bi,bj) = OBEv (j,k,bi,bj)               OBEv(j,k,bi,bj) = OBEv(j,k,bi,bj)
354       &                 + obcsefac            *xx_obcse0(j,k,bi,bj,iobcs)       &            + obcsefac            *xx_obcse0(j,k,bi,bj,iobcs)
355       &                 + (1. _d 0 - obcsefac)*xx_obcse1(j,k,bi,bj,iobcs)       &            + (1. _d 0 - obcsefac)*xx_obcse1(j,k,bi,bj,iobcs)
356                         OBEv(j,k,bi,bj) = OBEv(j,k,bi,bj)               OBEv(j,k,bi,bj) = OBEv(j,k,bi,bj)
357       &                      *maskS(i,j,k,bi,bj)       &            *maskS(i,j,k,bi,bj)
358                      endif              endif
                  enddo  
               enddo  
359             enddo             enddo
360              enddo
361             enddo
362          enddo          enddo
363            
364  C--   End over iobcs loop  C--   End over iobcs loop
365        enddo        enddo
366    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22