MODULE allocation !----------------------------------------------------------------------- ! NAME ! allocation ! ! DESCRIPTION ! Management of memory throughout the modules of the code. ! ! AUTHORS & DATE ! JB Clement, 12/2025 ! ! NOTES ! !----------------------------------------------------------------------- ! DEPENDENCIES ! ------------ use geometry, only: ini_geometry, end_geometry, dim_init use atmosphere, only: ini_atmosphere, end_atmosphere use tracers, only: ini_tracers, end_tracers use slopes, only: ini_slopes, end_slopes use surface, only: ini_surface, end_surface use surf_temp, only: ini_surf_temp, end_surf_temp use soil_temp, only: ini_soil_temp, end_soil_temp use frost, only: ini_frost, end_frost use soil, only: ini_soil, end_soil use ice_table, only: ini_ice_table, end_ice_table use surf_ice, only: ini_surf_ice, end_surf_ice use orbit, only: ini_orbit, end_orbit use output, only: ini_output, end_output ! DECLARATION ! ----------- implicit none contains !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ !======================================================================= SUBROUTINE ini_allocation() !----------------------------------------------------------------------- ! NAME ! ini_geometry ! ! DESCRIPTION ! Initialize module arrays. ! ! AUTHORS & DATE ! JB Clement, 12/2025 ! ! NOTES ! !----------------------------------------------------------------------- ! DEPENDENCIES ! ------------ use stoppage, only: stop_clean ! DECLARATION ! ----------- implicit none ! CODE ! ---- ! Initialize the dimensions call ini_geometry() if (.not. dim_init) call stop_clean(__FILE__,__LINE__,"Dimensions of module 'geometry' were not correctly initilized.",1) ! Initialize everything else call ini_atmosphere() call ini_tracers() call ini_slopes() call ini_surface() call ini_surf_temp() call ini_soil_temp() call ini_frost() call ini_soil() call ini_ice_table() call ini_surf_ice() call ini_orbit() call ini_output() END SUBROUTINE ini_allocation !======================================================================= !======================================================================= SUBROUTINE end_allocation() !----------------------------------------------------------------------- ! NAME ! end_geometry ! ! DESCRIPTION ! Deallocate module arrays. ! ! AUTHORS & DATE ! JB Clement, 12/2025 ! ! NOTES ! !----------------------------------------------------------------------- ! DECLARATION ! ----------- implicit none ! CODE ! ---- call end_output() call end_orbit() call end_surf_ice() call end_ice_table() call end_soil() call end_frost() call end_soil_temp() call end_surf_temp() call end_surface() call end_slopes() call end_tracers() call end_atmosphere() call end_geometry() END SUBROUTINE end_allocation !======================================================================= END MODULE allocation