Wright (1997) in-situ density (kg/m^3) – term for term the
Wright branch of eos_density_point, without the handle.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | t |
Temperature (degC), salinity (PSU), pressure (Pa). |
||
| real(kind=wp), | intent(in) | :: | s |
Temperature (degC), salinity (PSU), pressure (Pa). |
||
| real(kind=wp), | intent(in) | :: | p |
Temperature (degC), salinity (PSU), pressure (Pa). |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | T_sq | ||||
| real(kind=wp), | private | :: | alpha_0 | ||||
| real(kind=wp), | private | :: | lambda | ||||
| real(kind=wp), | private | :: | p_0 | ||||
| real(kind=wp), | private | :: | p_plus_p0 |
pure function wright_rho(t, s, p) result(rho) !$acc routine seq !! Wright (1997) in-situ density (kg/m^3) -- term for term the !! Wright branch of `eos_density_point`, without the handle. real(wp), intent(in) :: t, s, p !! Temperature (degC), salinity (PSU), pressure (Pa). real(wp) :: rho real(wp) :: T_sq, alpha_0, p_0, lambda, p_plus_p0 T_sq = t*t alpha_0 = WRIGHT_A0 + WRIGHT_A1*t + WRIGHT_A2*s p_0 = WRIGHT_B0 + WRIGHT_B1*t + WRIGHT_B2*T_sq + WRIGHT_B3*T_sq*t + & WRIGHT_B4*s + WRIGHT_B5*s*t lambda = WRIGHT_C0 + WRIGHT_C1*t + WRIGHT_C2*T_sq + WRIGHT_C3*T_sq*t + & WRIGHT_C4*s + WRIGHT_C5*s*t p_plus_p0 = p + p_0 rho = p_plus_p0/(lambda + alpha_0*p_plus_p0) end function wright_rho