management_distribribute Subroutine

public subroutine management_distribribute(pS, withdrawal_act, daycounter, ida, iyr)


If there is enough water to satisfy total demand of all users in subbasin


TSub (current subbasin)

add actual withdrawals of all water users from source subbasin


TWU (current water user)

calculate volume delivered to water user


Irrigation

account for irrigation water users !! pWU%supplied should not be added to %inflow, because the irrigation supply is added in hydrotope !! %inflow is added to sda or varoute in "subbasin" and/or "add"

--------------------------------------------------------------

        *****

If there is NOT enough water to satisfy total demand of all users in subbasin *



TSub (current subbasin)


TWU (current water user)

add actual withdrawals of all water users from source subbasin


Irrigation

account for irrigation water users !! pWU%supplied should not be added to %inflow, because the irrigation supply is added in hydrotope !! %inflow is added to sda or varoute in "subbasin" and/or "add"


Arguments

Type IntentOptional Attributes Name
type(TSubbasin), POINTER :: pS
real(kind=dp), intent(in) :: withdrawal_act
integer, intent(in) :: daycounter
integer, intent(in) :: ida
integer, intent(in) :: iyr

Calls

proc~~management_distribribute~~CallsGraph proc~management_distribribute management_distribribute proc~management_is_active_period management_is_active_period proc~management_distribribute->proc~management_is_active_period proc~management_subbasin_pointer management_subbasin_pointer proc~management_distribribute->proc~management_subbasin_pointer proc~management_user_pointer management_user_pointer proc~management_distribribute->proc~management_user_pointer proc~log_error log_error proc~management_user_pointer->proc~log_error proc~log_message log_message proc~log_error->proc~log_message proc~log_format_message log_format_message proc~log_message->proc~log_format_message proc~log_write log_write proc~log_message->proc~log_write proc~colourise colourise proc~log_format_message->proc~colourise proc~date_time_str date_time_str proc~log_format_message->proc~date_time_str proc~to_string to_string proc~log_write->proc~to_string proc~string_index string_index proc~colourise->proc~string_index