Skip to content

Commit

Permalink
Set surface values to zero if all are masked (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kallekleiv authored Mar 24, 2021
1 parent bead8bd commit 726893c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#586](https://github.com/equinor/webviz-subsurface/pull/586) - Added phase ratio vs pressure and density vs pressure plots. Added unit and density functions to PVT library. Refactored code and added checklist for plots to be viewed in PVT plot plugin. Improved the layout.

### Fixed
- [#594](https://github.com/equinor/webviz-subsurface/pull/594) - Fixed bug in SurfaceViewerFMU where surfaces with only undefined values was not handled properly.
- [#584](https://github.com/equinor/webviz-subsurface/pull/584) - Fixed bug for in RelativePermeability plugin where it was not possible to plot against oil saturation axis when using relperm data of "family 2".

## [0.1.9] - 2021-02-23
Expand Down
3 changes: 3 additions & 0 deletions webviz_subsurface/_models/surface_leaflet_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def get_zvalues(
values = surface.values
if flip:
values = np.flip(values.transpose(), axis=0)
# If all values are masked set to zero
if values.mask.all():
values = np.zeros(values.shape)
return values

@property
Expand Down

0 comments on commit 726893c

Please sign in to comment.