Skip to content
Snippets Groups Projects

Add mask to Info object

Merged Sebastian Müller requested to merge add_info_mask into main
All threads resolved!

Closes #124 (closed) #118 (closed) #111 (closed) #113 (closed)

Enhancements

  • added Mask enum with two options:
    • Mask.FLEX for flexible masking
    • Mask.NONE to explicitly use plain numpy arrays
  • added mask attribute and init-arg to Info : can be a Mask value or a valid mask for numpy.ma.MaskedArray
  • data.tools.prepare now applies masks to data if set in Info object
  • ARegridding now has a out_mask arg
  • RegridNearest and RegridLinear now support explicitly masked data (input doesn't have Mask.FLEX)
  • adapters now have an in_info property

Changes

  • Info now has properties for grid, time and mask
  • all init-args of Info are now optional
  • Info.accepts has changed signature: renamed ignore_none to incoming_donwstream
  • Info.accepts now only checks: grid, mask and units (other meta data can differ)
  • Grid.to_/from_canonical now allows additional dimensions
  • data_shape now a property of GridBase
    • NoGrid can be initialized with dim or data_shape now
    • NoGrid.data_shape can have -1 entries for variable size dimensions
    • if only dim given to NoGrid, all entries in data_shape will be -1

Fixes

  • cells for structured grids in 3D are now created correctly (no negative Volume in VTK/ESMF)
Edited by Sebastian Müller

Merge request reports

Pipeline #268065 passed

Pipeline passed for 72b7c005 on add_info_mask

Test coverage 95.00% (-1.00%) from 1 job

Merged by Sebastian MüllerSebastian Müller 1 day ago (Feb 4, 2025 3:34pm UTC)

Loading

Pipeline #269311 passed

Pipeline passed for 85e90240 on main

Test coverage 95.00% (-1.00%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Martin Lange
  • Martin Lange resolved all threads

    resolved all threads

  • Martin Lange approved this merge request

    approved this merge request

  • Sebastian Müller approved this merge request

    approved this merge request

  • Sebastian Müller mentioned in commit 85e90240

    mentioned in commit 85e90240

  • Please register or sign in to reply
    Loading