diff --git a/src/Makefile.am b/src/Makefile.am index de331416..59c00bce 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,7 +11,7 @@ AM_FCFLAGS = $(IDEBUG) #ifort debug flags #gfortran optimized flags -AM_FCFLAGS = -O3 -fopenmp -ffree-form -g -fbounds-check -fbacktrace +#AM_FCFLAGS = -O3 -fopenmp -ffree-form -g -fbounds-check -fbacktrace #gfortran debug flags #AM_FCFLAGS = -O0 -g -fopenmp -fbounds-check -Wall -Warray-bounds -Warray-temporaries -Wimplicit-interface -ffree-form -fsanitize-address-use-after-scope -fstack-check -fsanitize=bounds-strict -fsanitize=undefined -fsanitize=signed-integer-overflow -fsanitize=object-size -fstack-protector-all diff --git a/src/regolith/regolith_melt_glass.f90 b/src/regolith/regolith_melt_glass.f90 index 07f21be9..61ed7b2e 100644 --- a/src/regolith/regolith_melt_glass.f90 +++ b/src/regolith/regolith_melt_glass.f90 @@ -165,7 +165,10 @@ 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) - newlayer%meltdist(domain%nqmc) = newlayer%meltfrac + allocate(newlayer%meltdist((domain%rcnum))) + if(domain%currentqmc) then + newlayer%meltdist(domain%nqmc) = newlayer%meltfrac + end if end if n_age = max(ceiling(age / age_resolution), 1)