mizuRoute icon indicating copy to clipboard operation
mizuRoute copied to clipboard

Clean up and refactoring related routing method indices

Open nmizukami opened this issue 1 year ago • 0 comments

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 avatar Sep 20 '24 12:09 nmizukami