Skip to content

Commit

Permalink
fixed a bug where meltdist array wasn't being allocated for pure melt…
Browse files Browse the repository at this point in the history
… zones
  • Loading branch information
Austin Michael Blevins committed Dec 14, 2022
1 parent 88dd83b commit 59cd270
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/regolith/regolith_melt_glass.f90
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,15 @@ subroutine regolith_melt_glass(user,crater,domain,age,age_resolution,ebh,rm,erad
volm1 = regolith_streamtube_volume_func(eradi,0.0_DP,xmints,deltar)
melt = volm1 - volv1
newlayer%meltfrac = melt/(vst-volv1)
allocate(newlayer%meltdist((domain%rcnum)))
newlayer%meltdist(:) = 0.0_SP
if(domain%currentqmc) then
newlayer%meltdist(domain%nqmc) = newlayer%meltfrac
end if

end if

allocate(newlayer%meltdist((domain%rcnum)))
newlayer%meltdist(:) = 0.0_SP
if(domain%currentqmc) then
newlayer%meltdist(domain%nqmc) = newlayer%meltfrac
end if

n_age = max(ceiling(age / age_resolution), 1)
if (lrad >= RAD_GP * crater%rad) then
newlayer%age(n_age) = melt / (user%pix * user%pix)
Expand Down
6 changes: 5 additions & 1 deletion src/regolith/regolith_mix.f90
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ subroutine regolith_mix(surfi,mixing_depth,domain)

!===============================================
! Add up all layers' info until a desired depth
!===============================================
!===============================================
! !test code to create a situation for a breakpoint, since vscode debugger won't recognize the conditional breakpoint
! if(domain%currentqmc .eqv. .true.) then
! j = 0
! end if
call util_traverse_pop_array(surfi%regolayer,mixing_depth,poppedarray)

newlayer%thickness = 0.0_DP
Expand Down

0 comments on commit 59cd270

Please sign in to comment.