3 |
|
|
4 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
5 |
|
|
6 |
|
CBOP |
7 |
|
C !ROUTINE: CALC_PHI_HYD |
8 |
|
C !INTERFACE: |
9 |
SUBROUTINE CALC_PHI_HYD( |
SUBROUTINE CALC_PHI_HYD( |
10 |
I bi, bj, iMin, iMax, jMin, jMax, K, |
I bi, bj, iMin, iMax, jMin, jMax, K, |
11 |
I theta, salt, |
I theta, salt, |
12 |
U phiHyd, |
U phiHyd, |
13 |
I myThid) |
I myThid) |
14 |
C /==========================================================\ |
C !DESCRIPTION: \bv |
15 |
|
C *==========================================================* |
16 |
C | SUBROUTINE CALC_PHI_HYD | |
C | SUBROUTINE CALC_PHI_HYD | |
17 |
C | o Integrate the hydrostatic relation to find the Hydros. | |
C | o Integrate the hydrostatic relation to find the Hydros. | |
18 |
|
C *==========================================================* |
19 |
C | Potential (ocean: Pressure/rho ; atmos = geopotential)| |
C | Potential (ocean: Pressure/rho ; atmos = geopotential)| |
20 |
C | On entry: | |
C | On entry: | |
21 |
C | theta,salt are the current thermodynamics quantities| |
C | theta,salt are the current thermodynamics quantities| |
36 |
C | Atmosphere: | |
C | Atmosphere: | |
37 |
C | Integr_GeoPot allows to select one integration method | |
C | Integr_GeoPot allows to select one integration method | |
38 |
C | (see the list below) | |
C | (see the list below) | |
39 |
C \==========================================================/ |
C *==========================================================* |
40 |
|
C \ev |
41 |
|
C !USES: |
42 |
IMPLICIT NONE |
IMPLICIT NONE |
43 |
C == Global variables == |
C == Global variables == |
44 |
#include "SIZE.h" |
#include "SIZE.h" |
50 |
#include "tamc_keys.h" |
#include "tamc_keys.h" |
51 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
52 |
|
|
53 |
|
C !INPUT/OUTPUT PARAMETERS: |
54 |
C == Routine arguments == |
C == Routine arguments == |
55 |
INTEGER bi,bj,iMin,iMax,jMin,jMax,K |
INTEGER bi,bj,iMin,iMax,jMin,jMax,K |
56 |
_RL theta(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
_RL theta(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
60 |
|
|
61 |
#ifdef INCLUDE_PHIHYD_CALCULATION_CODE |
#ifdef INCLUDE_PHIHYD_CALCULATION_CODE |
62 |
|
|
63 |
|
C !LOCAL VARIABLES: |
64 |
C == Local variables == |
C == Local variables == |
65 |
INTEGER i,j, Kp1 |
INTEGER i,j, Kp1 |
66 |
_RL zero, one, half |
_RL zero, one, half |
67 |
_RL alphaRho(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL alphaRho(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
68 |
_RL dRloc,dRlocKp1 |
_RL dRloc,dRlocKp1 |
69 |
_RL ddPI, ddPIm, ddPIp, ratioRp, ratioRm |
_RL ddPI, ddPIm, ddPIp, ratioRp, ratioRm |
70 |
|
CEOP |
71 |
|
|
72 |
zero = 0. _d 0 |
zero = 0. _d 0 |
73 |
one = 1. _d 0 |
one = 1. _d 0 |