diff --git a/ush/get_obs.py b/ush/get_obs.py index 68b594504..81de88919 100644 --- a/ush/get_obs.py +++ b/ush/get_obs.py @@ -16,15 +16,15 @@ load_yaml_config, ) from mrms_pull_topofhour import mrms_pull_topofhour -#try: -# sys.path.append(os.environ['METPLUS_ROOT']) -#except: -# print("\nERROR ERROR ERROR\n") -# print("Environment variable METPLUS_ROOT must be set to use this script\n") -# raise -#from metplus.util import string_template_substitution as sts -#from string_template_substitution import string_template_substitution as sts -import string_template_substitution as sts +try: + sys.path.append(os.environ['METPLUS_ROOT']) +except: + print("\nERROR ERROR ERROR\n") + print("Environment variable METPLUS_ROOT must be set to use this script\n") + raise +from metplus.util import string_template_substitution as sts +from string_template_substitution import string_template_substitution as sts +#import string_template_substitution as sts def get_obs_arcv_hr(obtype, arcv_intvl_hrs, hod): @@ -490,19 +490,8 @@ def get_obs(config, obtype, yyyymmdd_task): leadtime = yyyymmddhh - yyyymmdd_task # Call METplus subroutine to evaluate the template for the full path to # the file containing METplus timestrings at the current time. - print(f"") - print(f"AAAAAAAAAAAAAAA") - print(f"{fp_proc_tmpl = }") - print(f"{yyyymmdd_task = }") - print(f"{yyyymmddhh = }") - print(f"{leadtime = }") - print(f"{type(leadtime) = }") - print(f"{leadtime.total_seconds() = }") fn = sts.do_string_sub(tmpl=fp_proc_tmpl,init=yyyymmdd_task,valid=yyyymmddhh, lead=int(leadtime.total_seconds())) -# lead=leadtime.total_seconds()) -# lead=leadtime) - print(f"{fn = }") all_fp_proc_dict[fg].append(fn) # Check whether any obs files already exist on disk in their processed diff --git a/ush/set_leadhrs.py b/ush/set_leadhrs.py index 7fef0f79f..90aa0ca1f 100644 --- a/ush/set_leadhrs.py +++ b/ush/set_leadhrs.py @@ -29,13 +29,8 @@ def set_leadhrs(date_init, lhr_min, lhr_max, lhr_intvl, base_dir, time_lag, fn_t A list of forecast hours where files were found """ -# print(f"") -# print(f"KKKKKKKKKKKKKK") -# print(f"{verbose = }") - # Step 1: Generate lead hours without filtering for missing files lhrs_list = list(range(lhr_min, lhr_max + 1, lhr_intvl)) -# print(f"{lhrs_list = }") if verbose: print(f"Initial set of lead hours (relative to {date_init}): {lhrs_list}") @@ -91,12 +86,6 @@ def set_leadhrs(date_init, lhr_min, lhr_max, lhr_intvl, base_dir, time_lag, fn_t args = parser.parse_args() -# print(f"") -# print(f"UUUUUUUUUUUUUUU") -# print(f"args = ") -# pprint(args) -# print(f"VVVVVVVVVVVVVVV") - #Consistency checks if not args.skip_check_files and not args.date_init: raise argparse.ArgumentTypeError('--date_init must be specified unless --skip_check_files is specified')