Geospatial analysis on chunked weather datasets was failing due to incorrectly shaped templates. We didn't catch this because there is no testing for it. #111 (still need to add this).
pvdeg.geospatial.output_template would always produce an output with a single chunk along the gid axis. This was fine when the input was not chunked because it is treated as 1 block, similar to how we would treat the input if it had a single chunk. The problem comes when the input xr.Dataset was chunked with more than one chunk along the gid axis. See the screenshot below, there was one chunk along the time axis (irrelevant) and many chunks along the gid axis.
This issue affected every geospatial.analysis call because the issue was the geospatial.output_template function incorrectly chunking the template, this caused geospatial.autotemplate to be broken, as well as the hard coded cases within the geospatial.analysis function. Both of the previous functions utilize the output_template function. This highlights the need for chunked templating testing as well.
Issue ticket number and link
Type of change
Please delete options that are not relevant.
[x] Bug fix (non-breaking change which fixes an issue)
[x] This change requires a documentation update
Checklist before requesting a review
[x] I have performed a self-review of my code
[x] Code changes are covered by tests.
[x] Code changes have been evaluated for compatibility/integration with Scenario analysis (for future PRs)
[ ] API.rst is up to date, along with other sphinx docs pages
[x] Example notebooks are rerun and differences in results scrutinized
[x] What's new changelog has been updated in the docs
Describe your changes
Geospatial analysis on chunked weather datasets was failing due to incorrectly shaped templates. We didn't catch this because there is no testing for it. #111 (still need to add this).
pvdeg.geospatial.output_template
would always produce an output with a single chunk along the gid axis. This was fine when the input was not chunked because it is treated as 1 block, similar to how we would treat the input if it had a single chunk. The problem comes when the inputxr.Dataset
was chunked with more than one chunk along the gid axis. See the screenshot below, there was one chunk along the time axis (irrelevant) and many chunks along the gid axis.This issue affected every
geospatial.analysis
call because the issue was thegeospatial.output_template
function incorrectly chunking the template, this causedgeospatial.autotemplate
to be broken, as well as the hard coded cases within thegeospatial.analysis
function. Both of the previous functions utilize the output_template function. This highlights the need for chunked templating testing as well.Issue ticket number and link
Type of change
Please delete options that are not relevant.
Checklist before requesting a review