Skip to content

Commit

Permalink
Fixed levels error
Browse files Browse the repository at this point in the history
  • Loading branch information
jagoosw committed Apr 30, 2021
1 parent ffeba36 commit 27093a3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion getgfs/atts/0p50.json

This file was deleted.

2 changes: 1 addition & 1 deletion getgfs/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"saved_atts": ["Na", "0p50", "0p25_1hr"]}
{"saved_atts": ["Na", "0p25_1hr"]}
7 changes: 6 additions & 1 deletion getgfs/getgfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,19 @@ def get_attributes(res, step):
url.format(
res=res,
step=step,
date=date.today().strftime("%Y%m%d"),
date=(date.today() - timedelta(days=2)).strftime("%Y%m%d"),
hour=0,
info="dds",
)
)
if r.status_code != 200:
raise RuntimeError("The forecast resolution and timestep was not found")
arrays = re.findall(r"ARRAY:\n(.*?)\n", r.text)

if len(arrays) == 0:
raise RuntimeError(
"The forecast datetime was not found, please report as this should no longer occur"
)
for array in arrays:
var = re.findall(r"(.*?)\[", array)[0].split()[1]
if var in variables.keys():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Application name:
name="getgfs",
# Version number (initial):
version="0.0.8",
version="0.0.9",
# Application author details:
author="Jago Strong-Wright",
author_email="[email protected]",
Expand Down

0 comments on commit 27093a3

Please sign in to comment.