/[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.4 - (show annotations) (download)
Sat Aug 16 02:44:20 2008 UTC (15 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65t, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63g, checkpoint64, checkpoint65, checkpoint62, checkpoint63, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint65o, checkpoint62b, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint61f, checkpoint61n, checkpoint61q, checkpoint61e, checkpoint61g, checkpoint61d, checkpoint61c, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.3: +13 -13 lines
comment out maskC multiplication (not really needed as far as I know,
 but harmful for new pkg down_slope implementation)

1 C $Header: /u/gcmpack/MITgcm/model/src/pressure_for_eos.F,v 1.3 2008/08/12 22:26:39 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
30 C !INPUT/OUTPUT PARAMETERS:
31 C == Routine arguments ==
32 C bi,bj, k :: tile and level indices
33 C iMin,iMax,jMin,jMax :: computational domain
34 C myThid - Thread number for this instance of the routine.
35 INTEGER bi, bj, k
36 INTEGER iMin,iMax,jMin,jMax
37 _RL locPres(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
38 INTEGER myThid
39
40 C !LOCAL VARIABLES:
41 C == Local variables ==
42 C i,j :: loop index
43 INTEGER i,j
44 CEOP
45
46 C
47 C provide the pressure for use in the equation of state
48 C
49 IF ( usingZCoords ) THEN
50 C in Z coordinates the pressure is rho0 * (hydrostatic) Potential
51 IF ( useDynP_inEos_Zc ) THEN
52 C----------
53 C NOTE: For now, totPhiHyd only contains the Potential anomaly
54 C since PhiRef is not available for Atmos and has not (yet)
55 C been added in S/R DIAGS_PHI_HYD
56 C----------
57 DO j=1-Oly,sNy+Oly
58 DO i=1-Olx,sNx+Olx
59 locPres(i,j) = rhoConst*(
60 & totPhiHyd(i,j,k,bi,bj)
61 & -rC(k)*gravity )
62 c & *maskC(i,j,k,bi,bj)
63 ENDDO
64 ENDDO
65 ELSE
66 DO j=1-Oly,sNy+Oly
67 DO i=1-Olx,sNx+Olx
68 locPres(i,j) = -rhoConst*rC(k)*gravity
69 c & *maskC(i,j,k,bi,bj)
70 ENDDO
71 ENDDO
72 ENDIF
73 ELSEIF ( usingPCoords ) THEN
74 C in P coordinates the pressure is just the coordinate of
75 C the tracer point
76 DO j=1-Oly,sNy+Oly
77 DO i=1-Olx,sNx+Olx
78 locPres(i,j) = rC(k)
79 c & * maskC(i,j,k,bi,bj)
80 ENDDO
81 ENDDO
82 ENDIF
83
84 RETURN
85 END

  ViewVC Help
Powered by ViewVC 1.1.22