FV3 Bundle
gsw_sa_p_inrange.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_sa_p_inrange (sa, p)
3 !==========================================================================
4 !
5 ! Check for any values that are out of the TEOS-10 range ...
6 !
7 ! SA = Absolute Salinity [ g/kg ]
8 ! p = sea pressure [ dbar ]
9 ! ( i.e. absolute pressure - 10.1325 dbar )
10 !---------------------------------------------------------------------------
11 
12 use gsw_mod_kinds
13 
14 implicit none
15 
16 
17 real (r8), intent(in) :: sa, p
18 
19 logical :: gsw_sa_p_inrange
20 
21 gsw_sa_p_inrange = .true.
22 
23 if (p.gt.10000.0_r8 .or. sa.gt.120.0_r8 .or. &
24  p + sa*71.428571428571402_r8.gt.13571.42857142857_r8) &
25  gsw_sa_p_inrange = .false.
26 
27 return
28 end function
29 
30 !---------------------------------------------------------------------------
elemental logical function gsw_sa_p_inrange(sa, p)