Skip to content

Commit

Permalink
Allow blind mapping from data
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianDeconinck committed Dec 20, 2024
1 parent c9a40e8 commit f1cd300
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyFV3/tracers.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ def make(
tracers._quantities[name] = qty
return tracers

@staticmethod
def blind_mapping_from_data(tracer_data: np.ndarray):
if len(tracer_data.shape) != 4:
raise ValueError("Expected 4D field as input")
return [f"Tracer_{idx}" for idx in range(tracer_data.shape[3])]

@classmethod
def make_from_4D_array(
cls,
Expand Down

0 comments on commit f1cd300

Please sign in to comment.