Skip to content

Simplify layered geometry: remove dead code, fix 3D plot#915

Open
ecomodeller wants to merge 6 commits intomainfrom
refactor/simplify_layered_init
Open

Simplify layered geometry: remove dead code, fix 3D plot#915
ecomodeller wants to merge 6 commits intomainfrom
refactor/simplify_layered_init

Conversation

@ecomodeller
Copy link
Member

@ecomodeller ecomodeller commented Feb 17, 2026

Summary

  • Remove redundant __init__ from GeometryFM3D and GeometryFMVerticalProfile that only called super().__init__() with the same args
  • Replace self.plot attribute assignment with @cached_property, consistent with other geometry classes
  • 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 dead code and commented-out methods
  • Inline _calc_dz into _dz cached property
  • Fix DataArrayPlotterFM.mesh/outline to use 2D geometry for layered data
  • Clean up GeometryFMVerticalColumn: simplify _idx_e, use cached_property, add docstrings
  • Replace legacy scipy.interpolate.interp1d with make_interp_spline(k=1) in vertical interpolation

- 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
@ecomodeller ecomodeller changed the title Remove redundant __init__. Use property for plotter instead of attribute Simplify layered geometry: remove dead code, fix 3D plot Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant