Closed remicousin closed 9 months ago
@aaron-kaplan maybe it's time to put this one back on your radar.
There are conflicts. Please rebase.
Addressed latest reviews through commit or comments. Rebased, passed tests, Senegal Wat Bal Monit Maproom looks to work ok.
@aaron-kaplan , in anticipation of apparent wake-up from AICCRA Senegal project, it may be good to merge this sooner than later.
Adding other desired variables derived from the water balance. Some of the work revealed some problems and called some fixes. Each commit is about one of those variables and their associated fix so it can be easier to read commit by commit. The last commit adds the definition of the new variables.
The first commit adding PAW revealed that a previous change broke the capacity to click the ts to pick a day to map. This broke because we removed the year from the abscissas of the graph so we have to get that year back to select the right day.
In adding water excess (2nd commit), I dropped a comment that may or may not call for a change in pingrid. Likely not: it's about having a test return NaN instead of False when one of the compared objects is NaN.
To add effective precipitation (3rd commit), I had to introduce the runoff calculation of the water balance. In runoff function, I had dropped all NaNs with the intention to get rid of the first few days made NaN by the rolling of api. It turns out this was a bit brutal because it would alter the shape of tiles that have coordiantes out of the domain of data definition. So instead I changed api to specifically drop the first few days; and I had runoff stop dropping NaNs.
There are some more variables to add but these make only sense (both in space and time) with a variable ET, so need to be able to input such an ET first (which is in the plans once I compute an ET climatology).