Grid mask support
Merge request reports
Activity
Filter activity
added 1 commit
- 980bda8e - Grid: add methods to convert compressed data
mentioned in issue #110
Some decisions form Martin, Tom and me:
- always use NaN to indicate masked values in data arrays
- we can't use masked numpy arrays, since they have a deep issue with pint: https://github.com/hgrecco/pint/issues/1776
- problem is integer arrays, since NaN only works with float, other libraries have same problem (xarray, pandas)
- we need to add dtype information to the
Info
container which should be float by default #109
- Resolved by Sebastian Müller
@mlange this is the implementation I was talking about. Basic idea is, that model developers could use the flag
compressed
within their model-components when pulling data from Inputs and pushing data to Outputs. All other components don't change their behavior.Intended usage:
def _update(self): self._time += self._step a = self.inputs["A"].pull_data(self.time, compressed=True) b = self.inputs["B"].pull_data(self.time, compressed=True) result = a * b self.outputs["Prod"].push_data(result, self.time, compressed=True)
added 1 commit
- 068ee167 - io_helper: add helper routines pull_/push_compressed
added 1 commit
- e1efdc4d - io_helper: rename io-object to io to satisfy pylint
added 1 commit
- 0ea98d01 - Grid: add 'check_mask' argument to 'compatible_with' method
added 2 commits
added 2 commits
added 1 commit
- f1cca6eb - info: check grids not None before mask checking
added 1 commit
- 45db43c5 - Masking: incorporate 'missing_value' meta data
Please register or sign in to reply