glemieux / E3SM

Energy Exascale Earth System Model source code.
https://e3sm.org/
Other
0 stars 0 forks source link

Develop global seed dispersal unit test check #7

Open glemieux opened 2 years ago

glemieux commented 2 years ago

Currently, we are testing for mass conservation, by plotting the amount of seeds out against the expected amount of seeds in. This is easy enough to visualize as a check for two gridcells, but with a full global run we need a better unit test for this. This will be complicated in the future by the fact that we will want to "lose" mass to non-vegetated land units and will need to keep track of an error term.

glemieux commented 2 years ago

Another complicating factor with this is how to handle the coordination of when seeds input/output is calculated and dispersed. Currently we are calculating both inputs and outputs with the SeedIn routine which occurs prior to mpi calls to disperse the seeds. As such, there will be some sort of "lag" in the calculation that needs to be considered.

glemieux commented 1 year ago

Overriding the dispersal parameters and/or distances to input as a zero into the exponential terms of the dispersal kernel is one way to test the rest of the code and math around dispersal. Thinking about this made me realize that this likely isn't one unit test, but multiple separate unit tests.

From a semantic standpoint, unit tests are really at the procedure level. Even then, some of these would be difficult to develop as unit tests given the amount of infrastructure needed for some of them that is not easily replicated.