landuse_index Function

public function landuse_index(id)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: id

Return Value integer


Calls

proc~~landuse_index~~CallsGraph proc~landuse_index landuse_index proc~log_error log_error proc~landuse_index->proc~log_error proc~log_message log_message proc~log_error->proc~log_message proc~log_write log_write proc~log_message->proc~log_write proc~log_format_message log_format_message proc~log_message->proc~log_format_message proc~to_string to_string proc~log_write->proc~to_string proc~date_time_str date_time_str proc~log_format_message->proc~date_time_str proc~colourise colourise proc~log_format_message->proc~colourise proc~string_index string_index proc~colourise->proc~string_index

Called by

proc~~landuse_index~~CalledByGraph proc~landuse_index landuse_index proc~landuse_is_natural_vegetation landuse_is_natural_vegetation proc~landuse_is_natural_vegetation->proc~landuse_index proc~landuse_is_cropland landuse_is_cropland proc~landuse_is_cropland->proc~landuse_index proc~hydrotope_process hydrotope_process proc~hydrotope_process->proc~landuse_index proc~hydrotope_process->proc~landuse_is_natural_vegetation proc~hydrotope_process->proc~landuse_is_cropland proc~landuse_is_forest landuse_is_forest proc~hydrotope_process->proc~landuse_is_forest proc~crop_process crop_process proc~hydrotope_process->proc~crop_process proc~vegetation_process vegetation_process proc~hydrotope_process->proc~vegetation_process proc~landuse_is_forest->proc~landuse_index proc~vegetation_temperature_stress vegetation_temperature_stress proc~vegetation_temperature_stress->proc~landuse_is_cropland proc~vegetation_water_stress vegetation_water_stress proc~vegetation_water_stress->proc~landuse_is_cropland proc~runsubbasin runsubbasin proc~runsubbasin->proc~landuse_is_cropland proc~runsubbasin->proc~hydrotope_process proc~runsubbasin->proc~landuse_is_forest proc~crop_process->proc~vegetation_water_stress proc~crop_growth crop_growth proc~crop_process->proc~crop_growth proc~vegetation_process->proc~vegetation_temperature_stress proc~vegetation_process->proc~vegetation_water_stress proc~crop_growth->proc~vegetation_temperature_stress proc~time_process_day time_process_day proc~time_process_day->proc~runsubbasin 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


Source Code

  integer function landuse_index(id) ! get land / cover use index
    ! Return the position/line number/index of the land use cover entry in
    ! the *.lut file

    ! land use/cover ID from land use map, or variable 'n' as used in the rest of the SWIM code
    integer, intent(in) :: id
    integer :: i

    landuse_index = 0
    do i = 1, nlut
      if (LULC % id(i) == id ) then
        landuse_index = i
        EXIT
      end if
    end do
    if (landuse_index == 0) then
      call log_error("landuse_index", "Land use ID does not exist:", int=id)
    end if

  end function landuse_index