Closed littlewatkins closed 3 years ago
This sounds like a good idea! Do you want me to go ahead and get the basic model merged into main before you do this?
That would be great, yes! I've done the first one for u, but haven't tested it.
The subroutine module was merged into main
Issue
For better test-driven development, the "compute next u, v, and h steps" in
tsunami.f90
should be written as subroutines in a module. This way, the output can be tested for verification. While, they probably could be functions, I'll write them as a subroutine so that I can test them using f2py and pytest.For example:
u = u - (u * diffx(u) / dx + v * diffy(u) / dy & + g * diffx(h) / dx) * dt
should have a definitely known output for given input parameters that we would know by hand. Then we write the test to confirm we have everything like parentheses in the correct place.This issue will be complete when we have subroutines for: