reservoir_is_operational Function

public function reservoir_is_operational(year, day, sub)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: year
integer, intent(in) :: day
integer, intent(in) :: sub

Return Value logical


Calls

proc~~reservoir_is_operational~~CallsGraph proc~reservoir_is_operational reservoir_is_operational proc~reservoir_get reservoir_get proc~reservoir_is_operational->proc~reservoir_get

Called by

proc~~reservoir_is_operational~~CalledByGraph proc~reservoir_is_operational reservoir_is_operational proc~time_process_day time_process_day proc~time_process_day->proc~reservoir_is_operational proc~time_process_month time_process_month proc~time_process_month->proc~time_process_day proc~time_process_years time_process_years proc~time_process_years->proc~time_process_month program~swim swim program~swim->proc~time_process_years

Contents


Source Code

  logical function reservoir_is_operational(year, day, sub)

    ! check, if reservoir is already operating
    integer, intent(in) :: year, day, sub
    integer :: res = 0

    reservoir_is_operational = .false.
    res = reservoir_get(sub)
    if (res > 0) then
      if (year > rsv_start_year(res) ) reservoir_is_operational = .true.
      if (year == rsv_start_year(res) .AND. day >= rsv_start_day(res) ) reservoir_is_operational = .true.
    end if
  end function reservoir_is_operational