/[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.10 by cnh, Sun Feb 4 14:38:46 2001 UTC revision 1.11 by jmc, Thu Mar 8 20:21:34 2001 UTC
# Line 10  C $Name$ Line 10  C $Name$
10       I                         myThid)       I                         myThid)
11  C     /==========================================================\  C     /==========================================================\
12  C     | SUBROUTINE CALC_PHI_HYD                                  |  C     | SUBROUTINE CALC_PHI_HYD                                  |
13  C     | o Integrate the hydrostatic relation to find phiHyd.     |  C     | o Integrate the hydrostatic relation to find the Hydros. |
14  C     |                                                          |  C     |    Potential (ocean: Pressure/rho ; atmos = geopotential)|
15  C     | On entry:                                                |  C     | On entry:                                                |
16  C     |   theta,salt    are the current thermodynamics quantities|  C     |   theta,salt    are the current thermodynamics quantities|
17  C     |                 (unchanged on exit)                      |  C     |                 (unchanged on exit)                      |
18  C     |   phiHyd(i,j,1:k-1) is the hydrostatic pressure/geopot.  |  C     |   phiHyd(i,j,1:k-1) is the hydrostatic Potential         |
19  C     |                 at cell centers (tracer points)          |  C     |                 at cell centers (tracer points)          |
20  C     |                 - 1:k-1 layers are valid                 |  C     |                 - 1:k-1 layers are valid                 |
21  C     |                 - k:Nr layers are invalid                |  C     |                 - k:Nr layers are invalid                |
22  C     |   phiHyd(i,j,k) is the hydrostatic pressure/geop.        |  C     |   phiHyd(i,j,k) is the hydrostatic Potential             |
23  C     |                 at cell the interface k (w point above)  |  C     |                 at cell the interface k (w point above)  |
24  C     | On exit:                                                 |  C     | On exit:                                                 |
25  C     |   phiHyd(i,j,1:k) is the hydrostatic pressure/geopot.    |  C     |   phiHyd(i,j,1:k) is the hydrostatic Potential           |
26  C     |                 at cell centers (tracer points)          |  C     |                 at cell centers (tracer points)          |
27  C     |                 - 1:k layers are valid                   |  C     |                 - 1:k layers are valid                   |
28  C     |                 - k+1:Nr layers are invalid              |  C     |                 - k+1:Nr layers are invalid              |
29  C     |   phiHyd(i,j,k+1) is the hydrostatic pressure/geop.      |  C     |   phiHyd(i,j,k+1) is the hydrostatic Potential (P/rho)   |
30  C     |                 at cell the interface k+1 (w point below)|  C     |                 at cell the interface k+1 (w point below)|
31  C     |                                                          |  C     |                                                          |
32  C     \==========================================================/  C     \==========================================================/
# Line 94  C           which has not been used to d Line 94  C           which has not been used to d
94  C           conserve KE+PE exactly even though it is more natural  C           conserve KE+PE exactly even though it is more natural
95  C  C
96  c           IF (k.LT.Nr) phiHyd(i,j,k+1)=phiHyd(i,j,k)+  c           IF (k.LT.Nr) phiHyd(i,j,k+1)=phiHyd(i,j,k)+
97  c    &              drF(K)*gravity*alphaRho(i,j)  c    &              drF(K)*gravity*alphaRho(i,j)*recip_rhoConst
98  c           phiHyd(i,j,k)=phiHyd(i,j,k)+  c           phiHyd(i,j,k)=phiHyd(i,j,k)+
99  c    &          0.5*drF(K)*gravity*alphaRho(i,j)  c    &          0.5*drF(K)*gravity*alphaRho(i,j)*recip_rhoConst
100  C-----------------------------------------------------------------------  C-----------------------------------------------------------------------
101    
102  C---------- This discretization is the "energy conserving" form  C---------- This discretization is the "energy conserving" form
103  C           which has been used since at least Adcroft et al., MWR 1997  C           which has been used since at least Adcroft et al., MWR 1997
104  C  C
105              phiHyd(i,j,k)=phiHyd(i,j,k)+              phiHyd(i,j,k)=phiHyd(i,j,k)+
106       &          0.5*dRloc*gravity*alphaRho(i,j)       &          0.5*dRloc*gravity*alphaRho(i,j)*recip_rhoConst
107              IF (k.LT.Nr) phiHyd(i,j,k+1)=phiHyd(i,j,k)+              IF (k.LT.Nr) phiHyd(i,j,k+1)=phiHyd(i,j,k)+
108       &          0.5*dRlocKp1*gravity*alphaRho(i,j)       &          0.5*dRlocKp1*gravity*alphaRho(i,j)*recip_rhoConst
109  C-----------------------------------------------------------------------  C-----------------------------------------------------------------------
110            ENDDO            ENDDO
111          ENDDO          ENDDO
112                    
113    
114    
   
115        ELSEIF ( buoyancyRelation .eq. 'ATMOSPHERIC' ) THEN        ELSEIF ( buoyancyRelation .eq. 'ATMOSPHERIC' ) THEN
116  C       This is the hydrostatic geopotential calculation for the Atmosphere  C       This is the hydrostatic geopotential calculation for the Atmosphere
117  C       The ideal gas law is used implicitly here rather than calculating  C       The ideal gas law is used implicitly here rather than calculating
# Line 185  Cold &      (theta(I,J,K-1,bi,bj)+theta( Line 184  Cold &      (theta(I,J,K-1,bi,bj)+theta(
184    
185  #endif  #endif
186    
187        return        RETURN
188        end        END

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22