00001 subroutine calc_soundspeed_peos
00002 use phys_constant, only : long
00003 use grid_parameter, only : nrf, ntf, npf, ntfeq, ntfpolp, npfxzp, npfyzp
00004 use def_matter, only : emd
00005 use make_array_3d
00006 use interface_IO_output_1D_general
00007 implicit none
00008 real(long), pointer :: c_s(:,:,:)
00009 real(long) :: q, ss
00010 integer :: irf, itf, ipf
00011 character(30) :: char1
00012
00013 call alloc_array3d(c_s, 0, nrf, 0, ntf, 0, npf)
00014
00015 open(30,file='rns_ss_gt_1.dat',status='unknown')
00016 do ipf = 0, npf
00017 do itf = 0, ntf
00018 do irf = 0, nrf
00019 q = emd(irf,itf,ipf)
00020 call peos_sound_speed(q,ss)
00021 c_s(irf,itf,ipf) = ss
00022 if (ss > 1) write(30,'(3i5,1p,e23.15)') irf, itf, ipf, ss
00023 end do
00024 end do
00025 end do
00026 close(30)
00027
00028 char1 = 'rns_sound_speed_pxaxis.dat'
00029 call IO_output_1D_general(char1,'f','g',c_s,-1, ntfeq, npfxzp)
00030
00031 deallocate(c_s)
00032
00033 end subroutine calc_soundspeed_peos