Skip to content

Clean up and refactoring related routing method indices #483

Open

Description

@nmizukami

Erik (@ekluzek) suggested this, and use write_restart_pio.f90 etc.

pure integer function get_routing_index(routing_method_name) result(route_indices)
  implicit none
  integer(i4b) :: route_indices(3) ! route_indices(1)->routeRunoff index, route_indices(2)->volume index, route_indices(2)->inflow index
  select case(routing_method_name)
    case(accumRunoff)
      route_indices(:) = -1
    case(kinematicWaveTracking)
      route_indices(1) = ixRFLX%KWTroutedRunoff
      route_indices(2) = ixRFLX%KWTvolume
      route_indices(3) = ixRFLX%KWTinflow
    case(ImpulseResponseFunction)
      route_indices(1) = ixRFLX%IRFroutedRunoff
      route_indices(2) = ixRFLX%IRFvolume
      route_indices(3) = ixRFLX%IRFinflow
    case (...)
     .....
    default
      route_indices(:) = -999
  end select
end function get_routing_index

With this function, may allow us to use do loop to write output etc.

Activity

  1. self-assigned this
    on Sep 20, 2024
  2. added
    cleanupclean up the codes (remove unnecessary lines, indentation, styles)
    on Sep 20, 2024
  3. added
    enhancementImproving usability, performance or other types of enhancements
    low priorityno immediate attention needed
    infrastructureissues or code changes related to code organization, data structure, refactoring
    on Dec 18, 2024
  4. added
    no answer changechange does not change any simulation result - should be bit-to-bit identical
    on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cleanupclean up the codes (remove unnecessary lines, indentation, styles)enhancementImproving usability, performance or other types of enhancementsinfrastructureissues or code changes related to code organization, data structure, refactoringlow priorityno immediate attention neededno answer changechange does not change any simulation result - should be bit-to-bit identical

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions