management_is_active_period Function

public function management_is_active_period(year, day, pWU)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: year
integer, intent(in) :: day
type(TWaterUser), POINTER:: pWU

Return Value logical


Called by

proc~~management_is_active_period~~CalledByGraph proc~management_is_active_period management_is_active_period proc~management_total_demand management_total_demand proc~management_total_demand->proc~management_is_active_period proc~vegetation_water_stress vegetation_water_stress proc~vegetation_water_stress->proc~management_is_active_period proc~management_external_supply management_external_supply proc~management_external_supply->proc~management_is_active_period proc~management_distribribute management_distribribute proc~management_distribribute->proc~management_is_active_period proc~management_transfer_out management_transfer_out proc~management_transfer_out->proc~management_is_active_period proc~hydrotope_process hydrotope_process proc~hydrotope_process->proc~management_is_active_period proc~crop_process crop_process proc~hydrotope_process->proc~crop_process proc~vegetation_process vegetation_process proc~hydrotope_process->proc~vegetation_process proc~runsubbasin runsubbasin proc~runsubbasin->proc~management_transfer_out proc~runsubbasin->proc~hydrotope_process proc~time_process_day time_process_day proc~time_process_day->proc~management_total_demand proc~time_process_day->proc~management_external_supply proc~time_process_day->proc~runsubbasin proc~river_route_add river_route_add proc~time_process_day->proc~river_route_add proc~crop_process->proc~vegetation_water_stress proc~vegetation_process->proc~vegetation_water_stress proc~river_route_add->proc~management_transfer_out 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 management_is_active_period(year, day, pwu)
    ! returns .true. if period defined by first and last year AND day_irr_start and day_irr_end is true
    integer, intent(in) :: year, day
    TYPE (TWaterUser), POINTER :: pWU

    management_is_active_period = .false.

    if (year >= pWU % fyr .AND. year <= pWU % lyr) then
      if (pWU % day_irr_start < pWU % day_irr_end) then
        if (day >= pWU % day_irr_start .AND. day <= pWU % day_irr_end) management_is_active_period = .true.
      else
        if (day >= pWU % day_irr_end .AND. day <= pWU % day_irr_start) management_is_active_period = .true.
      end if
    end if !(year)

  end function management_is_active_period