Improve missing data handling in forecast bias correction
I recently put together some test cases to document subtleties of the forecast bias-correction process. One behavior that I'm wondering about is described / shown in a test case here: https://gitlab.com/isciences/wsim/wsim2/blob/master/wsim.distributions/tests/testthat/test_forecast_correct.R#L46 (description from that link: "if the observed location value is known, but the other distribution parameters are not, then the corrected value is the observed location value.")
The only practical implication of this I can see is to effectively hardcode precipitation forecasts at zero in certain pixels in arid regions. (Any precipitation forecast by CFS will be replaced by zero.) This occurs where we do not have complete fitted distributions of historical observations, but have the defined the distribution's location parameter to be zero. In general, the precipitation amounts being removed are very small (less than 1 mm), but some are substantially larger.
Here is a histogram of forecast precipitation amounts in the 2243 cells that meet this condition in June 2017:
The image below shows some forecast precipitation (mm) that was dropped this June:
Looking at the observed data, there was in fact no precipitation in these cells in June.
Here's another example, in northern Chile:
The area in Chile did actually have precipitation in June, as shown in the observed data:
Do you think this behavior is desired? I was wondering if it had been put in place to avoid high "surplus" values when small amounts of precipitation fall in arid regions.