Skip to content

Commit

Permalink
adds smooth etopo5 module (for Berkeley model)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeter committed Oct 10, 2024
1 parent 9607835 commit 71decbc
Show file tree
Hide file tree
Showing 4 changed files with 401 additions and 24 deletions.
10 changes: 6 additions & 4 deletions setup/constants.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
character (len=*), parameter :: PATHNAME_TOPO_FILE_1 = &
'DATA/topo_bathy/topo_bathy_etopo1_ice_c_smoothed_window_3.bin'

!--- Default
!!--- Default
! Topography defaults to ETOPO4
integer, parameter :: EARTH_NX_BATHY = NX_BATHY_4
integer, parameter :: EARTH_NY_BATHY = NY_BATHY_4
Expand Down Expand Up @@ -258,9 +258,11 @@
! topography model
!!--- ETOPO1 5 - Berkeley filtered
! size of topography and bathymetry file
integer, parameter :: NX_BATHY_BERKELEY = 360,NY_BATHY_BERKELEY = 180
! resolution of topography file in minutes
integer, parameter :: RESOLUTION_TOPO_FILE_BERKELEY = 2
! note: NX = 360 to match longitude range [0,360[ , i.e., 0,1,2,..,359
! NY = 180 + 1 to match colatitude range [0,180], i.e., 0,1,2,..,180
integer, parameter :: NX_BATHY_BERKELEY = 360,NY_BATHY_BERKELEY = 181
! resolution of topography file in minutes (1 degree == 60 minutes)
integer, parameter :: RESOLUTION_TOPO_FILE_BERKELEY = 60
! pathname of the topography file (un-smoothed)
character (len=*), parameter :: PATHNAME_TOPO_FILE_BERKELEY = trim(A3d_folder)//"ETOPO5_1x1_filtre.dat"

Expand Down
22 changes: 8 additions & 14 deletions src/meshfem3D/compute_element_properties.f90
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ subroutine compute_element_tiso_flag(elem_is_tiso,elem_in_mantle,iregion_code,is
IFLAG_CRUST,IFLAG_220_80,IFLAG_80_MOHO,IFLAG_670_220,IFLAG_MANTLE_NORMAL,IREGION_CRUST_MANTLE, &
REFERENCE_MODEL_1DREF,REFERENCE_MODEL_1DREF,REFERENCE_MODEL_SEMUCB, &
THREE_D_MODEL_S362WMANI,THREE_D_MODEL_SGLOBE, &
THREE_D_MODEL_BERKELEY, &
USE_OLD_VERSION_FORMAT

use meshfem_models_par, only: &
Expand Down Expand Up @@ -572,17 +571,16 @@ subroutine compute_element_tiso_flag(elem_is_tiso,elem_in_mantle,iregion_code,is
endif
endif

! TODO: daniel - check if full tiso mantle should be used
!case (REFERENCE_MODEL_SEMUCB)
case (REFERENCE_MODEL_SEMUCB)
! SEMUCB - allows tiso for full mantle & crust
! (same as USE_FULL_TISO_MANTLE option)
!if (idoubling(ispec) == IFLAG_MANTLE_NORMAL &
! .or. idoubling(ispec) == IFLAG_670_220 &
! .or. idoubling(ispec) == IFLAG_220_80 &
! .or. idoubling(ispec) == IFLAG_80_MOHO &
! .or. idoubling(ispec) == IFLAG_CRUST) then
! elem_is_tiso = .true.
!endif
if (idoubling(ispec) == IFLAG_MANTLE_NORMAL &
.or. idoubling(ispec) == IFLAG_670_220 &
.or. idoubling(ispec) == IFLAG_220_80 &
.or. idoubling(ispec) == IFLAG_80_MOHO &
.or. idoubling(ispec) == IFLAG_CRUST) then
elem_is_tiso = .true.
endif

case default
! default reference models
Expand Down Expand Up @@ -641,10 +639,6 @@ subroutine compute_element_tiso_flag(elem_is_tiso,elem_in_mantle,iregion_code,is
! note: THREE_D_MODEL_SGLOBE_ISO
! sgloberani_iso model based on PREM, it will have tiso already set from crust down to 220

case (THREE_D_MODEL_BERKELEY)
! additionally enables tiso for crust
if (idoubling(ispec) == IFLAG_CRUST) elem_is_tiso = .true.

case default
! nothing special to add
continue
Expand Down
Loading

0 comments on commit 71decbc

Please sign in to comment.