/[MITgcm]/MITgcm/model/src/calc_phi_hyd.F
ViewVC logotype

Diff of /MITgcm/model/src/calc_phi_hyd.F

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

revision 1.36 by jmc, Mon Aug 11 22:25:52 2008 UTC revision 1.37 by jmc, Mon Sep 8 21:45:13 2008 UTC
# Line 154  CADJ STORE sFld (:,:,k,bi,bj) = comlev1_ Line 154  CADJ STORE sFld (:,:,k,bi,bj) = comlev1_
154  #ifdef ALLOW_SHELFICE  #ifdef ALLOW_SHELFICE
155  C     mask rho, so that there is no contribution of phiHyd from  C     mask rho, so that there is no contribution of phiHyd from
156  C     overlying shelfice (whose density we do not know)  C     overlying shelfice (whose density we do not know)
157          IF ( useShelfIce ) THEN          IF ( useShelfIce .AND. useDOWN_SLOPE ) THEN
158    C- note: does not work for down_slope pkg which needs rho below the bottom.
159    C    setting rho=0 above the ice-shelf base is enough (and works in both cases)
160    C    but might be slower (--> keep original masking if not using down_slope pkg)
161             DO j=jMin,jMax
162              DO i=iMin,iMax
163               IF ( k.LT.kSurfC(i,j,bi,bj) ) alphaRho(i,j) = 0. _d 0
164              ENDDO
165             ENDDO
166            ELSEIF ( useShelfIce ) THEN
167           DO j=jMin,jMax           DO j=jMin,jMax
168            DO i=iMin,iMax            DO i=iMin,iMax
169             alphaRho(i,j) = alphaRho(i,j)*maskC(i,j,k,bi,bj)             alphaRho(i,j) = alphaRho(i,j)*maskC(i,j,k,bi,bj)
# Line 282  C---------- This discretization is the " Line 291  C---------- This discretization is the "
291  C           which has not been used to date since it does not  C           which has not been used to date since it does not
292  C           conserve KE+PE exactly even though it is more natural  C           conserve KE+PE exactly even though it is more natural
293  C  C
294             IF (k.EQ.ksurfC(i,j,bi,bj)) THEN             IF (k.EQ.kSurfC(i,j,bi,bj)) THEN
295               ddRloc = Ro_surf(i,j,bi,bj)-rC(k)               ddRloc = Ro_surf(i,j,bi,bj)-rC(k)
296  #ifdef NONLIN_FRSURF  #ifdef NONLIN_FRSURF
297               ddRloc = ddRloc + surfPhiFac*etaH(i,j,bi,bj)               ddRloc = ddRloc + surfPhiFac*etaH(i,j,bi,bj)
# Line 321  C  --  Finite Difference Form, with Part Line 330  C  --  Finite Difference Form, with Part
330    
331  C---------- This discretization is the "energy conserving" form  C---------- This discretization is the "energy conserving" form
332    
333             IF (k.EQ.ksurfC(i,j,bi,bj)) THEN             IF (k.EQ.kSurfC(i,j,bi,bj)) THEN
334               ddRloc = Ro_surf(i,j,bi,bj)-rC(k)               ddRloc = Ro_surf(i,j,bi,bj)-rC(k)
335  #ifdef NONLIN_FRSURF  #ifdef NONLIN_FRSURF
336               ddRloc = ddRloc + surfPhiFac*etaH(i,j,bi,bj)               ddRloc = ddRloc + surfPhiFac*etaH(i,j,bi,bj)
# Line 404  C--------- Line 413  C---------
413       &                   -((rF(k+1)/atm_Po)**atm_kappa) )       &                   -((rF(k+1)/atm_Po)**atm_kappa) )
414           DO j=jMin,jMax           DO j=jMin,jMax
415            DO i=iMin,iMax            DO i=iMin,iMax
416             IF (k.EQ.ksurfC(i,j,bi,bj)) THEN             IF (k.EQ.kSurfC(i,j,bi,bj)) THEN
417               ddRloc = Ro_surf(i,j,bi,bj)-rC(k)               ddRloc = Ro_surf(i,j,bi,bj)-rC(k)
418  #ifdef NONLIN_FRSURF  #ifdef NONLIN_FRSURF
419               ddRloc = ddRloc + surfPhiFac*etaH(i,j,bi,bj)               ddRloc = ddRloc + surfPhiFac*etaH(i,j,bi,bj)
# Line 448  C--------- Line 457  C---------
457           rec_dRp = one/(rC(k)-rF(k+1))           rec_dRp = one/(rC(k)-rF(k+1))
458           DO j=jMin,jMax           DO j=jMin,jMax
459            DO i=iMin,iMax            DO i=iMin,iMax
460             IF (k.EQ.ksurfC(i,j,bi,bj)) THEN             IF (k.EQ.kSurfC(i,j,bi,bj)) THEN
461               ddRloc = Ro_surf(i,j,bi,bj)-rC(k)               ddRloc = Ro_surf(i,j,bi,bj)-rC(k)
462  #ifdef NONLIN_FRSURF  #ifdef NONLIN_FRSURF
463               ddRloc = ddRloc + surfPhiFac*etaH(i,j,bi,bj)               ddRloc = ddRloc + surfPhiFac*etaH(i,j,bi,bj)

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.22