Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/offline/cable_driver_common.F90
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ SUBROUTINE cable_driver_init_site(site)
END SUBROUTINE cable_driver_init_site

SUBROUTINE cable_driver_init_default(dels, koffset, kend)
USE cable_io_vars_module, ONLY : syear
!! Model initialisation routine (default met specific).
REAL, INTENT(OUT) :: dels !! Time step size in seconds
INTEGER, INTENT(OUT) :: koffset !! Timestep to start at
Expand All @@ -274,6 +275,17 @@ SUBROUTINE cable_driver_init_default(dels, koffset, kend)
STOP 991
END IF

if (cable_user%YearStart == 0) cable_user%YearStart = syear

! This is done as the total simulation period is captured in the inner time
! step loop over ktau = kstart, kend for this configuration. If
! cable_user%YearEnd was specified, its value is already reflected in the
! value of kend from the above call to open_met_file. Here we overwrite
! cable_user%YearEnd to cable_user%YearStart so that the outer time loop over
! years is executed only once, and the inner time step loop captures the full
! simulation period.
cable_user%YearEnd = cable_user%YearStart

END SUBROUTINE cable_driver_init_default

SUBROUTINE cable_driver_init_plume(dels, koffset, PLUME)
Expand Down
Loading