MODULE surf_rad_prop_core !----------------------------------------------------------------------- ! NAME ! surf_rad_prop_core ! ! DESCRIPTION ! Contains global parameters used for the surface. ! ! AUTHORS & DATE ! JB Clement, 12/2025 ! ! NOTES ! !----------------------------------------------------------------------- ! DEPENDENCIES ! ------------ use numerics, only: dp ! DECLARATION ! ----------- implicit none ! PARAMETERS ! ---------- real(dp), dimension(:), allocatable, protected :: albedodat_PCM ! Albedo of bare ground in the PCM at the beginning real(dp), dimension(:,:), allocatable, protected, private :: albedo_PCM ! Surface albedo in the PCM at the beginning real(dp), dimension(:,:), allocatable, protected :: emissivity_PCM ! Thermal IR surface emissivity in the PCM at the beginning contains !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ !======================================================================= SUBROUTINE ini_surface() !----------------------------------------------------------------------- ! NAME ! ini_surface ! ! DESCRIPTION ! Allocate 'surf_rad_prop_core' module arrays. ! ! AUTHORS & DATE ! JB Clement, 12/2025 ! ! NOTES ! !----------------------------------------------------------------------- ! DEPENDENCIES ! ------------ use geometry, only: ngrid, nslope ! DECLARATION ! ----------- implicit none ! CODE ! ---- allocate(albedo_PCM(ngrid,nslope)) allocate(albedodat_PCM(ngrid)) allocate(emissivity_PCM(ngrid,nslope)) albedo_PCM(:,:) = 0._dp albedodat_PCM(:) = 0._dp emissivity_PCM(:,:) = 1._dp END SUBROUTINE ini_surface !======================================================================= !======================================================================= SUBROUTINE end_surface() !----------------------------------------------------------------------- ! NAME ! end_surface ! ! DESCRIPTION ! Deallocate 'surf_rad_prop_core' module arrays. ! ! AUTHORS & DATE ! JB Clement, 12/2025 ! ! NOTES ! !----------------------------------------------------------------------- ! DECLARATION ! ----------- implicit none ! CODE ! ---- if (allocated(albedo_PCM)) deallocate(albedo_PCM) if (allocated(albedodat_PCM)) deallocate(albedodat_PCM) if (allocated(emissivity_PCM)) deallocate(emissivity_PCM) END SUBROUTINE end_surface !======================================================================= !======================================================================= SUBROUTINE set_albedodat_PCM(albedodat_PCM_in) !----------------------------------------------------------------------- ! NAME ! set_albedodat_PCM ! ! DESCRIPTION ! Setter for 'albedodat_PCM'. ! ! AUTHORS & DATE ! JB Clement, 12/2025 ! ! NOTES ! !----------------------------------------------------------------------- ! DECLARATION ! ----------- implicit none ! ARGUMENTS ! --------- real(dp), dimension(:), intent(in) :: albedodat_PCM_in ! CODE ! ---- albedodat_PCM(:) = albedodat_PCM_in(:) END SUBROUTINE set_albedodat_PCM !======================================================================= !======================================================================= SUBROUTINE set_albedo_PCM(albedo_PCM_in) !----------------------------------------------------------------------- ! NAME ! set_albedo_PCM ! ! DESCRIPTION ! Setter for 'albedo_PCM'. ! ! AUTHORS & DATE ! JB Clement, 12/2025 ! ! NOTES ! !----------------------------------------------------------------------- ! DECLARATION ! ----------- implicit none ! ARGUMENTS ! --------- real(dp), dimension(:,:), intent(in) :: albedo_PCM_in ! CODE ! ---- albedo_PCM(:,:) = albedo_PCM_in(:,:) END SUBROUTINE set_albedo_PCM !======================================================================= !======================================================================= SUBROUTINE set_emissivity_PCM(emissivity_PCM_in) !----------------------------------------------------------------------- ! NAME ! set_emissivity_PCM ! ! DESCRIPTION ! Setter for 'emissivity_PCM'. ! ! AUTHORS & DATE ! JB Clement, 12/2025 ! ! NOTES ! !----------------------------------------------------------------------- ! DECLARATION ! ----------- implicit none ! ARGUMENTS ! --------- real(dp), dimension(:,:), intent(in) :: emissivity_PCM_in ! CODE ! ---- emissivity_PCM(:,:) = emissivity_PCM_in(:,:) END SUBROUTINE set_emissivity_PCM !======================================================================= END MODULE surf_rad_prop_core