From bdfb2a907d8b085ba7e4a8310cad898c9fa5ba36 Mon Sep 17 00:00:00 2001 From: lyy Date: Mon, 17 Jul 2023 14:59:01 +0100 Subject: [PATCH] update --- src/suews/src/suews_ctrl_driver.f95 | 8 +- src/suews/src/suews_ctrl_typeII.f95 | 316 ++++++++++++++-------------- 2 files changed, 162 insertions(+), 162 deletions(-) diff --git a/src/suews/src/suews_ctrl_driver.f95 b/src/suews/src/suews_ctrl_driver.f95 index 3c1b7ed0..acbbf0f9 100644 --- a/src/suews/src/suews_ctrl_driver.f95 +++ b/src/suews/src/suews_ctrl_driver.f95 @@ -2191,10 +2191,10 @@ SUBROUTINE SUEWS_cal_Main_DTS( & snowState_next = snowState hydroState_next = hydroState - WRITE (*, *) "hydroState_next%state_roof", hydroState_next%state_roof - WRITE (*, *) "hydroState_next%soilstore_roof", hydroState_next%soilstore_roof - WRITE (*, *) "hydroState_next%state_wall", hydroState_next%state_wall - WRITE (*, *) "hydroState_next%soilstore_wall", hydroState_next%soilstore_wall + ! WRITE (*, *) "hydroState_next%state_roof", hydroState_next%state_roof + ! WRITE (*, *) "hydroState_next%soilstore_roof", hydroState_next%soilstore_roof + ! WRITE (*, *) "hydroState_next%state_wall", hydroState_next%state_wall + ! WRITE (*, *) "hydroState_next%soilstore_wall", hydroState_next%soilstore_wall ! state_surf_next = state_surf ! soilstore_surf_next = soilstore_surf diff --git a/src/suews/src/suews_ctrl_typeII.f95 b/src/suews/src/suews_ctrl_typeII.f95 index 19e41544..958b3bf8 100644 --- a/src/suews/src/suews_ctrl_typeII.f95 +++ b/src/suews/src/suews_ctrl_typeII.f95 @@ -13,9 +13,9 @@ MODULE SUEWS_HydroHeat_DTS REAL(KIND(1D0)), DIMENSION(:), ALLOCATABLE :: state_roof ! wetness status of roof [mm] REAL(KIND(1D0)), DIMENSION(:), ALLOCATABLE :: soilstore_wall ! Soil moisture of wall [mm] REAL(KIND(1D0)), DIMENSION(:), ALLOCATABLE :: state_wall ! wetness status of wall [mm] - CONTAINS - PROCEDURE :: allocHydro => allocHydroState_c - PROCEDURE :: deallocHydro => deallocHydroState_c + ! CONTAINS + ! PROCEDURE :: allocHydro => allocHydroState_c + ! PROCEDURE :: deallocHydro => deallocHydroState_c END TYPE HYDRO_STATE TYPE, PUBLIC :: HEAT_STATE @@ -25,162 +25,162 @@ MODULE SUEWS_HydroHeat_DTS REAL(KIND(1D0)), DIMENSION(:), ALLOCATABLE :: tsfc_roof ! roof surface temperature [degC] REAL(KIND(1D0)), DIMENSION(:), ALLOCATABLE :: tsfc_wall ! wall surface temperature [degC] REAL(KIND(1D0)), DIMENSION(:), ALLOCATABLE :: tsfc_surf ! surface temperature [degC] - CONTAINS - PROCEDURE :: allocHeat => allocHeatState_c - PROCEDURE :: deallocHeat => deallocHeatState_c + ! CONTAINS + ! PROCEDURE :: allocHeat => allocHeatState_c + ! PROCEDURE :: deallocHeat => deallocHeatState_c END TYPE HEAT_STATE -CONTAINS - SUBROUTINE allocate_hydro_state(self, nlayer) - IMPLICIT NONE - TYPE(HYDRO_STATE), INTENT(inout) :: self - INTEGER, INTENT(in) :: nlayer - ! - IF (ALLOCATED(self%soilstore_roof)) THEN - DEALLOCATE (self%soilstore_roof) - END IF - - IF (ALLOCATED(self%state_roof)) THEN - DEALLOCATE (self%state_roof) - END IF - - IF (ALLOCATED(self%soilstore_wall)) THEN - DEALLOCATE (self%soilstore_wall) - END IF - - IF (ALLOCATED(self%state_wall)) THEN - DEALLOCATE (self%state_wall) - END IF - - ALLOCATE (self%soilstore_roof(nlayer)) - ALLOCATE (self%state_roof(nlayer)) - ALLOCATE (self%soilstore_wall(nlayer)) - ALLOCATE (self%state_wall(nlayer)) - ! - END SUBROUTINE allocate_hydro_state - - SUBROUTINE allocHydroState_c(self, nlayer) - IMPLICIT NONE - CLASS(HYDRO_STATE), INTENT(inout) :: self - INTEGER, INTENT(in) :: nlayer - ! - CALL allocate_hydro_state(self, nlayer) - ! - END SUBROUTINE allocHydroState_c - - SUBROUTINE dealloc_hydro_state(self) - IMPLICIT NONE - TYPE(HYDRO_STATE), INTENT(inout) :: self - ! - IF (ALLOCATED(self%soilstore_roof)) THEN - DEALLOCATE (self%soilstore_roof) - END IF - - IF (ALLOCATED(self%state_roof)) THEN - DEALLOCATE (self%state_roof) - END IF - - IF (ALLOCATED(self%soilstore_wall)) THEN - DEALLOCATE (self%soilstore_wall) - END IF - - IF (ALLOCATED(self%state_wall)) THEN - DEALLOCATE (self%state_wall) - END IF - ! - END SUBROUTINE dealloc_hydro_state - - SUBROUTINE deallocHydroState_c(self) - IMPLICIT NONE - CLASS(HYDRO_STATE), INTENT(inout) :: self - ! - CALL dealloc_hydro_state(self) - ! - END SUBROUTINE deallocHydroState_c - - SUBROUTINE allocate_heat_state(self, num_surf, num_layer, num_depth) - IMPLICIT NONE - TYPE(HEAT_STATE), INTENT(inout) :: self - INTEGER, INTENT(in) :: num_surf, num_layer, num_depth - ! - IF (ALLOCATED(self%temp_roof)) THEN - DEALLOCATE (self%temp_roof) - END IF - - IF (ALLOCATED(self%temp_wall)) THEN - DEALLOCATE (self%temp_wall) - END IF - - IF (ALLOCATED(self%tsfc_roof)) THEN - DEALLOCATE (self%tsfc_roof) - END IF - - IF (ALLOCATED(self%tsfc_wall)) THEN - DEALLOCATE (self%tsfc_wall) - END IF - - IF (ALLOCATED(self%tsfc_surf)) THEN - DEALLOCATE (self%tsfc_surf) - END IF - - IF (ALLOCATED(self%temp_surf)) THEN - DEALLOCATE (self%temp_surf) - END IF - - ALLOCATE (self%temp_roof(num_layer, num_depth)) - ALLOCATE (self%temp_wall(num_layer, num_depth)) - ALLOCATE (self%tsfc_roof(num_layer)) - ALLOCATE (self%tsfc_wall(num_layer)) - ALLOCATE (self%tsfc_surf(num_surf)) - ALLOCATE (self%temp_surf(num_surf, num_depth)) - ! - END SUBROUTINE allocate_heat_state - - SUBROUTINE allocHeatState_c(self, num_surf, num_layer, num_depth) - IMPLICIT NONE - CLASS(HEAT_STATE), INTENT(inout) :: self - INTEGER, INTENT(in) :: num_surf, num_layer, num_depth - ! - CALL allocate_heat_state(self, num_surf, num_layer, num_depth) - ! - END SUBROUTINE allocHeatState_c - - SUBROUTINE deallocHeatState_c(self) - IMPLICIT NONE - CLASS(HEAT_STATE), INTENT(inout) :: self - ! - CALL dealloc_heat_state(self) - ! - END SUBROUTINE deallocHeatState_c - - SUBROUTINE dealloc_heat_state(self) - IMPLICIT NONE - TYPE(HEAT_STATE), INTENT(inout) :: self - ! - IF (ALLOCATED(self%temp_roof)) THEN - DEALLOCATE (self%temp_roof) - END IF - - IF (ALLOCATED(self%temp_wall)) THEN - DEALLOCATE (self%temp_wall) - END IF - - IF (ALLOCATED(self%tsfc_roof)) THEN - DEALLOCATE (self%tsfc_roof) - END IF - - IF (ALLOCATED(self%tsfc_wall)) THEN - DEALLOCATE (self%tsfc_wall) - END IF - - IF (ALLOCATED(self%tsfc_surf)) THEN - DEALLOCATE (self%tsfc_surf) - END IF - - IF (ALLOCATED(self%temp_surf)) THEN - DEALLOCATE (self%temp_surf) - END IF - ! - END SUBROUTINE dealloc_heat_state +! CONTAINS +! SUBROUTINE allocate_hydro_state(self, nlayer) +! IMPLICIT NONE +! TYPE(HYDRO_STATE), INTENT(inout) :: self +! INTEGER, INTENT(in) :: nlayer +! ! +! IF (ALLOCATED(self%soilstore_roof)) THEN +! DEALLOCATE (self%soilstore_roof) +! END IF + +! IF (ALLOCATED(self%state_roof)) THEN +! DEALLOCATE (self%state_roof) +! END IF + +! IF (ALLOCATED(self%soilstore_wall)) THEN +! DEALLOCATE (self%soilstore_wall) +! END IF + +! IF (ALLOCATED(self%state_wall)) THEN +! DEALLOCATE (self%state_wall) +! END IF + +! ALLOCATE (self%soilstore_roof(nlayer)) +! ALLOCATE (self%state_roof(nlayer)) +! ALLOCATE (self%soilstore_wall(nlayer)) +! ALLOCATE (self%state_wall(nlayer)) +! ! +! END SUBROUTINE allocate_hydro_state + +! SUBROUTINE allocHydroState_c(self, nlayer) +! IMPLICIT NONE +! CLASS(HYDRO_STATE), INTENT(inout) :: self +! INTEGER, INTENT(in) :: nlayer +! ! +! CALL allocate_hydro_state(self, nlayer) +! ! +! END SUBROUTINE allocHydroState_c + +! SUBROUTINE dealloc_hydro_state(self) +! IMPLICIT NONE +! TYPE(HYDRO_STATE), INTENT(inout) :: self +! ! +! IF (ALLOCATED(self%soilstore_roof)) THEN +! DEALLOCATE (self%soilstore_roof) +! END IF + +! IF (ALLOCATED(self%state_roof)) THEN +! DEALLOCATE (self%state_roof) +! END IF + +! IF (ALLOCATED(self%soilstore_wall)) THEN +! DEALLOCATE (self%soilstore_wall) +! END IF + +! IF (ALLOCATED(self%state_wall)) THEN +! DEALLOCATE (self%state_wall) +! END IF +! ! +! END SUBROUTINE dealloc_hydro_state + +! SUBROUTINE deallocHydroState_c(self) +! IMPLICIT NONE +! CLASS(HYDRO_STATE), INTENT(inout) :: self +! ! +! CALL dealloc_hydro_state(self) +! ! +! END SUBROUTINE deallocHydroState_c + +! SUBROUTINE allocate_heat_state(self, num_surf, num_layer, num_depth) +! IMPLICIT NONE +! TYPE(HEAT_STATE), INTENT(inout) :: self +! INTEGER, INTENT(in) :: num_surf, num_layer, num_depth +! ! +! IF (ALLOCATED(self%temp_roof)) THEN +! DEALLOCATE (self%temp_roof) +! END IF + +! IF (ALLOCATED(self%temp_wall)) THEN +! DEALLOCATE (self%temp_wall) +! END IF + +! IF (ALLOCATED(self%tsfc_roof)) THEN +! DEALLOCATE (self%tsfc_roof) +! END IF + +! IF (ALLOCATED(self%tsfc_wall)) THEN +! DEALLOCATE (self%tsfc_wall) +! END IF + +! IF (ALLOCATED(self%tsfc_surf)) THEN +! DEALLOCATE (self%tsfc_surf) +! END IF + +! IF (ALLOCATED(self%temp_surf)) THEN +! DEALLOCATE (self%temp_surf) +! END IF + +! ALLOCATE (self%temp_roof(num_layer, num_depth)) +! ALLOCATE (self%temp_wall(num_layer, num_depth)) +! ALLOCATE (self%tsfc_roof(num_layer)) +! ALLOCATE (self%tsfc_wall(num_layer)) +! ALLOCATE (self%tsfc_surf(num_surf)) +! ALLOCATE (self%temp_surf(num_surf, num_depth)) +! ! +! END SUBROUTINE allocate_heat_state + +! SUBROUTINE allocHeatState_c(self, num_surf, num_layer, num_depth) +! IMPLICIT NONE +! CLASS(HEAT_STATE), INTENT(inout) :: self +! INTEGER, INTENT(in) :: num_surf, num_layer, num_depth +! ! +! CALL allocate_heat_state(self, num_surf, num_layer, num_depth) +! ! +! END SUBROUTINE allocHeatState_c + +! SUBROUTINE deallocHeatState_c(self) +! IMPLICIT NONE +! CLASS(HEAT_STATE), INTENT(inout) :: self +! ! +! CALL dealloc_heat_state(self) +! ! +! END SUBROUTINE deallocHeatState_c + +! SUBROUTINE dealloc_heat_state(self) +! IMPLICIT NONE +! TYPE(HEAT_STATE), INTENT(inout) :: self +! ! +! IF (ALLOCATED(self%temp_roof)) THEN +! DEALLOCATE (self%temp_roof) +! END IF + +! IF (ALLOCATED(self%temp_wall)) THEN +! DEALLOCATE (self%temp_wall) +! END IF + +! IF (ALLOCATED(self%tsfc_roof)) THEN +! DEALLOCATE (self%tsfc_roof) +! END IF + +! IF (ALLOCATED(self%tsfc_wall)) THEN +! DEALLOCATE (self%tsfc_wall) +! END IF + +! IF (ALLOCATED(self%tsfc_surf)) THEN +! DEALLOCATE (self%tsfc_surf) +! END IF + +! IF (ALLOCATED(self%temp_surf)) THEN +! DEALLOCATE (self%temp_surf) +! END IF +! ! +! END SUBROUTINE dealloc_heat_state END MODULE SUEWS_HydroHeat_DTS