@@ -81,6 +81,9 @@ subroutine meshfem3D_models_broadcast()
8181 else if (ATTENUATION_3D) then
8282 ! Colleen's model defined originally between 24.4km and 650km
8383 call model_atten3D_QRFSI12_broadcast()
84+ else if (ATTENUATION_3D_BERKELEY) then
85+ ! Berkeley 3D attenuation model
86+ call model_atten3D_berkeley_broadcast()
8487 else
8588 ! sets up attenuation coefficients according to the chosen, "pure" 1D model
8689 ! (including their 1D-crustal profiles)
@@ -1647,10 +1650,12 @@ end subroutine meshfem3D_model_crust
16471650!- ------------------------------------------------------------------------------------------------
16481651!
16491652
1650- subroutine meshfem3D_models_getatten_val (idoubling ,r_prem ,theta ,phi , &
1653+ subroutine meshfem3D_models_getatten_val (iregion_code ,idoubling , &
1654+ r_prem ,theta ,phi , &
16511655 ispec , i , j , k , &
16521656 tau_e ,tau_s , &
1653- moho ,Qmu ,Qkappa ,elem_in_crust )
1657+ moho ,Qmu ,Qkappa , &
1658+ elem_in_crust ,rho )
16541659
16551660! sets attenuation values tau_e and Qmu for a given point
16561661!
@@ -1667,7 +1672,7 @@ subroutine meshfem3D_models_getatten_val(idoubling,r_prem,theta,phi, &
16671672
16681673 implicit none
16691674
1670- integer ,intent (in ) :: idoubling
1675+ integer ,intent (in ) :: iregion_code, idoubling
16711676
16721677 double precision ,intent (in ) :: r_prem
16731678 double precision ,intent (in ) :: theta,phi
@@ -1681,11 +1686,11 @@ subroutine meshfem3D_models_getatten_val(idoubling,r_prem,theta,phi, &
16811686 double precision , dimension (N_SLS),intent (inout ) :: tau_s, tau_e
16821687
16831688 logical ,intent (in ) :: elem_in_crust
1689+ double precision , intent (in ) :: rho
16841690
16851691 ! local parameters
16861692 double precision :: theta_degrees,phi_degrees
16871693 double precision :: r_used
1688-
16891694 ! geographical values
16901695 double precision :: dist, theta_c, phi_c, dist_c, edge, sponge
16911696
@@ -1705,6 +1710,7 @@ subroutine meshfem3D_models_getatten_val(idoubling,r_prem,theta,phi, &
17051710 call model_attenuation_gll(ispec, i, j, k, Qmu)
17061711
17071712 else if (ATTENUATION_3D) then
1713+ ! 3D attenuation model
17081714 ! used for models: s362ani_3DQ, s362iso_3DQ, 3D_attenuation, SPiRal
17091715
17101716 ! gets spherical coordinates in degrees
@@ -1713,7 +1719,7 @@ subroutine meshfem3D_models_getatten_val(idoubling,r_prem,theta,phi, &
17131719
17141720 ! in case models incorporate a 3D crust, attenuation values for mantle
17151721 ! get expanded up to surface, and for the crustal points Qmu for PREM crust is imposed
1716- r_used = r_prem* R_PLANET_KM
1722+ r_used = r_prem * R_PLANET_KM
17171723 if (CRUSTAL) then
17181724 if (r_prem > (ONE- moho) .or. elem_in_crust) then
17191725 ! points in actual crust: puts point radius into prem crust
@@ -1728,8 +1734,19 @@ subroutine meshfem3D_models_getatten_val(idoubling,r_prem,theta,phi, &
17281734 ! gets value according to radius/theta/phi location and idoubling flag
17291735 call model_atten3D_QRFSI12(r_used,theta_degrees,phi_degrees,Qmu,idoubling)
17301736
1731- else
1737+ else if (ATTENUATION_3D_BERKELEY) then
1738+ ! 3D Berkeley attenuation model
1739+ if (elem_in_crust) then
1740+ ! fixes Q for crust
1741+ Qmu = 300.0d0
1742+ Qkappa = 99900.d0 ! not used so far...
1743+ else
1744+ r_used = r_prem
1745+ call model_atten3D_berkeley(r_used,theta,phi,rho,Qkappa,Qmu,iregion_code,CRUSTAL)
1746+ endif
17321747
1748+ else
1749+ ! default 1D reference (attenuation) model
17331750 select case (REFERENCE_1D_MODEL)
17341751
17351752 ! case (REFERENCE_MODEL_PREM,REFERENCE_MODEL_PREM2)
0 commit comments