The value returned is g * ( rho_o - rho ) / rho
The earlier code gave g * ( rho_o - rho ) / rho_o
This algorithm fits a polynomial
a = A0 + A1*T + A2*T^2 + A3*S
If a better equation is needed, copies of this module are available for the UNESCO equation of state as well as George Mellor's approximation that he developed for POM.
The functions are overloaded for scalar and (up to 4-dimensional) arrays of temperature and salinity.
The functions are overloaded so that pressure may be omitted, or specified as a scalar, or specified with the same dimensions as temperature and salinity.
We have tried using an elemental function (a la Fortran-95, but ran into problems with the DEC compiler). Someday, that will simplify things greatly.
| REAL :: T |
| REAL :: S |
| REAL :: P |
| REAL :: RESULT |
RESULT = BUOYANCY(T, S, [P])
INTENT(IN) :: T,S
| Legend: | INTENT(INOUT) | INTENT(IN) | INTENT(OUT) | [OPTIONAL] |
| REAL :: T |
| REAL :: S |
| REAL :: P |
| REAL :: RESULT |
RESULT = BUOYANCY(T, S, [P])
INTENT(IN) :: T,S
| Legend: | INTENT(INOUT) | INTENT(IN) | INTENT(OUT) | [OPTIONAL] |
| REAL :: T |
| REAL :: S |
| REAL :: P |
| REAL :: RESULT |
RESULT = BUOYANCY(T, S, [P])
INTENT(IN) :: T,S
| Legend: | INTENT(INOUT) | INTENT(IN) | INTENT(OUT) | [OPTIONAL] |
| REAL :: T |
| REAL :: S |
| REAL :: P |
| REAL :: RESULT |
RESULT = BUOYANCY(T, S, [P])
INTENT(IN) :: T,S
| Legend: | INTENT(INOUT) | INTENT(IN) | INTENT(OUT) | [OPTIONAL] |
| REAL :: T |
| REAL :: S |
| REAL :: P |
| REAL :: RESULT |
RESULT = BUOYANCY(T, S, [P])
INTENT(IN) :: T,S
| Legend: | INTENT(INOUT) | INTENT(IN) | INTENT(OUT) | [OPTIONAL] |
| REAL :: T |
| REAL :: S |
| REAL :: P |
| REAL :: RESULT |
RESULT = BUOYANCY(T, S, P)
INTENT(IN) :: T,S,P
| Legend: | INTENT(INOUT) | INTENT(IN) | INTENT(OUT) | [OPTIONAL] |
| REAL :: T |
| REAL :: S |
| REAL :: P |
| REAL :: RESULT |
RESULT = BUOYANCY(T, S, P)
INTENT(IN) :: T,S,P
| Legend: | INTENT(INOUT) | INTENT(IN) | INTENT(OUT) | [OPTIONAL] |
| REAL :: T |
| REAL :: S |
| REAL :: P |
| REAL :: RESULT |
RESULT = BUOYANCY(T, S, P)
INTENT(IN) :: T,S,P
| Legend: | INTENT(INOUT) | INTENT(IN) | INTENT(OUT) | [OPTIONAL] |
| REAL :: T |
| REAL :: S |
| REAL :: P |
| REAL :: RESULT |
RESULT = BUOYANCY(T, S, P)
INTENT(IN) :: T,S,P
| Legend: | INTENT(INOUT) | INTENT(IN) | INTENT(OUT) | [OPTIONAL] |