Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | mb | |||
integer, | intent(in) | :: | mhyd |
subroutine reservoir_allocate_reservoir(mb, mhyd)
integer, intent(in) :: mb
integer, intent(in) :: mhyd
allocate(bRsvHydrograph(mhyd))
bRsvHydrograph = .false.
allocate(rsvSubbasin(mb))
rsvSubbasin = 0
allocate(rsv_funit(rsv_nReservoirs))
rsv_funit = 0
! allocate all reservoir module-specific arrays
allocate(Rsv(10, rsv_nReservoirs))
Rsv = 0.
allocate(rsv_dead_stor_act(rsv_nReservoirs))
rsv_dead_stor_act = 0.
allocate(rsv_Inflow(rsv_nReservoirs))
rsv_Inflow = 1.e-6
allocate(rsv_frac_sr(rsv_nReservoirs))
rsv_frac_sr = 0.
allocate(rsv_B(rsv_nReservoirs))
rsv_B = 0.
allocate(rsv_seepage(rsv_nReservoirs))
rsv_seepage = 1.e-6
allocate(rsv_Outflow(2, rsv_nReservoirs))
rsv_Outflow = 1.e-6
allocate(rsv_gwq(rsv_nReservoirs))
rsv_gwq = 1.e-6
allocate(rsv_Day_Cap_Act(rsv_nReservoirs))
rsv_Day_Cap_Act = 0.
allocate(rsv_Day_Fill_Min(rsv_nReservoirs))
rsv_Day_Fill_Min = 0.
allocate(rsv_Day_ann_cycle(rsv_nReservoirs))
rsv_Day_ann_cycle = 0.
allocate(rsv_Day_Disch_Min(rsv_nReservoirs))
rsv_Day_Disch_Min = 0.
allocate(rsv_act_withdrawal(rsv_nReservoirs))
rsv_act_withdrawal = 0.
allocate(rsv_water_level(rsv_nReservoirs))
rsv_water_level = 0.
allocate(rsv_height_hpp(rsv_nReservoirs))
rsv_height_hpp = 0.
allocate(rsv_Prod_HPP(rsv_nReservoirs))
rsv_Prod_HPP = 0.
allocate(rsv_tot_area(rsv_nReservoirs))
rsv_tot_area = 0.
! reservoir parameter, read from reservoir.ctrl
! dimension(rsv_nReservoirs)
allocate(rsv_ResNames(rsv_nReservoirs))
rsv_ResNames = ''
allocate(rsv_Capac_Max(rsv_nReservoirs))
rsv_Capac_Max = 0.
allocate(rsv_dead_stor_capac(rsv_nReservoirs))
rsv_dead_stor_capac = 0.
allocate(rsv_Start_Fill(rsv_nReservoirs))
rsv_Start_Fill = 0.
allocate(rsv_active(rsv_nReservoirs))
rsv_active = .false.
allocate(rsv_activate_thresh(rsv_nReservoirs))
rsv_activate_thresh = 0.
allocate(rsv_level_max(rsv_nReservoirs))
rsv_level_max = 0.
allocate(rsv_level_min(rsv_nReservoirs))
rsv_level_min = 0.
allocate(rsv_level_hpp(rsv_nReservoirs))
rsv_level_hpp = 0.
allocate(rsv_cap_hpp(rsv_nReservoirs))
rsv_cap_hpp = 0.
allocate(rsv_eff_hpp(rsv_nReservoirs))
rsv_eff_hpp = 0.
allocate(rsv_loss_seepage(rsv_nReservoirs))
rsv_loss_seepage = 0.
allocate(rsv_gwc(rsv_nReservoirs))
rsv_gwc = 0.
allocate(rsv_evapc(rsv_nReservoirs))
rsv_evapc = 0.
allocate(rsv_start_year(rsv_nReservoirs))
rsv_start_year = 0
allocate(rsv_start_day(rsv_nReservoirs))
rsv_start_day = 0
allocate(rsv_Mngmt(rsv_nReservoirs))
rsv_Mngmt = 0
allocate(rsv_shr_withdr(rsv_nReservoirs))
rsv_shr_withdr = 0.
! monthly reservoir data, read from 'reservoir_monthly.csv'
! dimension(rsv_nReservoirs, 0:12) 1-12 = Jan-Dec; 0 = Dec (easier to apply month-1)
allocate(rsv_Cap_Act(rsv_nReservoirs, 0:12))
rsv_Cap_Act = 0.
allocate(rsv_Fill_Min(rsv_nReservoirs, 0:12))
rsv_Fill_Min = 0.
allocate(rsv_Dis_Min_Fill(rsv_nReservoirs, 0:12))
rsv_Dis_Min_Fill = 0.
allocate(rsv_Dis_Min_Act(rsv_nReservoirs, 0:12))
rsv_Dis_Min_Act = 0.
allocate(rsv_Withdr_Mon(rsv_nReservoirs, 0:12))
rsv_Withdr_Mon = 0.
allocate(rsv_ann_cycle(rsv_nReservoirs, 0:12))
rsv_ann_cycle = 0.
allocate(rsv_Disch_Min(rsv_nReservoirs, 0:12))
rsv_Disch_Min = 0.
! storage parameters, read from 'reservoir_storage_conf.csv'
! dimension(rsv_nReservoirs, 20)
allocate(rsv_pol_L(rsv_nReservoirs, 20))
rsv_pol_L = 0.
allocate(rsv_pol_L2(rsv_nReservoirs, 20))
rsv_pol_L2 = 0.
allocate(rsv_pol_A(rsv_nReservoirs, 20))
rsv_pol_A = 0.
allocate(rsv_pol_V(rsv_nReservoirs, 20))
rsv_pol_V = 0.
allocate(rsv_pol_HP(rsv_nReservoirs, 20))
rsv_pol_HP = 0.
! previous day arrays
allocate(pd_outflow(rsv_nReservoirs))
pd_outflow = 1.e-6
allocate(pd_seepage(rsv_nReservoirs))
pd_seepage = 1.e-6
allocate(pd_area_wet(rsv_nReservoirs))
pd_area_wet = 1.e-6
allocate(pd_et(rsv_nReservoirs))
pd_et = 1.e-6
allocate(pd_gwq(rsv_nReservoirs))
pd_gwq = 1.e-6
allocate(pd_gwseep(rsv_nReservoirs))
pd_gwseep = 1.e-6
allocate(pd_gwchrg(rsv_nReservoirs))
pd_gwchrg = 1.e-6
allocate(pd_wysb(rsv_nReservoirs))
pd_wysb = 1.e-6
end subroutine reservoir_allocate_reservoir