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

Contents of /MITgcm/model/src/calc_ph.F

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


Revision 1.6 - (show annotations) (download)
Tue Jun 9 16:48:02 1998 UTC (25 years, 10 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint7, checkpoint8, checkpoint11, checkpoint10, checkpoint13, checkpoint12, checkpoint9, branch-point-rdot
Branch point for: checkpoint7-4degree-ref, branch-rdot
Changes since 1.5: +2 -1 lines
Changes to support topography, hydrography and
forcing from files

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/calc_ph.F,v 1.5 1998/05/27 21:01:47 cnh Exp $
2
3 #include "CPP_EEOPTIONS.h"
4
5 SUBROUTINE CALC_PH( bi, bj, iMin, iMax, jMin, jMax, K,
6 I rhokm1, rhokp1, pH, myThid)
7 C /==========================================================\
8 C | SUBROUTINE CALC_PH |
9 C | o Find the hydrostatic component of pressure |
10 C |==========================================================|
11 C | |
12 C \==========================================================/
13 IMPLICIT NONE
14 C == Global variables ==
15 #include "SIZE.h"
16 #include "DYNVARS.h"
17 #include "GRID.h"
18 #include "EEPARAMS.h"
19 #include "PARAMS.h"
20 C == Routine arguments ==
21 INTEGER bi,bj,iMin,iMax,jMin,jMax,K
22 _RL rhokm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
23 _RL rhokp1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
24 _RL pH(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nz)
25 integer myThid
26 C == Local variables ==
27 INTEGER i,j,Km1
28 _RL halfLayer
29
30 if (K.eq.1) then
31 Km1=1
32 halfLayer=0.5 _d 0
33 else
34 Km1=K-1
35 halfLayer=1.0 _d 0
36 endif
37
38 C-- Contribution to PH(:,:,K-1) from RHO(:,:,K-1)
39 C (This is now the actual hydrostatic pressure at the T/S points)
40 DO j=jMin,jMax
41 DO i=iMin,iMax
42 pH(i,j,K)=pH(i,j,Km1)+Gravity*halfLayer
43 & *0.5 _d 0*(dzF(Km1)*_hFacC(i,j,Km1,bi,bj)+dzF(K)*_hFacC(i,j,K,bi,bj))
44 & *0.5 _d 0*( rhokm1(i,j)+rhokp1(i,j) )
45 ENDDO
46 ENDDO
47
48 ! ------------------------------------------------------------------------------
49 return
50 end
51 ! ==============================================================================

  ViewVC Help
Powered by ViewVC 1.1.22