added variable selection to make it compatible with sarah3
Change proposed in this Pull Request
I noticed that the code is not compatible with the novel SARAH-3 dataset as the input data has changed slightly.When reading with the existing code, it results into multiple variables which raises errors in the downstream conversion. Therefore, this fork propose to directly select the respective SIS and SID values making it compatible with the old and the new SARAH format. It uses double brackets to keep the same data type (xr.DataSet) as so far.
Description
Only changed the lines that read the SARAH netcdf files by directly selecting the data variables.
Motivation and Context
I had an issue opening SARAH -3 data with the existing code.
How Has This Been Tested?
I tested it with the old SARAH -2 data and the novel SARAH-3. Both works as expected. I was not sure if I should add unit tests because there are, as far as I have seen, no unit tests for the different datasets so far.
Type of change
- [x ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x ] I tested my contribution locally and it seems to work fine.
- [ ] I locally ran
pytestinside the repository and no unexpected problems came up. - [ ] I have adjusted the docstrings in the code appropriately.
- [ ] I have documented the effects of my code changes in the documentation
doc/. - [ ] I have added newly introduced dependencies to
environment.yamlfile. - [ ] I have added a note to release notes
doc/release_notes.rst. - [ ] I have used
pre-commit run --allto lint/format/check my contribution