25 |
C == Local variables == |
C == Local variables == |
26 |
INTEGER i,j,Km1 |
INTEGER i,j,Km1 |
27 |
_RL halfLayer |
_RL halfLayer |
28 |
|
_RL gamma |
29 |
|
|
30 |
if (K.eq.1) then |
if (K.eq.1) then |
31 |
Km1=1 |
Km1=1 |
35 |
halfLayer=1.0 _d 0 |
halfLayer=1.0 _d 0 |
36 |
endif |
endif |
37 |
|
|
38 |
|
C-- Scale factor for hydrostatic relation except for ocean in pressure coords. |
39 |
|
gamma = 1. _d 0 |
40 |
|
C-- Scale factor for hydrostatic relation for ocean in pressure coords. |
41 |
|
IF ( buoyancyRelation .EQ. 'OCEANIC' .AND. usingPCoords ) THEN |
42 |
|
gamma = recip_Gravity*recip_rhoConst |
43 |
|
ENDIF |
44 |
|
|
45 |
C-- Contribution to phiHyd(:,:,K) from buoy(:,:,K-1) + buoy(:,:,K) |
C-- Contribution to phiHyd(:,:,K) from buoy(:,:,K-1) + buoy(:,:,K) |
46 |
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 points) |
47 |
DO j=jMin,jMax |
DO j=jMin,jMax |
48 |
DO i=iMin,iMax |
DO i=iMin,iMax |
49 |
phiHyd(i,j,K)=phiHyd(i,j,Km1)-rhoConst*halfLayer |
phiHyd(i,j,K)=phiHyd(i,j,Km1)-rhoConst*halfLayer |
50 |
& *0.5 _d 0*( drF(Km1)+drF(K) )*recip_HoriVertRatio |
& *0.5 _d 0*( drF(Km1)+drF(K) )*gamma |
51 |
& *0.5 _d 0*( buoyKM1(i,j)+buoyKP1(i,j) ) |
& *0.5 _d 0*( buoyKM1(i,j)+buoyKP1(i,j) ) |
|
C & *rkFac |
|
52 |
ENDDO |
ENDDO |
53 |
ENDDO |
ENDDO |
54 |
|
|