Skip to content

Commit a7720d0

Browse files
Update wps_drought.py
1 parent 75b7d6d commit a7720d0

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

albatross/processes/wps_drought.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,9 @@ def _handler(self, request, response):
149149

150150

151151
LOGGER.info("Select the input-output files")
152-
indicator = request.inputs [ "indicator" ] [ 0 ].data.lower()
153-
if indicator=="nao":
154-
index_file = files("albatross").joinpath("data", "nao.txt")
155-
elif indicator=="oni":
156-
index_file = files("albatross").joinpath("data", "oni.txt")
157-
else:
158-
raise Exception(f"Unsupported indicator: {indicator}")
159-
152+
indicator = request.inputs [ "indicator" ] [ 0 ].data.upper()
153+
index_file = files("albatross").joinpath("data", f"{indicator}.txt")
154+
160155
pr_input = request.inputs.get("pr", [ None ]) [ 0 ]
161156

162157

0 commit comments

Comments
 (0)