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

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

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

revision 1.3 by jmc, Tue Aug 12 22:26:39 2008 UTC revision 1.4 by jmc, Sat Aug 16 02:44:20 2008 UTC
# Line 5  C $Name$ Line 5  C $Name$
5  CBOP  CBOP
6  C     !ROUTINE: PRESSURE_FOR_EOS  C     !ROUTINE: PRESSURE_FOR_EOS
7  C     !INTERFACE:  C     !INTERFACE:
8        SUBROUTINE PRESSURE_FOR_EOS(        SUBROUTINE PRESSURE_FOR_EOS(
9       I        bi, bj, iMin, iMax, jMin, jMax,  k,       I        bi, bj, iMin, iMax, jMin, jMax,  k,
10       O        locPres,       O        locPres,
11       I        myThid )       I        myThid )
12  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
13  C     *==========================================================*  C     *==========================================================*
14  C     | SUBROUTINE PRESSURE_FOR_EOS                                        C     | SUBROUTINE PRESSURE_FOR_EOS
15  C     | o Provide a local copy of the total pressure  C     | o Provide a local copy of the total pressure
16  C     |   at cell center (level k) for use in EOS funct. of P  C     |   at cell center (level k) for use in EOS funct. of P
17  C     *==========================================================*  C     *==========================================================*
18  C     \ev  C     \ev
# Line 48  C     provide the pressure for use in th Line 48  C     provide the pressure for use in th
48  C  C
49        IF ( usingZCoords ) THEN        IF ( usingZCoords ) THEN
50  C     in Z coordinates the pressure is rho0 * (hydrostatic) Potential  C     in Z coordinates the pressure is rho0 * (hydrostatic) Potential
51          IF ( useDynP_inEos_Zc ) THEN            IF ( useDynP_inEos_Zc ) THEN
52  C----------  C----------
53  C     NOTE: For now, totPhiHyd only contains the Potential anomaly  C     NOTE: For now, totPhiHyd only contains the Potential anomaly
54  C           since PhiRef is not available for Atmos and has not (yet)  C           since PhiRef is not available for Atmos and has not (yet)
55  C           been added in S/R DIAGS_PHI_HYD  C           been added in S/R DIAGS_PHI_HYD
56  C----------  C----------
57           DO j=1-Oly,sNy+Oly           DO j=1-Oly,sNy+Oly
58            DO i=1-Olx,sNx+Olx            DO i=1-Olx,sNx+Olx
59              locPres(i,j) = rhoConst*(              locPres(i,j) = rhoConst*(
60       &                   totPhiHyd(i,j,k,bi,bj)       &                   totPhiHyd(i,j,k,bi,bj)
61       &                  -rC(k)*gravity       &                  -rC(k)*gravity )
62       &                            )*maskC(i,j,k,bi,bj)  c    &                             *maskC(i,j,k,bi,bj)
63            ENDDO            ENDDO
64           ENDDO           ENDDO
65         ELSE         ELSE
66           DO j=1-Oly,sNy+Oly           DO j=1-Oly,sNy+Oly
67            DO i=1-Olx,sNx+Olx            DO i=1-Olx,sNx+Olx
68              locPres(i,j) = -rhoConst*rC(k)*gravity              locPres(i,j) = -rhoConst*rC(k)*gravity
69       &                              *maskC(i,j,k,bi,bj)  c    &                              *maskC(i,j,k,bi,bj)
70            ENDDO            ENDDO
71           ENDDO           ENDDO
72         ENDIF         ENDIF
# Line 76  C     the tracer point Line 76  C     the tracer point
76           DO j=1-Oly,sNy+Oly           DO j=1-Oly,sNy+Oly
77            DO i=1-Olx,sNx+Olx            DO i=1-Olx,sNx+Olx
78              locPres(i,j) = rC(k)              locPres(i,j) = rC(k)
79       &                   * maskC(i,j,k,bi,bj)  c    &                   * maskC(i,j,k,bi,bj)
80            ENDDO            ENDDO
81           ENDDO           ENDDO
82        ENDIF        ENDIF
83    
84        RETURN        RETURN
85        END        END

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

  ViewVC Help
Powered by ViewVC 1.1.22