/[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.8.2.3 by adcroft, Tue Jan 23 15:53:06 2001 UTC revision 1.8.2.4 by adcroft, Thu Jan 25 19:43:32 2001 UTC
# Line 5  C $Header$ Line 5  C $Header$
5        SUBROUTINE CALC_PHI_HYD(        SUBROUTINE CALC_PHI_HYD(
6       I                         bi, bj, iMin, iMax, jMin, jMax, K,       I                         bi, bj, iMin, iMax, jMin, jMax, K,
7       I                         theta, salt,       I                         theta, salt,
8       U                         phiHyd, phiHydInterface,       U                         phiHyd,
9       I                         myThid)       I                         myThid)
10  C     /==========================================================\  C     /==========================================================\
11  C     | SUBROUTINE CALC_PHI_HYD                                  |  C     | SUBROUTINE CALC_PHI_HYD                                  |
# Line 18  C     |   phiHyd(i,j,1:k-1) is the hydro Line 18  C     |   phiHyd(i,j,1:k-1) is the hydro
18  C     |                 at cell centers (tracer points)          |  C     |                 at cell centers (tracer points)          |
19  C     |                 - 1:k-1 layers are valid                 |  C     |                 - 1:k-1 layers are valid                 |
20  C     |                 - k:Nr layers are invalid                |  C     |                 - k:Nr layers are invalid                |
21  C     |   phiHydInterface(i,j) is the hydrostatic pressure/geop. |  C     |   phiHyd(i,j,k) is the hydrostatic pressure/geop.        |
22  C     |                 at cell the interface k (w point above)  |  C     |                 at cell the interface k (w point above)  |
23  C     | On exit:                                                 |  C     | On exit:                                                 |
24  C     |   phiHyd(i,j,1:k) is the hydrostatic pressure/geopot.    |  C     |   phiHyd(i,j,1:k) is the hydrostatic pressure/geopot.    |
25  C     |                 at cell centers (tracer points)          |  C     |                 at cell centers (tracer points)          |
26  C     |                 - 1:k layers are valid                   |  C     |                 - 1:k layers are valid                   |
27  C     |                 - k+1:Nr layers are invalid              |  C     |                 - k+1:Nr layers are invalid              |
28  C     |   phiHydInterface(i,j) is the hydrostatic pressure/geop. |  C     |   phiHyd(i,j,k+1) is the hydrostatic pressure/geop.      |
29  C     |                 at cell the interface k+1 (w point below)|  C     |                 at cell the interface k+1 (w point below)|
30  C     |                                                          |  C     |                                                          |
31  C     \==========================================================/  C     \==========================================================/
# Line 40  C     == Routine arguments == Line 40  C     == Routine arguments ==
40        _RL theta(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)        _RL theta(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
41        _RL salt(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)        _RL salt(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
42        _RL phiHyd(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)        _RL phiHyd(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
       _RL phiHydInterface(1-OLx:sNx+OLx,1-OLy:sNy+OLy)  
43        INTEGER myThid        INTEGER myThid
44    
45  #ifdef INCLUDE_PHIHYD_CALCULATION_CODE  #ifdef INCLUDE_PHIHYD_CALCULATION_CODE
# Line 71  C       P(z=eta) = P(atmospheric_loading Line 70  C       P(z=eta) = P(atmospheric_loading
70            DO j=jMin,jMax            DO j=jMin,jMax
71              DO i=iMin,iMax              DO i=iMin,iMax
72  C             *NOTE* The loading should go here but has not been implemented yet  C             *NOTE* The loading should go here but has not been implemented yet
               phiHydInterface(i,j)=0.  
73                phiHyd(i,j,k)=0.                phiHyd(i,j,k)=0.
74              ENDDO              ENDDO
75            ENDDO            ENDDO
# Line 94  C---------- This discretization is the " Line 92  C---------- This discretization is the "
92  C           which has not been used to date since it does not  C           which has not been used to date since it does not
93  C           conserve KE+PE exactly even though it is more natural  C           conserve KE+PE exactly even though it is more natural
94  C  C
95  c           phiHyd(i,j,k)=phiHydInterface(i,j)+  c           IF (k.LT.Nr) phiHyd(i,j,k+1)=phiHyd(i,j,k)+
 c    &          0.5*drF(K)*gravity*alphaRho(i,j)  
 c           phiHydInterface(i,j)=phiHydInterface(i,j)+  
96  c    &              drF(K)*gravity*alphaRho(i,j)  c    &              drF(K)*gravity*alphaRho(i,j)
97    c           phiHyd(i,j,k)=phiHyd(i,j,k)+
98    c    &          0.5*drF(K)*gravity*alphaRho(i,j)
99  C-----------------------------------------------------------------------  C-----------------------------------------------------------------------
100    
101  C---------- This discretization is the "energy conserving" form  C---------- This discretization is the "energy conserving" form
# Line 105  C           which has been used since at Line 103  C           which has been used since at
103  C  C
104              phiHyd(i,j,k)=phiHyd(i,j,k)+              phiHyd(i,j,k)=phiHyd(i,j,k)+
105       &          0.5*dRloc*gravity*alphaRho(i,j)       &          0.5*dRloc*gravity*alphaRho(i,j)
106              phiHyd(i,j,k+1)=phiHyd(i,j,k)+              IF (k.LT.Nr) phiHyd(i,j,k+1)=phiHyd(i,j,k)+
107       &          0.5*dRlocKp1*gravity*alphaRho(i,j)       &          0.5*dRlocKp1*gravity*alphaRho(i,j)
108  C-----------------------------------------------------------------------  C-----------------------------------------------------------------------
109            ENDDO            ENDDO

Legend:
Removed from v.1.8.2.3  
changed lines
  Added in v.1.8.2.4

  ViewVC Help
Powered by ViewVC 1.1.22