From 003742e19378fa406a73d6f4af10bc5c5de61a7d Mon Sep 17 00:00:00 2001 From: Knut-Frode Dagestad Date: Tue, 23 Jul 2024 20:18:28 +0200 Subject: [PATCH] Ensuring that Leeway ascii output contains lat/lon without [brackets] regardless of seeding method used --- opendrift/models/leeway.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opendrift/models/leeway.py b/opendrift/models/leeway.py index b79e90bd5..d66f18681 100644 --- a/opendrift/models/leeway.py +++ b/opendrift/models/leeway.py @@ -482,6 +482,8 @@ def export_ascii(self, filename): for inp in ['lon', 'lat', 'radius', 'time']: if len(np.atleast_1d(self.ascii[inp])) == 1: + if isinstance(self.ascii[inp], np.ndarray): + self.ascii[inp] = self.ascii[inp].item() self.ascii[inp] = [self.ascii[inp], self.ascii[inp]] f.write('# Drift simulation initiated [UTC]:\n') f.write('simDate simTime\n')