Skip to content

Commit

Permalink
[GH Actions] fprettify source code
Browse files Browse the repository at this point in the history
  • Loading branch information
sunt05 committed May 31, 2024
1 parent 6d3742d commit 245bd44
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
30 changes: 15 additions & 15 deletions src/suews/src/suews_ctrl_driver.f95
Original file line number Diff line number Diff line change
Expand Up @@ -469,30 +469,30 @@ SUBROUTINE SUEWS_cal_Main_DTS( &
timer, config, forcing, siteInfo, & !input
modState) ! input/output:

debugState%state_dailystate = modState
debugState%state_dailystate = modState

!======== Calculate soil moisture =========
IF (Diagnose == 1) WRITE (*, *) 'Calling SUEWS_update_SoilMoist...'
CALL SUEWS_update_SoilMoist_DTS( &
timer, config, forcing, siteInfo, & ! input
modState) ! input/output:

debugState%state_soilmoist = modState
debugState%state_soilmoist = modState

IF (Diagnose == 1) WRITE (*, *) 'Calling SUEWS_cal_WaterUse...'
!=================Gives the external and internal water uses per timestep=================
CALL SUEWS_cal_WaterUse_DTS( &
timer, config, forcing, siteInfo, & ! input
modState) ! input/output:

debugState%state_wateruse = modState
debugState%state_wateruse = modState

! ===================ANTHROPOGENIC HEAT AND CO2 FLUX======================
CALL SUEWS_cal_AnthropogenicEmission_DTS( &
timer, config, forcing, siteInfo, & ! input
modState) ! input/output:

debugState%state_anthroemis = modState
debugState%state_anthroemis = modState

! ========================================================================
! N.B.: the following parts involves snow-related calculations.
Expand All @@ -505,15 +505,15 @@ SUBROUTINE SUEWS_cal_Main_DTS( &
modState, & ! input/output:
dataOutLineSPARTACUS) ! output

debugState%state_qn = modState
debugState%state_qn = modState

IF (diagnose == 1) PRINT *, 'Tsfc_surf before QS', heatState%tsfc_surf
CALL SUEWS_cal_Qs_DTS( &
timer, config, forcing, siteInfo, & !input
modState, & ! input/output:
dataOutLineESTM)

debugState%state_qs = modState
debugState%state_qs = modState

!==================Energy related to snow melting/freezing processes=======
IF (Diagnose == 1) WRITE (*, *) 'Calling MeltHeat'
Expand All @@ -524,15 +524,15 @@ SUBROUTINE SUEWS_cal_Main_DTS( &
timer, config, forcing, siteInfo, & ! input
modState) ! input/output:

debugState%state_qhqe_lumps = modState
debugState%state_qhqe_lumps = modState

!============= calculate water balance =============
IF (Diagnose == 1) WRITE (*, *) 'Calling SUEWS_cal_Water...'
CALL SUEWS_cal_Water_DTS( &
timer, config, forcing, siteInfo, & ! input
modState) ! input/output:

debugState%state_water = modState
debugState%state_water = modState
!============= calculate water balance end =============

!===============Resistance Calculations=======================
Expand All @@ -541,7 +541,7 @@ SUBROUTINE SUEWS_cal_Main_DTS( &
timer, config, forcing, siteInfo, & ! input
modState) ! input/output:

debugState%state_resist = modState
debugState%state_resist = modState
! atmState, &
! roughnessState, &
! hydroState, &
Expand Down Expand Up @@ -577,7 +577,7 @@ SUBROUTINE SUEWS_cal_Main_DTS( &
timer, config, forcing, siteInfo, & ! input
modState) ! input/output:

debugState%state_qe = modState
debugState%state_qe = modState
!======== Evaporation and surface state_id end========
END IF

Expand All @@ -587,15 +587,15 @@ SUBROUTINE SUEWS_cal_Main_DTS( &
timer, config, forcing, siteInfo, & ! input
modState) ! input/output:

debugState%state_qh = modState
debugState%state_qh = modState
!============ Sensible heat flux end ===============

! ============ update surface temperature of this iteration ===============
CALL suews_update_tsurf( &
timer, config, forcing, siteInfo, & ! input
modState) ! input/output:

debugState%state_tsurf = modState
debugState%state_tsurf = modState

i_iter = i_iter + 1
IF (i_iter == max_iter .AND. .NOT. flag_converge) THEN
Expand All @@ -618,15 +618,15 @@ SUBROUTINE SUEWS_cal_Main_DTS( &
modState, & ! input/output:
dataoutLineRSL) ! output

debugState%state_rsl = modState
debugState%state_rsl = modState

! ============ BIOGENIC CO2 FLUX =======================
IF (Diagnose == 1) WRITE (*, *) 'Calling SUEWS_cal_BiogenCO2_DTS...'
CALL SUEWS_cal_BiogenCO2_DTS( &
timer, config, forcing, siteInfo, & ! input
modState) ! input/output:

debugState%state_biogenco2 = modState
debugState%state_biogenco2 = modState

! calculations of diagnostics end
!==============================================================
Expand All @@ -653,7 +653,7 @@ SUBROUTINE SUEWS_cal_Main_DTS( &
modState, & ! input/output:
dataOutLineBEERS) ! output

debugState%state_beers = modState
debugState%state_beers = modState

!==============translation of output variables into output array===========
IF (Diagnose == 1) WRITE (*, *) 'Calling BEERS_cal_main_DTS...'
Expand Down
44 changes: 22 additions & 22 deletions src/suews/src/suews_ctrl_type.f95
Original file line number Diff line number Diff line change
Expand Up @@ -855,32 +855,32 @@ MODULE SUEWS_DEF_DTS
TYPE(SUEWS_STATE) :: state_biogenco2
TYPE(SUEWS_STATE) :: state_beers
! TYPE(SUEWS_STATE) :: state_snow ! unavailable - to be added #234
CONTAINS
PROCEDURE :: init => init_suews_debug
CONTAINS
PROCEDURE :: init => init_suews_debug
END TYPE SUEWS_DEBUG

CONTAINS

subroutine init_suews_debug(self, nlayer, ndepth)
CLASS(SUEWS_DEBUG), INTENT(inout) :: self
INTEGER, INTENT(in) :: nlayer, ndepth

! Initialise the SUEWS_DEBUG type
CALL self%state_dailystate%ALLOCATE(nlayer, ndepth)
CALL self%state_soilmoist%ALLOCATE(nlayer, ndepth)
CALL self%state_wateruse%ALLOCATE(nlayer, ndepth)
CALL self%state_anthroemis%ALLOCATE(nlayer, ndepth)
CALL self%state_qn%ALLOCATE(nlayer, ndepth)
CALL self%state_qs%ALLOCATE(nlayer, ndepth)
CALL self%state_resist%ALLOCATE(nlayer, ndepth)
CALL self%state_qe%ALLOCATE(nlayer, ndepth)
CALL self%state_qh%ALLOCATE(nlayer, ndepth)
CALL self%state_tsurf%ALLOCATE(nlayer, ndepth)
CALL self%state_rsl%ALLOCATE(nlayer, ndepth)
CALL self%state_biogenco2%ALLOCATE(nlayer, ndepth)
CALL self%state_beers%ALLOCATE(nlayer, ndepth)
! CALL self%state_snow%init() ! unavailable - to be added #234
end subroutine init_suews_debug
SUBROUTINE init_suews_debug(self, nlayer, ndepth)
CLASS(SUEWS_DEBUG), INTENT(inout) :: self
INTEGER, INTENT(in) :: nlayer, ndepth

! Initialise the SUEWS_DEBUG type
CALL self%state_dailystate%ALLOCATE(nlayer, ndepth)
CALL self%state_soilmoist%ALLOCATE(nlayer, ndepth)
CALL self%state_wateruse%ALLOCATE(nlayer, ndepth)
CALL self%state_anthroemis%ALLOCATE(nlayer, ndepth)
CALL self%state_qn%ALLOCATE(nlayer, ndepth)
CALL self%state_qs%ALLOCATE(nlayer, ndepth)
CALL self%state_resist%ALLOCATE(nlayer, ndepth)
CALL self%state_qe%ALLOCATE(nlayer, ndepth)
CALL self%state_qh%ALLOCATE(nlayer, ndepth)
CALL self%state_tsurf%ALLOCATE(nlayer, ndepth)
CALL self%state_rsl%ALLOCATE(nlayer, ndepth)
CALL self%state_biogenco2%ALLOCATE(nlayer, ndepth)
CALL self%state_beers%ALLOCATE(nlayer, ndepth)
! CALL self%state_snow%init() ! unavailable - to be added #234
END SUBROUTINE init_suews_debug

SUBROUTINE output_line_init(self)
CLASS(output_line), INTENT(inout) :: self
Expand Down

0 comments on commit 245bd44

Please sign in to comment.