Skip to content

Commit

Permalink
Moved subpixel stuff to the subpixel step where it belongs
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jan 9, 2023
1 parent c47c200 commit 70cdcda
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/crater/crater_populate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,7 @@ subroutine crater_populate(user,surf,crater,domain,prod,production_list,vdist,nt
end if
end if

! Do sub-pixel craters vertical mixing
! Do superdomain ray deposits
finterval = 1.0_DP / real(ntotcrat,kind=DP)
if (user%doregotrack) then
call crater_superdomain(user,surf,age,age_resolution,prod,nflux,domain,finterval)
call regolith_depth_model(user,domain,finterval,nflux,p)
call regolith_subcrater_mix(user,surf,domain,nflux,finterval,p)
age = age - finterval * user%interval
end if


! Do periodic subpixel processes on the whole grid
if (.not.user%testflag) then
Expand All @@ -333,6 +325,16 @@ subroutine crater_populate(user,surf,crater,domain,prod,production_list,vdist,nt
craters_since_subpixel = icrater - icrater_last_subpixel
finterval = craters_since_subpixel / real(ntotcrat,kind=DP)
call crater_subpixel_diffusion(user,surf,nflux,domain,finterval,kdiff)

! Do superdomain ray deposits
! Do sub-pixel craters vertical mixing
if (user%doregotrack) then
call crater_superdomain(user,surf,age,age_resolution,prod,nflux,domain,finterval)
call regolith_depth_model(user,domain,finterval,nflux,p)
call regolith_subcrater_mix(user,surf,domain,nflux,finterval,p)
age = age - finterval * user%interval
end if

icrater_last_subpixel = icrater
end if
! Intermediate tally step
Expand Down

0 comments on commit 70cdcda

Please sign in to comment.