Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up and refactoring related routing method indices #483

Open
nmizukami opened this issue Sep 20, 2024 · 0 comments
Open

Clean up and refactoring related routing method indices #483

nmizukami opened this issue Sep 20, 2024 · 0 comments
Assignees
Labels
cleanup clean up the codes (remove unnecessary lines, indentation, styles)

Comments

@nmizukami
Copy link
Collaborator

nmizukami commented Sep 20, 2024

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.

@nmizukami nmizukami self-assigned this Sep 20, 2024
@nmizukami nmizukami added the cleanup clean up the codes (remove unnecessary lines, indentation, styles) label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup clean up the codes (remove unnecessary lines, indentation, styles)
Projects
None yet
Development

No branches or pull requests

1 participant