Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
push to the cluster for debugging why ages are negative in some cases
  • Loading branch information
Austin Blevins committed Jun 21, 2023
1 parent 1eb6726 commit fe93d4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/regolith/regolith_streamtube.f90
Original file line number Diff line number Diff line change
Expand Up @@ -339,16 +339,20 @@ subroutine regolith_streamtube(user,surf,crater,domain,ejb,ejtble,xp,yp,xpi,ypi,
factor = newlayer%totvolume / newlayer%meltvolume
newlayer%meltvolume = newlayer%totvolume
distvol(:) = distvol(:) * factor
newlayer%age(:) = newlayer%age(:) * factor
end if
newlayer%distvol(:) = newlayer%distvol(:) + distvol(:)

newlayer%distvol(1+domain%rcnum) = newlayer%meltvolume - sum(newlayer%distvol(1:domain%rcnum))
if (newlayer%distvol(1+domain%rcnum) < 0.0_DP) then !pixel consists entirely of QMC melt
newlayer%distvol(1+domain%rcnum) = 0.0_SP
newlayer%age(:) = 0.0_SP
end if
if (sum(newlayer%distvol) > newlayer%totvolume) then
factor = newlayer%totvolume / sum(newlayer%distvol)
newlayer%distvol(:) = newlayer%distvol(:) * factor
newlayer%age(:) = newlayer%age(:) * factor

end if
newlayer%meltvolume = sum(newlayer%distvol)

Expand Down

0 comments on commit fe93d4f

Please sign in to comment.