ESCOMP / ESCOMP/mizuRoute

Clean up and refactoring related routing method indices

Open
#483 0 comments 0 reactions 1 assignee Claimed by @nmizukami View on GitHub
cleanup enhancement infrastructure low priority
Dominant language
Fortran
Stars
59
Forks
73
Avg merge
5d 22h
Merged PRs (30d)
2

Description

Erik (@ekluzek) suggested this, and use [write_restart_pio.f90](https://github.com/ESCOMP/mizuRoute/pull/482/files/2c01d88e1cf750815d8a3ac2aa3e94a61cdfe57b#diff-fc17794cea08939ea2153c09862e61f01e2dd7cf4536bf3f03070e580f98290f) etc.

``` fortran
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.