Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ashjbarnes committed Aug 21, 2024
1 parent 72b8a0a commit 22fde6e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions regional_mom6/regional_mom6.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,16 @@ def get_glorys_data(
modify_existing (bool): Whether to add to an existing script or start a new one
buffer (int): number of degrees to add to pad the file with to ensure that interpolation onto desired domain doesn't fail.
"""
path = Path(download_path)
file = open(path / "get_glorysdata.sh", "r")

if modify_existing:
path = Path(download_path)
file = open(path / "get_glorysdata.sh", "r")
lines = file.readlines()
file.close()

else:
lines = ["#!/bin/bash\ncopernicusmarine login"]
file.close()

file = open(path / "get_glorysdata.sh", "w")

lines.append(
Expand Down

0 comments on commit 22fde6e

Please sign in to comment.