Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Renamed crater_find_visible to crater_dimensions. Will be consolidating the morphological dimension parameters into this subroutine
  • Loading branch information
daminton committed Mar 24, 2020
1 parent 3b7b0ad commit bab4df1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ejecta/ejecta_distance_estimate.f90\
crater/crater_populate.f90\
crater/crater_scale.f90\
crater/crater_generate.f90\
crater/crater_find_visible.f90\
crater/crater_dimensions.f90\
crater/crater_averages.f90\
crater/crater_emplace.f90\
crater/crater_realistic_topography.f90\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
!**********************************************************************************************************************************
!
! Unit Name : crater_find_visible
! Unit Name : crater_dimensions
! Unit Type : subroutine
! Project : CTEM
! Language : Fortran 2003
!
! Description : Finds the visible crater parabolic parameters, rim, and rim upturn distance
!
! Description : Calculates the physical dimensions of the crater
!
! Input
! Arguments :
Expand All @@ -18,9 +17,9 @@
! Notes :
!
!**********************************************************************************************************************************
subroutine crater_find_visible(user,crater,domain)
subroutine crater_dimensions(user,crater,domain)
use module_globals
use module_crater, EXCEPT_THIS_ONE => crater_find_visible
use module_crater, EXCEPT_THIS_ONE => crater_dimensions
implicit none

! Arguments
Expand All @@ -29,18 +28,23 @@ subroutine crater_find_visible(user,crater,domain)
type(domaintype),intent(in) :: domain

! Internal variables
real(DP) :: cdepth,lrad,cform
real(DP) :: lrad,cform

real(DP),parameter :: DDRATIO = 0.19_DP ! Depth-diameter ratio
real(DP),parameter :: RDRATIO = 0.030_DP ! Rim height to diameter ratio
real(DP),parameter :: RIMFAC = 1.5_DP ! Ratio of radius used for counting craters to the final rim radius


! Executable code
cdepth = DDRATIO * crater%fcrat
crater%floordepth = DDRATIO * crater%fcrat
if (crater%fcrat <= crater%cxtran) then
crater%rheight = RDRATIO * crater%fcrat
crater%rimheight = RDRATIO * crater%fcrat
else
crater%rheight = (RDRATIO*crater%cxtran)+(RDRATIO*((crater%fcrat-crater%cxtran)**(0.399_DP)))
crater%rimheight = (RDRATIO*crater%cxtran)+(RDRATIO*((crater%fcrat-crater%cxtran)**(0.399_DP)))
endif

crater%vcorr = cdepth - crater%rheight
crater%parab = cdepth / ((crater%frad)**2)
crater%vcorr = crater%floordepth - crater%rimheight
crater%parab = crater%floordepth / ((crater%frad)**2)

!find rim for counting purposes
crater%frim = RIMFAC * crater%frad
Expand All @@ -49,7 +53,7 @@ subroutine crater_find_visible(user,crater,domain)
lrad = crater%frad
crater%rimdis = domain%side
do while (lrad <= domain%side)
cform = crater%rheight * ((crater%frad/lrad)**RIMDROP)
cform = crater%rimheight * ((crater%frad/lrad)**RIMDROP)
if (cform < domain%small) then
crater%rimdis = lrad
exit
Expand All @@ -61,5 +65,5 @@ subroutine crater_find_visible(user,crater,domain)
crater%rimdispx = int(crater%rimdis/user%pix) + 1

return
end subroutine crater_find_visible
end subroutine crater_dimensions

6 changes: 3 additions & 3 deletions src/crater/module_crater.f90
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ end subroutine crater_generate
end interface

interface
subroutine crater_find_visible(user,crater,domain)
subroutine crater_dimensions(user,crater,domain)
use module_globals
implicit none
type(usertype),intent(in) :: user
type(cratertype),intent(inout) :: crater
type(domaintype),intent(in) :: domain
end subroutine crater_find_visible
end subroutine crater_dimensions
end interface

interface
Expand Down Expand Up @@ -115,7 +115,7 @@ subroutine crater_realistic_topography(user,surf,crater,domain,deltaMtot)
type(surftype),dimension(:,:),intent(inout) :: surf
type(cratertype),intent(inout) :: crater
type(domaintype),intent(in) :: domain
real(DP),intent(out) :: deltaMtot
real(DP),intent(inout) :: deltaMtot
end subroutine crater_realistic_topography
end interface

Expand Down
13 changes: 9 additions & 4 deletions src/globals/module_globals.f90
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ module module_globals
real(DP) :: frad ! Final crater radius
real(DP) :: fcrat ! Final crater diameter
real(DP) :: vdepth,vrim,vcorr ! parameter for parabolic crater form
real(DP) :: frim,parab,rheight ! parameter for parabolic crater form
real(DP) :: frim,parab ! parameter for parabolic crater form
real(DP) :: rimdis ! crater form radius (bowl + upturned rim)
real(DP) :: ejdis ! ejecta max distance
real(DP) :: ejrim ! ejecta height at crater rim
Expand All @@ -112,6 +112,13 @@ module module_globals
integer(I4B) :: maxinc ! Maximum area affected
integer(I4B) :: strflag ! 0 for regolith, 1 for bedrock
real(DP) :: melev,xslp,yslp ! Mean elevation and slopes at pre-existing impact site

!Crater dimension information - See Pike (1977) Impact and Explosion Cratering, Fig. 1
real(DP) :: rimheight
real(DP) :: rimwidth
real(DP) :: floordepth
real(DP) :: floordiam
real(DP) :: peakheight
end type cratertype

! Derived data type for domain variables (sizes and dimensions)
Expand Down Expand Up @@ -290,10 +297,8 @@ module module_globals
real(DP),parameter :: KT = 0.85_DP ! Proportionality constant (see Richardson 2009 eqs. 15 & 20)
!real(DP),parameter :: CT = KT * 1.0077158813689795507466256218613060723322903283648264_DP ! KT * (PI*THIRD)**(SIXTH)
real(DP),parameter :: CT = KT * (PI*THIRD)**(SIXTH)
real(DP),parameter :: DDRATIO = 0.19_DP ! ?
real(DP),parameter :: RDRATIO = 0.030_DP ! Rim height to diameter ratio

real(DP),parameter :: RIMDROP = 4.20_DP ! Power law index for rim profile
real(DP),parameter :: RIMFAC = 1.5_DP ! ?
real(DP),parameter :: TRSIM = 1.25_DP ! ?
real(DP),parameter :: EXFAC = 0.1_DP ! Excavation depth relative to transient crater diameter
real(DP),parameter :: CXEXPS = 1._DP / 0.885_DP - 1.0_DP ! Complex crater scaling exponent (see Croft 1985)
Expand Down

0 comments on commit bab4df1

Please sign in to comment.