Skip to content

Commit

Permalink
run for 1z through 0z period #321
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Jan 25, 2023
1 parent ace5730 commit efcadc5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/era5/fetch_era5.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,14 @@ def run(valid):

def main(argv):
"""Go!"""
valid = utc(*[int(a) for a in argv[1:]])
if len(argv) == 5:
valid = utc(*[int(a) for a in argv[1:]])
run(valid)
offsets = [0]
elif len(argv) == 4:
valid = utc(*[int(a) for a in argv[1:]])
for hr in range(24):
run(valid.replace(hour=hr))
# Best to run for 1z through 0z as 0z has the 24hr sum to consider
offsets = range(1, 25)
for offset in offsets:
run(valid + timedelta(hours=offset))


if __name__ == "__main__":
Expand Down

0 comments on commit efcadc5

Please sign in to comment.