Writes the arrival data (Amplitude, delay for each eigenray); ASCII output file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | r(Nr) | |||
integer, | intent(in) | :: | Ntheta | |||
integer, | intent(in) | :: | Nrd | |||
integer, | intent(in) | :: | Nr |
SUBROUTINE WriteArrivalsASCII3D( r, Ntheta, Nrd, Nr ) !! Writes the arrival data (Amplitude, delay for each eigenray); ASCII output file INTEGER, INTENT( IN ) :: Ntheta, Nrd, Nr REAL, INTENT( IN ) :: r( Nr ) INTEGER :: itheta, ir, id, iArr WRITE( ARRFile, * ) MAXVAL( NArr3D( 1 : Ntheta, 1 : Nrd, 1 : Nr ) ) DO itheta = 1, Ntheta DO id = 1, Nrd DO ir = 1, Nr IF ( Beam%RunType( 6 : 6 ) == '2' ) THEN ! 2D run? IF ( r ( ir ) == 0 ) THEN factor = 1e5 ! avoid /0 at origin ELSE factor = 1. / SQRT( r( ir ) ) ! cyl. spreading END IF END IF WRITE( ARRFile, * ) NArr3D( itheta, id, ir ) DO iArr = 1, NArr3D( itheta, id, ir ) ! you can compress the output file a lot by putting in an explicit format statement here ... ! However, you'll need to make sure you keep adequate precision WRITE( ARRFile, * ) & factor * Arr3D( itheta, id, ir, iArr )%A, & RadDeg * Arr3D( itheta, id, ir, iArr )%Phase, & REAL( Arr3D( itheta, id, ir, iArr )%delay ), & AIMAG( Arr3D( itheta, id, ir, iArr )%delay ), & Arr3D( itheta, id, ir, iArr )%SrcDeclAngle, & Arr3D( itheta, id, ir, iArr )%SrcAzimAngle, & Arr3D( itheta, id, ir, iArr )%RcvrDeclAngle, & Arr3D( itheta, id, ir, iArr )%RcvrAzimAngle, & Arr3D( itheta, id, ir, iArr )%NTopBnc, & Arr3D( itheta, id, ir, iArr )%NBotBnc END DO ! next arrival END DO ! next receiver depth END DO ! next receiver range END DO ! next receiver angle RETURN END SUBROUTINE WriteArrivalsASCII3D