knbarton / ners570-finalproject

Ners 570 Final Project
1 stars 1 forks source link

Write module subroutines for u,v, and h #16

Closed littlewatkins closed 3 years ago

littlewatkins commented 3 years ago

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:

knbarton commented 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?

littlewatkins commented 3 years ago

That would be great, yes! I've done the first one for u, but haven't tested it.

littlewatkins commented 3 years ago

The subroutine module was merged into main