1 |
C $Header$ |
C $Header$ |
2 |
|
|
3 |
#include "CPP_EEOPTIONS.h" |
#include "CPP_OPTIONS.h" |
4 |
|
|
5 |
SUBROUTINE CALC_PHI_HYD( bi, bj, iMin, iMax, jMin, jMax, K, |
SUBROUTINE CALC_PHI_HYD( bi, bj, iMin, iMax, jMin, jMax, K, |
6 |
I buoyKM1, buoyKP1, phiHyd, myThid) |
I buoyKM1, buoyKP1, phiHyd, myThid) |
27 |
_RL halfLayer |
_RL halfLayer |
28 |
_RL gamma |
_RL gamma |
29 |
|
|
30 |
|
#ifdef INCLUDE_PHIHYD_CALCULATION_CODE |
31 |
|
|
32 |
if (K.eq.1) then |
if (K.eq.1) then |
33 |
Km1=1 |
Km1=1 |
34 |
halfLayer=0.5 _d 0 |
halfLayer=0.5 _d 0 |
37 |
halfLayer=1.0 _d 0 |
halfLayer=1.0 _d 0 |
38 |
endif |
endif |
39 |
|
|
40 |
C-- Scale factor for hydrostatic relation except for ocean in pressure coords. |
C-- Scale factor for hydrostatic relation except for ocean in |
41 |
|
C-- pressure coords. |
42 |
gamma = 1. _d 0 |
gamma = 1. _d 0 |
43 |
C-- Scale factor for hydrostatic relation for ocean in pressure coords. |
C-- Scale factor for hydrostatic relation for ocean in pressure |
44 |
|
C-- coords. |
45 |
IF ( buoyancyRelation .EQ. 'OCEANIC' .AND. usingPCoords ) THEN |
IF ( buoyancyRelation .EQ. 'OCEANIC' .AND. usingPCoords ) THEN |
46 |
gamma = recip_Gravity*recip_rhoConst |
gamma = recip_Gravity*recip_rhoConst |
47 |
ENDIF |
ENDIF |
48 |
|
|
49 |
C-- Contribution to phiHyd(:,:,K) from buoy(:,:,K-1) + buoy(:,:,K) |
C-- Contribution to phiHyd(:,:,K) from buoy(:,:,K-1) + buoy(:,:,K) |
50 |
C (This is now the actual hydrostatic pressure|height at the T/S points) |
C (This is now the actual hydrostatic pressure|height at the T/S |
51 |
|
C points) |
52 |
DO j=jMin,jMax |
DO j=jMin,jMax |
53 |
DO i=iMin,iMax |
DO i=iMin,iMax |
54 |
phiHyd(i,j,K)=phiHyd(i,j,Km1)-rhoConst*halfLayer |
phiHyd(i,j,K)=phiHyd(i,j,Km1)-rhoConst*halfLayer |
57 |
ENDDO |
ENDDO |
58 |
ENDDO |
ENDDO |
59 |
|
|
60 |
! ------------------------------------------------------------------------------ |
#endif |
61 |
|
|
62 |
|
! -------------------------------------------------------------------- |
63 |
return |
return |
64 |
end |
end |
65 |
! ============================================================================== |
! ==================================================================== |