move_lines Subroutine

public subroutine move_lines(file_id, n)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file_id
integer, intent(in) :: n

Called by

proc~~move_lines~~CalledByGraph proc~move_lines move_lines proc~read_logical_column read_logical_column proc~read_logical_column->proc~move_lines proc~header_column_index header_column_index proc~read_logical_column->proc~header_column_index proc~header_column_index->proc~move_lines proc~read_string_column read_string_column proc~read_string_column->proc~move_lines proc~read_string_column->proc~header_column_index proc~read_real_column read_real_column proc~read_real_column->proc~move_lines proc~read_real_column->proc~header_column_index proc~read_integer_column read_integer_column proc~read_integer_column->proc~move_lines proc~read_integer_column->proc~header_column_index proc~snow_read_input snow_read_input proc~snow_read_input->proc~read_real_column proc~reservoir_read_storage_file reservoir_read_storage_file proc~reservoir_read_storage_file->proc~read_real_column proc~evapotranspiration_read_input evapotranspiration_read_input proc~evapotranspiration_read_input->proc~read_real_column proc~management_read_ctrl management_read_ctrl proc~management_read_ctrl->proc~read_string_column proc~management_read_ctrl->proc~read_real_column proc~management_read_ctrl->proc~read_integer_column proc~soil_read_input soil_read_input proc~soil_read_input->proc~read_string_column proc~groundwater_read_input groundwater_read_input proc~groundwater_read_input->proc~read_real_column proc~reservoir_read_month_file reservoir_read_month_file proc~reservoir_read_month_file->proc~read_real_column proc~catchment_read_subcatch_params catchment_read_subcatch_params proc~catchment_read_subcatch_params->proc~read_real_column proc~catchment_read_subcatch_params->proc~read_integer_column proc~river_read_input river_read_input proc~river_read_input->proc~read_real_column proc~subbasin_read_climate subbasin_read_climate proc~subbasin_read_climate->proc~read_real_column proc~has_column has_column proc~has_column->proc~header_column_index proc~subbasin_read_routing subbasin_read_routing proc~subbasin_read_routing->proc~read_integer_column proc~crop_read_management_input crop_read_management_input proc~crop_read_management_input->proc~read_real_column proc~crop_read_management_input->proc~read_integer_column proc~crop_read_input crop_read_input proc~crop_read_input->proc~read_string_column proc~crop_read_input->proc~read_real_column proc~crop_read_input->proc~read_integer_column proc~subbasin_read_input subbasin_read_input proc~subbasin_read_input->proc~read_string_column proc~subbasin_read_input->proc~read_real_column proc~subbasin_read_input->proc~read_integer_column proc~subbasin_initialise subbasin_initialise proc~subbasin_initialise->proc~header_column_index proc~subbasin_initialise->proc~subbasin_read_routing proc~subbasin_initialise->proc~subbasin_read_input proc~subbasin_allocate_obs_discharge subbasin_allocate_obs_discharge proc~subbasin_initialise->proc~subbasin_allocate_obs_discharge proc~landuse_read_input landuse_read_input proc~landuse_read_input->proc~read_real_column proc~landuse_read_input->proc~read_integer_column proc~hydrotope_read_input hydrotope_read_input proc~hydrotope_read_input->proc~read_real_column proc~hydrotope_read_input->proc~read_integer_column proc~reservoir_read_control_file reservoir_read_control_file proc~reservoir_read_control_file->proc~read_logical_column proc~reservoir_read_control_file->proc~read_string_column proc~reservoir_read_control_file->proc~read_real_column proc~reservoir_read_control_file->proc~read_integer_column proc~output_initialise_labelled output_initialise_labelled proc~output_initialise_labelled->proc~read_string_column proc~output_initialise_labelled->proc~has_column proc~erosion_read_input erosion_read_input proc~erosion_read_input->proc~read_real_column proc~management_read_time_series management_read_time_series proc~management_read_time_series->proc~read_real_column proc~time_initialise_year time_initialise_year proc~time_initialise_year->proc~read_real_column proc~erosion_initialise erosion_initialise proc~erosion_initialise->proc~erosion_read_input proc~reservoir_initialise reservoir_initialise proc~reservoir_initialise->proc~reservoir_read_storage_file proc~reservoir_initialise->proc~reservoir_read_month_file proc~reservoir_initialise->proc~reservoir_read_control_file proc~output_initialise_storage output_initialise_storage proc~output_initialise_storage->proc~output_initialise_labelled proc~initialise initialise proc~initialise->proc~crop_read_input proc~initialise->proc~subbasin_initialise proc~initialise->proc~erosion_initialise proc~initialise->proc~reservoir_initialise proc~snow_initialise snow_initialise proc~initialise->proc~snow_initialise proc~catchment_initialise_parameters catchment_initialise_parameters proc~initialise->proc~catchment_initialise_parameters proc~landuse_initialise landuse_initialise proc~initialise->proc~landuse_initialise proc~crop_initialise crop_initialise proc~initialise->proc~crop_initialise proc~soil_initialise soil_initialise proc~initialise->proc~soil_initialise proc~evapotranspiration_initialise evapotranspiration_initialise proc~initialise->proc~evapotranspiration_initialise proc~groundwater_initialise groundwater_initialise proc~initialise->proc~groundwater_initialise proc~river_initialise river_initialise proc~initialise->proc~river_initialise proc~hydrotope_initialise hydrotope_initialise proc~initialise->proc~hydrotope_initialise proc~management_initialise management_initialise proc~initialise->proc~management_initialise proc~output_initialise output_initialise proc~initialise->proc~output_initialise proc~snow_initialise->proc~snow_read_input proc~catchment_initialise_parameters->proc~catchment_read_subcatch_params proc~landuse_initialise->proc~landuse_read_input proc~crop_initialise->proc~crop_read_management_input proc~soil_initialise->proc~soil_read_input proc~subbasin_allocate_obs_discharge->proc~has_column proc~evapotranspiration_initialise->proc~evapotranspiration_read_input proc~management_read_wu_inout management_read_wu_inout proc~management_read_wu_inout->proc~management_read_time_series proc~time_process_years time_process_years proc~time_process_years->proc~time_initialise_year proc~time_process_month time_process_month proc~time_process_years->proc~time_process_month proc~groundwater_initialise->proc~groundwater_read_input proc~river_initialise->proc~river_read_input proc~hydrotope_initialise->proc~hydrotope_read_input proc~time_process_day time_process_day proc~time_process_day->proc~subbasin_read_climate proc~management_initialise->proc~management_read_ctrl proc~management_initialise->proc~management_read_wu_inout program~swim swim program~swim->proc~initialise program~swim->proc~time_process_years proc~time_process_month->proc~time_process_day proc~output_initialise->proc~output_initialise_storage

Contents

Source Code


Source Code

  subroutine move_lines(file_id, n)
    ! Move n lines forwards or backwards (if negative) in formatted sequential file
    integer, intent(in) :: file_id, n
    integer i
    if (n > 0) then  ! move forwards
      do i = 1, n
        read(file_id, '()')
      end do
    else if (n < 0) then  ! move backwards
      do i = 1, -1*n
        backspace file_id
      end do
    end if
  end subroutine move_lines