flux and state data structure organization

Open
#76 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
fortran
Domain
backend

Research direction

No files or tests are named. Start by locating route_opt, STRFLX, and KREACH, then trace how routing schemes are selected and how flux and state data are shared. Done means the routing organization supports one scheme per simulation, with shared flux data and separate state structures for schemes as appropriate.

Written by the indexing model from the issue text.

Description

enhancement question

It is proposed that one routing scheme is used for one simulation (i.e., remove route_opt = 0, route with all the schemes), because as new routing schemes are added, using all the schemes at the same run is not practical.

With this in mind, there might be need for re-organization of flux data structure (STRFLX) and state data structures (KREACH for kinematic wave).

Suggestion

For Flux, the same data structure is shared with different routing schemes
e.g.,

TYPE, public :: STRFLX
   real(dp)           :: BASIN_QI      ! instantaneous runoff volume from the local basin (m3/s)
   real(dp)           :: BASIN_QR(0:1) ! routed runoff volume from the local basin (m3/s)
   real(dp)           :: REACH_Q       ! time-step average streamflow (m3/s)
   real(dp)           :: UPSTREAM_QI   ! sum of upstream streamflow (m3/s)
   real(dp)           :: TAKE          ! average take
   logical(lgt)       :: CHECK_ROUTE   ! .true. if the reach is routed
END TYPE STRFLX

For states, each scheme has different state variable. so separate, unique data structure needs to be defined.

Dominant language
Fortran
Stars
62
Forks
73
Avg merge
3d 8h
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ESCOMP/mizuRoute

All issues in ESCOMP/mizuRoute

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.