00001 subroutine teos_lookup(qp,qpar,iphase)
00002 use phys_constant
00003 use def_teos_parameter
00004 implicit none
00005
00006 real(8), intent(in) :: qp, qpar(0:nnteos)
00007 real(8) :: det
00008 integer, intent(out) :: iphase
00009 integer :: ii, i
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 iphase = 1
00031 do ii = 1, nphase
00032 det = (qp-qpar(ii))*(qp-qpar(ii-1))
00033 if (det <= 0.0d0) then
00034 iphase = ii
00035 exit
00036 end if
00037 end do
00038
00039 end subroutine teos_lookup