sspmod Module

Sound speed profile handling with interpolation, derivatives, and environment management


Uses

  • module~~sspmod~~UsesGraph module~sspmod sspmod module~fatalerror FatalError module~sspmod->module~fatalerror module~monotonicmod monotonicMod module~sspmod->module~monotonicmod module~splinec splinec module~sspmod->module~splinec

Used by

  • module~~sspmod~~UsedByGraph module~sspmod sspmod module~influence Influence module~influence->module~sspmod module~writeray WriteRay module~influence->module~writeray module~influence3d Influence3D module~influence3d->module~sspmod module~influence3d->module~writeray module~readenvironmentbell ReadEnvironmentBell module~readenvironmentbell->module~sspmod module~step Step module~step->module~sspmod module~step3dmod Step3DMod module~step3dmod->module~sspmod module~writeray->module~sspmod proc~reflect2d Reflect2D proc~reflect2d->module~sspmod proc~reflect3d Reflect3D proc~reflect3d->module~sspmod program~bellhop BELLHOP program~bellhop->module~sspmod program~bellhop->module~influence program~bellhop->module~readenvironmentbell program~bellhop3d BELLHOP3D program~bellhop3d->module~sspmod program~bellhop3d->module~influence program~bellhop3d->module~influence3d program~bellhop3d->module~readenvironmentbell proc~bellhopcore BellhopCore proc~bellhopcore->module~writeray proc~step2d~2 Step2D proc~step2d~2->module~step3dmod proc~traceray2d~2 TraceRay2D proc~traceray2d~2->module~step proc~traceray2d~2->module~writeray proc~traceray3d TraceRay3D proc~traceray3d->module~step3dmod

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: MaxSSP = 100001
integer, public :: iSegr = 1
integer, public :: iSegx = 1
integer, public :: iSegy = 1
integer, public :: iSegz = 1
real(kind=8), public :: zTemp
real(kind=8), public :: betaPowerLaw = 1
real(kind=8), public :: fT = 1D20
real(kind=8), public :: alphaR = 1500
real(kind=8), public :: betaR = 0
real(kind=8), public :: alphaI = 0
real(kind=8), public :: betaI = 0
real(kind=8), public :: rhoR = 1
type(SSPStructure), public :: SSP
type(BdryType), public :: Bdry

Derived Types

type, public ::  rxyz_vector

Components

Type Visibility Attributes Name Initial
real(kind=8), public, ALLOCATABLE :: r(:)
real(kind=8), public, ALLOCATABLE :: x(:)
real(kind=8), public, ALLOCATABLE :: y(:)
real(kind=8), public, ALLOCATABLE :: z(:)

type, public ::  SSPStructure

Components

Type Visibility Attributes Name Initial
integer, public :: NPts
integer, public :: Nr
integer, public :: Nx
integer, public :: Ny
integer, public :: Nz
real(kind=8), public :: z(MaxSSP)
real(kind=8), public :: rho(MaxSSP)
complex(kind=8), public :: c(MaxSSP)
complex(kind=8), public :: cz(MaxSSP)
complex(kind=8), public :: n2(MaxSSP)
complex(kind=8), public :: n2z(MaxSSP)
complex(kind=8), public :: cSpline(4,MaxSSP)
complex(kind=8), public :: cCoef(4,MaxSSP)
complex(kind=8), public :: CSWork(4,MaxSSP)
real(kind=8), public, ALLOCATABLE :: cMat(:,:)
real(kind=8), public, ALLOCATABLE :: czMat(:,:)
real(kind=8), public, ALLOCATABLE :: cMat3(:,:,:)
real(kind=8), public, ALLOCATABLE :: czMat3(:,:,:)
type(rxyz_vector), public :: Seg
character(len=1), public :: Type
character(len=2), public :: AttenUnit

type, public ::  HSInfo

Components

Type Visibility Attributes Name Initial
real(kind=8), public :: alphaR
real(kind=8), public :: alphaI
real(kind=8), public :: betaR
real(kind=8), public :: betaI
complex(kind=8), public :: cP
complex(kind=8), public :: cS
real(kind=8), public :: rho
real(kind=8), public :: Depth
character(len=1), public :: BC
character(len=6), public :: Opt

type, public ::  BdryPt

Components

Type Visibility Attributes Name Initial
type(HSInfo), public :: HS

type, public ::  BdryType

Components

Type Visibility Attributes Name Initial
type(BdryPt), public :: Top
type(BdryPt), public :: Bot

Subroutines

public subroutine EvaluateSSP(x, t, c, cimag, gradc, crr, crz, czz, rho, freq, Task)

Evaluates sound speed profile at given location

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho
real(kind=8), intent(in) :: freq
character(len=3), intent(in) :: Task

public subroutine EvaluateSSP2D(x2D, t2D, c, cimag, gradc, crr, crz, czz, rho, xs, tradial, freq)

Converts cartesian gradients to polar

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x2D(2)
real(kind=8), intent(in) :: t2D(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho
real(kind=8), intent(in) :: xs(3)
real(kind=8), intent(in) :: tradial(2)
real(kind=8), intent(in) :: freq

public subroutine EvaluateSSP3D(x, t, c, cimag, gradc, cxx, cyy, czz, cxy, cxz, cyz, rho, freq, Task)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(3)
real(kind=8), intent(in) :: t(3)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(3)
real(kind=8), intent(out) :: cxx
real(kind=8), intent(out) :: cyy
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: cxy
real(kind=8), intent(out) :: cxz
real(kind=8), intent(out) :: cyz
real(kind=8), intent(out) :: rho
real(kind=8), intent(in) :: freq
character(len=3), intent(in) :: Task

public subroutine n2Linear(x, t, c, cimag, gradc, crr, crz, czz, rho, freq, Task)

Linear interpolation for squared buoyancy frequency

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho
real(kind=8), intent(in) :: freq
character(len=3), intent(in) :: Task

public subroutine cLinear(x, t, c, cimag, gradc, crr, crz, czz, rho, freq, Task)

c-linear interpolation of SSP data

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho
real(kind=8), intent(in) :: freq
character(len=3), intent(in) :: Task

public subroutine cPCHIP(x, t, c, cimag, gradc, crr, crz, czz, rho, freq, Task)

PCHIP for interpolation of sound speed

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho
real(kind=8), intent(in) :: freq
character(len=3), intent(in) :: Task

public subroutine cCubic(x, t, c, cimag, gradc, crr, crz, czz, rho, freq, Task)

Cubic spline interpolation for sound speed

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho
real(kind=8), intent(in) :: freq
character(len=3), intent(in) :: Task

public subroutine Quad(x, t, c, cimag, gradc, crr, crz, czz, rho, freq, Task)

Quadrilateral interpolation for sound speed profiles

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho
real(kind=8), intent(in) :: freq
character(len=3), intent(in) :: Task

public subroutine Hexahedral(x, t, c, cimag, gradc, cxx, cyy, czz, cxy, cxz, cyz, rho, freq, Task)

Trilinear hexahedral interpolation of SSP data

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(3)
real(kind=8), intent(in) :: t(3)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(3)
real(kind=8), intent(out) :: cxx
real(kind=8), intent(out) :: cyy
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: cxy
real(kind=8), intent(out) :: cxz
real(kind=8), intent(out) :: cyz
real(kind=8), intent(out) :: rho
real(kind=8), intent(in) :: freq
character(len=3), intent(in) :: Task

public subroutine Analytic(x, t, c, cimag, gradc, crr, crz, czz, rho)

$ IF ( x( 2 ) < 5000.0 ) THEN $ ELSE $ ! Homogeneous half-space $ xt = 2.0 * ( 5000.0 - 1300.0 ) / 1300.0 $ c = C0 * ( 1.0 + 0.00737 * ( xt - 1.0 + EXP( -xt ) ) ) $ cimag = 0.0 $ cz = 0.0 $ czz = 0.0 $ END IF

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho

public subroutine AnalyticCosh(x, t, c, cimag, gradc, crr, crz, czz, rho)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho

public subroutine Analytic3D(x, t, c, cimag, gradc, cxx, cyy, czz, cxy, cxz, cyz, rho)

$ IF ( x( 3 ) .LT. 5000.0 ) THEN $ ELSE ! HOMOGENEOUS HALF-SPACE $ W = 2.0 * ( 5000.0 - 1300.0 ) / 1300.0 $ c = c0*( 1.0 + 0.00737 * ( W - 1.0 + EXP( -W ) ) ) $ gradc( 2 ) = 0.0 $ gradc( 3 ) = 0.0 $ czz = 0.0 $ cyz = 0.0 $ END IF

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(3)
real(kind=8), intent(in) :: t(3)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(3)
real(kind=8), intent(out) :: cxx
real(kind=8), intent(out) :: cyy
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: cxy
real(kind=8), intent(out) :: cxz
real(kind=8), intent(out) :: cyz
real(kind=8), intent(inout) :: rho

public subroutine ReadSSP(Depth, freq)

Reads SSP data from the environmental file and convert to Nepers/m

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: Depth
real(kind=8), intent(in) :: freq

public subroutine UpdateDepthSegmentT(x, t)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)

public subroutine UpdateRangeSegmentT(x, t)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)

public subroutine Update3DXSegmentT(x, t)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(3)
real(kind=8), intent(in) :: t(3)

public subroutine Update3DYSegmentT(x, t)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(3)
real(kind=8), intent(in) :: t(3)

public subroutine Update3DZSegmentT(x, t)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(3)
real(kind=8), intent(in) :: t(3)