Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
initial changes from the session with Dave; these are just guides and will be replaced
  • Loading branch information
Austin Blevins committed Nov 28, 2022
1 parent 0ffc41a commit cfc0929
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
7 changes: 5 additions & 2 deletions src/globals/module_globals.f90
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ module module_globals
real(DP) :: ejcov ! Ejecta coverage
real(DP) :: dem ! Digital elevation model
real(DP) :: mantle ! Height of mantle (should be smaller than dem)
type(regolisttype), pointer :: regolayer => null() ! Pointer to the top of the regolith layer stack
type(regolisttype), pointer :: porolayer => null() ! Pointer to the top of the porosity layer stack
! type(regolisttype), pointer :: regolayer => null() ! Pointer to the top of the regolith layer stack
! type(regolisttype), pointer :: porolayer => null() ! Pointer to the top of the porosity layer stack
!type(regolisttype), pointer :: regolayer => null() ! Pointer to the top of the regolith layer stack
!type(regolisttype), pointer :: porolayer => null() ! Pointer to the top of the porosity layer stack
type(regodatatype), dimension(:), allocatable: regolayer
end type surftype

! Derived data type for crater information
Expand Down
17 changes: 12 additions & 5 deletions src/util/util_init_list.f90
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,18 @@ subroutine util_init_list(regolayer,initstat)
if (allocstat == 0) then
initstat = .true.
nullify(regolayer%next)
regolayer%regodata%thickness = sqrt(VBIG) ! This generates a buffer layer that the model should never reach if the run is structured properly
regolayer%regodata%comp = 0.0_DP
regolayer%regodata%meltfrac = 0.0_DP
regolayer%regodata%porosity = 0.0_DP
regolayer%regodata%age(:) = 0.0_SP
! regolayer%regodata%thickness = sqrt(VBIG) ! This generates a buffer layer that the model should never reach if the run is structured properly
! regolayer%regodata%comp = 0.0_DP
! regolayer%regodata%meltfrac = 0.0_DP
! regolayer%regodata%porosity = 0.0_DP
! regolayer%regodata%age(:) = 0.0_SP
if allocated(regolayer) deallocate(regolayer)
allocate(regolayer(1))
regolayer(1)%thickness = sqrt(VBIG) ! This generates a buffer layer that the model should never reach if the run is structured properly
regolayer(1)%comp = 0.0_DP
regolayer(1)%meltfrac = 0.0_DP
regolayer(1)%porosity = 0.0_DP
regolayer(1)%age(:) = 0.0_SP
else
write(*,*) 'util_init_list: Initialization failed. Exhausted memory.'
end if
Expand Down

0 comments on commit cfc0929

Please sign in to comment.