output_hydrotope_to_subbasin Function

public function output_hydrotope_to_subbasin(hydrotope_values) result(subbasin_values)

Arguments

Type IntentOptional AttributesName
real, intent(in) :: hydrotope_values(output_nhydrotopes)

Return Value real (output_nsubbasins)


Called by

proc~~output_hydrotope_to_subbasin~~CalledByGraph proc~output_hydrotope_to_subbasin output_hydrotope_to_subbasin proc~output_day output_day proc~output_day->proc~output_hydrotope_to_subbasin proc~time_process_day time_process_day proc~time_process_day->proc~output_day 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

  function output_hydrotope_to_subbasin(hydrotope_values) result(subbasin_values)
    ! Average hydrotope values to subbasins
    real, intent(in) :: hydrotope_values(output_nhydrotopes)
    real :: subbasin_values(output_nsubbasins)
    integer h, hsix
    real share

    subbasin_values = 0
    do h = 1, output_nhydrotopes
      hsix = output_hydrotope_subbasin_ix(h)
      share = hydrotope_values(h) * output_hydrotope_subbasin_share(h)
      subbasin_values(hsix) = subbasin_values(hsix) + share
    end do
  end function output_hydrotope_to_subbasin