-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
enhancementNew feature or requestNew feature or request
Description
New feature type
New infrastructure or infrastructure enhancement
What is this new feature?
adf_info.py aborts if the Time series directory isn't found. Rather than aborting how about it attempt to create the directory?
Assistance required?
No, I will make a PR when the feature is ready
Extra info
Here's the suggested change:
diff --git a/lib/adf_info.py b/lib/adf_info.py
index bb55132..a06c47d 100644
--- a/lib/adf_info.py
+++ b/lib/adf_info.py
@@ -1078,8 +1078,8 @@ def get_climo_yrs_from_ts(self, input_ts_loc, case_name):
#Check that time series input directory actually exists:
if not input_location.is_dir():
- errmsg = f"\t ERROR: Time series directory '{input_ts_loc}' not found. Script is exiting."
- raise AdfError(errmsg)
+ print( f"\tINFO: Time series directory '{input_location}' not found, making new time series location")
+ input_location.mkdir(parents=True)
# Search for first available variable in var_list to get a time series file to read
# NOTE: it is assumed all the variables have the same dates!Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request