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

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

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


Revision 1.1.2.1 - (show annotations) (download)
Fri Mar 7 23:10:21 2003 UTC (21 years, 3 months ago) by heimbach
Branch: ecco-branch
CVS Tags: ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, ecco_c50_e29, ecco_c50_e28, ecco_c50_e33a
Changes since 1.1: +1 -1 lines
merging c49 and e27

1 C $Header: /u/gcmpack/MITgcm/model/src/pressure_for_eos.F,v 1.1 2003/02/18 15:25:09 jmc Exp $
2 C $Name: $
3 #include "CPP_OPTIONS.h"
4
5 CBOP
6 C !ROUTINE: PRESSURE_FOR_EOS
7 C !INTERFACE:
8 SUBROUTINE PRESSURE_FOR_EOS(
9 I bi, bj, iMin, iMax, jMin, jMax, k,
10 O locPres,
11 I myThid )
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | SUBROUTINE PRESSURE_FOR_EOS
15 C | o Provide a local copy of the total pressure
16 C | at cell center (level k) for use in EOS funct. of P
17 C *==========================================================*
18 C \ev
19
20 C !USES:
21
22 IMPLICIT NONE
23 C == Global variables ==
24 #include "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "PARAMS.h"
27 #include "GRID.h"
28 #include "DYNVARS.h"
29 #include "SURFACE.h"
30
31 C !INPUT/OUTPUT PARAMETERS:
32 C == Routine arguments ==
33 C bi,bj, k :: tile and level indices
34 C iMin,iMax,jMin,jMax :: computational domain
35 C myThid - Thread number for this instance of the routine.
36 INTEGER bi, bj, k
37 INTEGER iMin,iMax,jMin,jMax
38 _RL locPres(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
39 INTEGER myThid
40
41 C !LOCAL VARIABLES:
42 C == Local variables ==
43 C i,j :: loop index
44 INTEGER i,j
45 CEOP
46
47 C
48 C provide the pressure for use in the equation of state
49 C
50 IF ( buoyancyRelation .EQ. 'OCEANIC' ) THEN
51 C in Z coordinates the pressure is rho0 * (hydrostatic) Potential
52 IF ( useDynP_inEos_Zc ) THEN
53 C----------
54 C NOTE: For now, totPhiHyd only contains the Potential anomaly
55 C since PhiRef is not available for Atmos and has not (yet)
56 C been added in S/R DIAGS_PHI_HYD
57 C----------
58 DO j=1-Oly,sNy+Oly
59 DO i=1-Olx,sNx+Olx
60 locPres(i,j) = rhoConst*(
61 & totPhiHyd(i,j,k,bi,bj)
62 & -rC(k)*gravity
63 & )*maskC(i,j,k,bi,bj)
64 ENDDO
65 ENDDO
66 ELSE
67 DO j=1-Oly,sNy+Oly
68 DO i=1-Olx,sNx+Olx
69 locPres(i,j) = -rhoConst*rC(k)*gravity
70 & *maskC(i,j,k,bi,bj)
71 ENDDO
72 ENDDO
73 ENDIF
74 ELSEIF ( buoyancyRelation .EQ. 'ATMOSPHERIC'
75 & .OR. buoyancyRelation .EQ. 'OCEANICP' ) THEN
76 C in P coordinates the pressure is just the coordinate of
77 C the tracer point
78 DO j=1-Oly,sNy+Oly
79 DO i=1-Olx,sNx+Olx
80 locPres(i,j) = rC(k)
81 & * maskC(i,j,k,bi,bj)
82 ENDDO
83 ENDDO
84 ENDIF
85
86 RETURN
87 END

  ViewVC Help
Powered by ViewVC 1.1.22