Skip to content

Commit

Permalink
Made some minor adjustments to track down source of error
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Nov 2, 2021
1 parent 46ad071 commit da698cd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
32 changes: 16 additions & 16 deletions src/crater/crater_populate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ subroutine crater_populate(user,surf,crater,domain,prod,production_list,vdist,nt
implicit none

! Arguments
type(usertype),intent(inout) :: user
type(surftype),dimension(:,:),intent(inout) :: surf
type(cratertype),intent(inout) :: crater
type(domaintype),intent(inout) :: domain
real(DP),dimension(:,:),intent(in) :: prod,vdist
integer(I8B),dimension(:),intent(inout) :: production_list
integer(I4B),intent(out) :: ntrue
integer(I4B),intent(out) :: vistrue
integer(I4B),intent(out) :: ntotkilled
real(DP),dimension(:,:),allocatable, intent(inout) :: truelist
real(DP),intent(out) :: mass
real(DP),intent(out) :: fracdone
real(DP),dimension(:,:),intent(in) :: nflux
integer(I8B),intent(in) :: ntotcrat ! Total number of attempted impacts
real(DP),intent(in) :: curyear
real(DP),dimension(:,:), intent(in) :: rclist !array of 'real' craters for quasiMC
type(usertype),intent(inout) :: user
type(surftype),dimension(:,:),intent(inout) :: surf
type(cratertype),intent(inout) :: crater
type(domaintype),intent(inout) :: domain
real(DP),dimension(:,:),intent(in) :: prod,vdist
integer(I8B),dimension(:),intent(inout) :: production_list
integer(I4B),intent(out) :: ntrue
integer(I4B),intent(out) :: vistrue
integer(I4B),intent(out) :: ntotkilled
real(DP),dimension(:,:),allocatable,intent(inout) :: truelist
real(DP),intent(out) :: mass
real(DP),intent(out) :: fracdone
real(DP),dimension(:,:),intent(in) :: nflux
integer(I8B),intent(in) :: ntotcrat ! Total number of attempted impacts
real(DP),intent(in) :: curyear
real(DP),dimension(:,:), intent(in) :: rclist !array of 'real' craters for quasiMC

! Internal variables
real(DP) :: cmin ! Minimum crater diameter (m)
Expand Down
2 changes: 1 addition & 1 deletion src/ejecta/ejecta_blanket.f90
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ subroutine ejecta_blanket(user,crater,domain,erad,lrad,vejsq,ejang,firstrun)
! lrad = erad + Psi * user%trad

! flat plane landing distance calculation
lrad = erad + vejsq*sin(2*ejang)/user%gaccel
lrad = erad + vejsq * sin(2 * ejang) / user%gaccel

return
end subroutine ejecta_blanket
Expand Down
4 changes: 1 addition & 3 deletions src/ejecta/ejecta_distance_estimate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ subroutine ejecta_distance_estimate(user,crater,domain,ejdis_estimate)
! Extrapolate in logspace out to the minimum thickness
slope = log(lrad2 / lrad1) / log(thick2 / thick1)
ejdis_estimate = exp(slope * log(domain%small / thick1) + log(lrad1))
if (.not.user%discontinuous) then
ejdis_estimate = min(ejdis_estimate, 2.3_DP * crater%frad**(1.006_DP))
end if
ejdis_estimate = min(ejdis_estimate, crater%frad * user%ejecta_truncation)

return
end subroutine ejecta_distance_estimate

0 comments on commit da698cd

Please sign in to comment.