okada.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\okada.f
00002 !
00090                       MODULE OKADA
00091 !                     ************
00092 !
00093 !***********************************************************************
00094 ! TELEMAC2D   V6P2                                   06/12/2011
00095 !***********************************************************************
00096 !
00097 !
00098 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00099 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00100 !
00101       IMPLICIT NONE
00102 !
00103       PUBLIC  :: CONDI_OKADA
00104       PRIVATE :: OKADA_DIP_SLIP,OKADA_STRIKE_SLIP
00105 !
00106       CONTAINS
00107 !
00108 !-----------------------------------------------------------------------
00109 !
00110 !                    **********************
00111                      SUBROUTINE CONDI_OKADA
00112 !                    **********************
00113 !
00114      &(NPOIN,X,Y,H,COEFS,LAMBD0,PHI0)
00115 !
00116 !***********************************************************************
00117 ! TELEMAC2D   V6P2                                   06/12/2011
00118 !***********************************************************************
00119 !
00120 !
00121 !
00122 !
00123 !
00124 !reference Okada Y., "Internal deformation due to shear and tensile
00125 !+        faults in a half-space",
00126 !+        Bulletin of the Seismological Society of America,
00127 !+        Vol. 82, No. 2, pp. 1018-1040, April 1992
00128 !
00129 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00130 !|  NPOIN         |-->| NUMBER OF 2D NODES IN THE MESH
00131 !|  X,Y           |-->| COORDINATES X AND Y OF THE NODES OF THE MESH
00132 !|  H             |<->| WATER DEPTH TO WHICH THE TSUNAMI DEFORMATION
00133 !|                |   | WILL BE ADDED
00134 !|  COEFS         |   | TSUNAMI DEFINITION, IN ORDER:
00135 !|                |   | - HH FOCAL DEPTH
00136 !|                |   | - L  FAULT LENGTH
00137 !|                |   | - W  FAULT WIDTH
00138 !|                |   | - D  DISLOCATION
00139 !|                |   | - TH STRIKE DIRECTION
00140 !|                |   | - DL DIP ANGLE
00141 !|                |   | - RD SLIP ANGLE
00142 !|                |   | - Y0 EPICENTRE LATITUDE
00143 !|                |   | - X0 EPICENTRE LONGITUDE
00144 !|                |   | - C0 SIZE OF THE ELLIPSE OF INFLUENCE (LxW),
00145 !|                |   |   WITHIN WHICH THE POINTS WILL BE SET TO THE
00146 !|                |   |   MODEL DISPLACEMENT
00147 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00148 !
00149       IMPLICIT NONE
00150       INTEGER LNG,LU
00151       COMMON/INFO/LNG,LU
00152 !
00153 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00154 !
00155       INTEGER, INTENT(IN)             :: NPOIN
00156       DOUBLE PRECISION, INTENT(IN)    :: X(NPOIN),Y(NPOIN)
00157       DOUBLE PRECISION, INTENT(INOUT) :: H(NPOIN)
00158       DOUBLE PRECISION, INTENT(IN)    :: COEFS(10),LAMBD0,PHI0
00159 !
00160 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00161 !
00162       INTEGER I
00163 !
00164       DOUBLE PRECISION HH, L, W, D, TH, DL, RD, Y0, X0, C0
00165 !
00166       DOUBLE PRECISION ZERO,DEG2RAD, RR
00167       DOUBLE PRECISION HALFL, MINOR,MAJOR, XSPH0,YSPH0
00168       DOUBLE PRECISION CS2,SN2,DIST, XSPH,YSPH
00169       DOUBLE PRECISION DEL_X, DEL_Y, DS, DD, SN, CS
00170       DOUBLE PRECISION XI, YJ, YY, XX, X1, X2, X3, P
00171       DOUBLE PRECISION F1, F2, F3, F4, G1, G2, G3, G4
00172       DOUBLE PRECISION US, UD
00173       DOUBLE PRECISION PI, LAT0, LONG0, CONST,CONST0
00174 !
00175       INTRINSIC ATAN, COS, SIN, TAN, EXP, LOG
00176 !
00177 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00178 !
00179 !     USER AND CONVERTION CONSTANTS
00180 !
00181       ZERO = 0.D0
00182       RR = 6.371D6
00183 !
00184       PI = 4.D0*ATAN(1.D0)
00185       DEG2RAD = PI/180.D0
00186 !
00187 !     FOLLOWING PARAMETERS SHOULD BE ADDED TO DICO
00188       HH = COEFS(1) ! FOCAL DEPTH
00189       L  = COEFS(2) ! FAULT LENGTH
00190       W  = COEFS(3) ! FAULT WIDTH
00191       D  = COEFS(4) ! DISLOCATION
00192       TH = COEFS(5) * DEG2RAD ! STRIKE DIRECTION
00193       DL = COEFS(6) * DEG2RAD ! DIP ANGLE
00194       RD = COEFS(7) * DEG2RAD ! SLIP ANGLE
00195       Y0 = COEFS(8) * DEG2RAD ! EPICENTRE LATITUDE
00196       X0 = COEFS(9) * DEG2RAD ! EPICENTRE LONGITUDE
00197       C0 = COEFS(10) ! SIZE OF THE ELLIPSE
00198 !
00199       LAT0 = LAMBD0 * DEG2RAD
00200       LONG0 = PHI0 * DEG2RAD
00201 !
00202       CONST = TAN( 0.5D0*LAT0 + 0.25D0*PI )
00203       CONST0 = TAN( 0.5D0*Y0 + 0.25D0*PI )
00204       HALFL = 0.5D0*L
00205 !
00206 !     PARAMETERS FOR THE ELLIPSE OF INFLUENCE
00207       MAJOR = C0 * 2*L
00208       MINOR = C0 * 2*W
00209       CS2 = COS( 0.5D0*PI-TH )
00210       SN2 = SIN( 0.5D0*PI-TH )
00211 !
00212       XSPH0 = RR*( X0-LONG0 )
00213       YSPH0 = RR*( LOG( CONST0 ) - LOG( CONST ) )
00214 !
00215 !-----------------------------------------------------------------------
00216 !
00217 ! FOCAL DEPTH USED FOR OKADA'S MODEL
00218 !
00219       HH = HH+W*SIN(DL)
00220 !
00221 ! DISPLACEMENT DUE TO DIFFERENT EPICENTER DEFINITION
00222 !
00223       DEL_X = W*COS(DL)*COS(TH)
00224       DEL_Y = W*COS(DL)*SIN(TH)
00225 !
00226       DS = D*COS(RD)
00227       DD = D*SIN(RD)
00228       SN = SIN(DL)
00229       CS = COS(DL)
00230 !
00231       DO I = 1,NPOIN
00232 ! IF POINT INSIDE ELLIPSE C0 x ( L x W )
00233         XSPH =  CS2*( X(I)-XSPH0 ) + SN2*( Y(I)-YSPH0 )
00234         YSPH = -SN2*( X(I)-XSPH0 ) + CS2*( Y(I)-YSPH0 )
00235         DIST = (XSPH/MAJOR)**2 + (YSPH/MINOR)**2
00236         IF( DIST.LT.1.D0 ) THEN
00237 !
00238           XI = X(I)/RR + LONG0
00239           YJ = 2.D0*ATAN(CONST*EXP(Y(I)/RR)) - 0.5D0*PI
00240           YY = RR*(YJ-Y0)
00241           XX = RR*COS(YJ)*(XI-X0)
00242           X1 = (XX-DEL_X)*SIN(TH)+(YY+DEL_Y)*COS(TH)
00243           X2 = (XX-DEL_X)*COS(TH)-(YY+DEL_Y)*SIN(TH)
00244           X2 = -X2
00245           X3 = ZERO
00246           P = X2*CS+HH*SN
00247 !
00248           F1 = OKADA_STRIKE_SLIP( X1,X2,X3,X1+HALFL,P,DL,HH )
00249           F2 = OKADA_STRIKE_SLIP( X1,X2,X3,X1+HALFL,P-W,DL,HH )
00250           F3 = OKADA_STRIKE_SLIP( X1,X2,X3,X1-HALFL,P,DL,HH )
00251           F4 = OKADA_STRIKE_SLIP( X1,X2,X3,X1-HALFL,P-W,DL,HH )
00252           G1 = OKADA_DIP_SLIP( X1,X2,X3,X1+HALFL,P,DL,HH )
00253           G2 = OKADA_DIP_SLIP( X1,X2,X3,X1+HALFL,P-W,DL,HH )
00254           G3 = OKADA_DIP_SLIP( X1,X2,X3,X1-HALFL,P,DL,HH )
00255           G4 = OKADA_DIP_SLIP( X1,X2,X3,X1-HALFL,P-W,DL,HH )
00256 !
00257           US = (F1-F2-F3+F4)*DS
00258           UD = (G1-G2-G3+G4)*DD
00259           H(I) = H(I) + (US+UD)
00260 !
00261         ENDIF
00262       ENDDO
00263 !
00264 !-----------------------------------------------------------------------
00265 !
00266       END SUBROUTINE CONDI_OKADA
00267 !             *******************************************
00268               DOUBLE PRECISION FUNCTION OKADA_STRIKE_SLIP
00269 !             *******************************************
00270 !
00271      &(X1,X2,X3,Y1,Y2,DP,DD)
00272 !
00273 !***********************************************************************
00274 ! TELEMAC2D   V6P2                                   06/12/2011
00275 !***********************************************************************
00276 !
00277 !
00278 !
00279 !
00280 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00281 !| X1,X2,X3       |-->|
00282 !| Y1,Y2          |-->|
00283 !| DP             |-->|
00284 !| DD             |-->|
00285 !| F              |<--|
00286 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00287 !
00288       IMPLICIT NONE
00289       INTEGER LNG,LU
00290       COMMON/INFO/LNG,LU
00291 !
00292 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00293 !
00294       DOUBLE PRECISION, INTENT(IN) :: X1,X2,X3,Y1,Y2,DP,DD
00295 !
00296 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00297 !
00298       DOUBLE PRECISION SN,CS,Q,D_BAR,R,A4,PI
00299 !
00300       INTRINSIC ATAN,COS,SIN,LOG,SQRT
00301 !
00302 !-----------------------------------------------------------------------
00303 !
00304       PI = 4.D0*ATAN(1.D0)
00305 !
00306       SN = SIN(DP)
00307       CS = COS(DP)
00308       Q = X2*SN - DD*CS
00309       D_BAR = Y2*SN - Q*CS
00310       R  = SQRT(Y1**2 + Y2**2 + Q**2)
00311       A4 = 0.5D0/CS*(LOG(R+D_BAR) - SN*LOG(R+Y2))
00312       OKADA_STRIKE_SLIP=-(D_BAR*Q/R/(R+Y2)+Q*SN/(R+Y2)+A4*SN)/(2.D0*PI)
00313 !
00314 !-----------------------------------------------------------------------
00315 !
00316       END FUNCTION OKADA_STRIKE_SLIP
00317 !             ****************************************
00318               DOUBLE PRECISION FUNCTION OKADA_DIP_SLIP
00319 !             ****************************************
00320 !
00321      &(X1,X2,X3,Y1,Y2,DP,DD)
00322 !
00323 !***********************************************************************
00324 ! TELEMAC2D   V6P2                                   06/12/2011
00325 !***********************************************************************
00326 !
00327 !
00328 !
00329 !
00330 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00331 !| X1,X2,X3       |-->|
00332 !| Y1,Y2          |-->|
00333 !| DP             |-->|
00334 !| DD             |-->|
00335 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00336 !
00337       IMPLICIT NONE
00338       INTEGER LNG,LU
00339       COMMON/INFO/LNG,LU
00340 !
00341 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00342 !
00343       DOUBLE PRECISION, INTENT(IN) :: X1,X2,X3,Y1,Y2,DP,DD
00344 !
00345 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00346 !
00347       DOUBLE PRECISION SN,CS,Q,D_BAR,R,XX,A5,PI
00348 !
00349       INTRINSIC ATAN,COS,SIN,SQRT
00350 !
00351 !-----------------------------------------------------------------------
00352 !
00353       PI = 4.D0*ATAN(1.D0)
00354 !
00355       SN = SIN(DP)
00356       CS = COS(DP)
00357       Q = X2*SN - DD*CS
00358       D_BAR = Y2*SN - Q*CS
00359       R = SQRT(Y1**2 + Y2**2 + Q**2)
00360       XX = SQRT(Y1**2 + Q**2)
00361       A5 = 1.D0/CS*ATAN((Y2*(XX+Q*CS)+XX*(R+XX)*SN)/Y1/(R+XX)/CS)
00362       OKADA_DIP_SLIP = -(D_BAR*Q/R/(R+Y1) +
00363      &   SN*ATAN(Y1*Y2/Q/R) - A5*SN*CS)/(2.D0*PI)
00364 !
00365 !-----------------------------------------------------------------------
00366 !
00367       END FUNCTION OKADA_DIP_SLIP
00368 !
00369 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00370 !
00371       END MODULE OKADA

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0