From f1cd30092fcbe686dedda6db2b0c65de14ddbd37 Mon Sep 17 00:00:00 2001 From: Florian Deconinck Date: Fri, 20 Dec 2024 17:02:38 -0500 Subject: [PATCH] Allow blind mapping from data --- pyFV3/tracers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyFV3/tracers.py b/pyFV3/tracers.py index a2a6c04..4b938c5 100644 --- a/pyFV3/tracers.py +++ b/pyFV3/tracers.py @@ -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,