Skip to content

Commit

Permalink
Merge pull request #1370 from knutfrode/dev
Browse files Browse the repository at this point in the history
Ensuring that Leeway ascii output contains lat/lon without [brackets]…
  • Loading branch information
knutfrode authored Jul 23, 2024
2 parents 4d00325 + 003742e commit 25f2eb6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opendrift/models/leeway.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 25f2eb6

Please sign in to comment.