From cfc0929c7529fc3328deccb50075e2631415a4d5 Mon Sep 17 00:00:00 2001 From: Austin Blevins Date: Mon, 28 Nov 2022 15:31:14 -0500 Subject: [PATCH] initial changes from the session with Dave; these are just guides and will be replaced --- src/globals/module_globals.f90 | 7 +++++-- src/util/util_init_list.f90 | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/globals/module_globals.f90 b/src/globals/module_globals.f90 index 8013b051..7af10cce 100644 --- a/src/globals/module_globals.f90 +++ b/src/globals/module_globals.f90 @@ -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 diff --git a/src/util/util_init_list.f90 b/src/util/util_init_list.f90 index f1e50754..b1912111 100644 --- a/src/util/util_init_list.f90 +++ b/src/util/util_init_list.f90 @@ -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