Simplify layered geometry: remove dead code, fix 3D plot#915
Open
ecomodeller wants to merge 6 commits intomainfrom
Open
Simplify layered geometry: remove dead code, fix 3D plot#915ecomodeller wants to merge 6 commits intomainfrom
ecomodeller wants to merge 6 commits intomainfrom
Conversation
- Replace manual lazy-init of e2_e3_table/elem2d_ids/layer_ids with a single _2d_to_3d_association cached_property - Remove redundant n_elements/n_nodes already inherited from parent - Remove commented-out _find_3d_from_2d_points method - Inline _calc_dz into _dz cached_property
…plot - Remove dead _bot_elems attribute (unused since Jan 2022) - Remove stale TODO comment from GeometryFMVerticalColumn - Simplify _idx_e (np.stack instead of manual loop), use cached_property - Consolidate zn defaulting into _calc_z, add docstrings for ze/zf/zee - Remove redundant interp1d kwargs that match defaults - Replace GeometryFM3D.plot with AttributeError guiding users to .to_2d_geometry().plot instead - Fix DataArrayPlotterFM.mesh/outline to use 2D geometry for layered data - Add test for vertical column plot with extrapolation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
__init__fromGeometryFM3DandGeometryFMVerticalProfilethat only calledsuper().__init__()with the same argsself.plotattribute assignment with@cached_property, consistent with other geometry classese2_e3_table/elem2d_ids/layer_idswith a single_2d_to_3d_associationcached propertyn_elements/n_nodesalready inherited from parent_calc_dzinto_dzcached propertyDataArrayPlotterFM.mesh/outlineto use 2D geometry for layered dataGeometryFMVerticalColumn: simplify_idx_e, usecached_property, add docstringsscipy.interpolate.interp1dwithmake_interp_spline(k=1)in vertical interpolation