set reservoir subbasins of array rsvSubbasin
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:) | :: | icodes | ||
integer, | intent(in), | dimension(:) | :: | inum1s | ||
integer, | intent(in) | :: | mb | |||
integer, | intent(in) | :: | mhyd |
subroutine reservoir_initialise(icodes, inum1s, mb, mhyd)
use input, only: get_config_fid
integer, dimension(:), intent(in) :: icodes
integer, dimension(:), intent(in) :: inum1s
integer, intent(in) :: mb
integer, intent(in) :: mhyd
read(get_config_fid(), RESERVOIR_PARAMETERS)
call reservoir_allocate
if (bRsvModule) then
call log_warn("reservoir_initialise", "Reservoir MODULE IS ACTIVE !!!")
!-----------------------------------------------------------------
! read reservoir input files and allocate arrays
!-----------------------------------------------------------------
! calls RSV_allocate_reservoir
call reservoir_read_control_file(mb, mhyd) ! reservoir.ctrl
call reservoir_read_month_file ! reservoir_monthly.csv
call reservoir_read_storage_file ! reservoir_storage_conf.csv
!-----------------------------------------------------------------
! set reservoir subbasins of array rsvSubbasin
call reservoir_init_subbasin
! get bRsvHydrograph
call reservoir_routing(icodes, inum1s, mb, mhyd)
! initialise filling status etc.
call reservoir_initial_values
! open output files
call reservoir_open_output
call log_info("reservoir_initialise", "Number of reservoir subbasins: ", &
int=rsv_nReservoirs)
call log_info("reservoir_initialise", "Reservoir number(s)", ints=rsv_ResSubbasins)
end if
end subroutine reservoir_initialise