00001 subroutine peos_sound_speed(q,ss) 00002 ! 00003 use def_peos_parameter !abc,abi,rhoi,qi,hi,nphase 00004 implicit none 00005 ! 00006 real(8), intent(inout) :: q 00007 real(8), intent(out) :: ss 00008 real(8) :: hh, pre, rho, epsi, abin 00009 integer :: iphase 00010 ! 00011 call peos_q2hprho(q, hh, pre, rho, epsi) 00012 call peos_lookup(q, qi, iphase) 00013 abin = abi(iphase) 00014 ss = sqrt(abin*pre/rho/hh) 00015 ! 00016 end subroutine peos_sound_speed