Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed a bug with melt distribution syntax
  • Loading branch information
Austin Blevins committed Feb 23, 2023
1 parent 8d9122c commit b6ec18e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/regolith/regolith_streamtube_head.f90
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ subroutine regolith_streamtube_head(user,surfi,deltar,totmare,tots,age_collector
age_collector(:) = age_collector(:) + current(M)%age(:) * recyratio
headmeltvol = current(M)%meltfrac * vsgly * recyratio
meltinejecta = meltinejecta + headmeltvol
distvol(:) = distvol + (current(M)%meltdist(:)*vsgly*recyratio)
distvol(:) = distvol(:) + (current(M)%meltdist(:)*vsgly*recyratio)
totvol = totvol + vsgly
else ! head is not intersected with layers.

Expand All @@ -83,7 +83,7 @@ subroutine regolith_streamtube_head(user,surfi,deltar,totmare,tots,age_collector
age_collector(:) = age_collector(:) + current(N)%age(:) * recyratio
headmeltvol = current(N)%meltfrac * tothead * recyratio
meltinejecta = meltinejecta + headmeltvol
distvol(:) = distvol + (current(N)%meltdist(:)*tothead*recyratio)
distvol(:) = distvol(:) + (current(N)%meltdist(:)*tothead*recyratio)
totvol = totvol + tothead
!current => current%next
!N = N - 1
Expand All @@ -97,7 +97,7 @@ subroutine regolith_streamtube_head(user,surfi,deltar,totmare,tots,age_collector
age_collector(:) = age_collector(:) + current(N)%age(:) * recyratio
headmeltvol = current(N)%meltfrac * tothead*recyratio
meltinejecta = meltinejecta + headmeltvol
distvol(:) = distvol + (current(N)%meltdist(:)*tothead*recyratio)
distvol(:) = distvol(:) + (current(N)%meltdist(:)*tothead*recyratio)
totvol = totvol + tothead
exit
end if
Expand Down
4 changes: 2 additions & 2 deletions src/regolith/regolith_subpixel_streamtube.f90
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ subroutine regolith_subpixel_streamtube(user,surfi,deltar,ri,rip1,eradi,newlayer
vsh = regolith_shock_damage(eradi,deltar,xmints,xsfints,0.0_DP,eradi)
recyratio = max(vseg-vsh,0.0 )/ (user%pix**2) / (surfi%regolayer(M)%thickness)
meltinejecta = surfi%regolayer(M)%meltfrac * vseg * recyratio
distvol = distvol + (surfi%regolayer(M)%meltdist(:)*vseg*recyratio)
distvol(:) = distvol(:) + (surfi%regolayer(M)%meltdist(:)*vseg*recyratio)
totvol = vseg
age_collector(:) = age_collector(:) + surfi%regolayer(M)%age(:) * recyratio
vol = vol + sum(age_collector(:))
Expand Down Expand Up @@ -205,7 +205,7 @@ subroutine regolith_subpixel_streamtube(user,surfi,deltar,ri,rip1,eradi,newlayer

!current => current%next
meltinejecta = meltinejecta + mvl + mvr
distvol = distvol + (current(N)%meltdist(:)*((vsgly1*recyratio)+(vsgly2*recyratio2)))
distvol(:) = distvol(:) + (current(N)%meltdist(:)*((vsgly1*recyratio)+(vsgly2*recyratio2)))
!distvol = distvol + (current(N)%meltdist(:)*(vsgly1+vsgly2))
totvol = totvol + vsgly1 + vsgly2
!N = N - 1
Expand Down

0 comments on commit b6ec18e

Please sign in to comment.