Skip to content

Commit

Permalink
Remove debugging code.
Browse files Browse the repository at this point in the history
  • Loading branch information
gsketefian committed Nov 25, 2024
1 parent fedb5d7 commit 6294716
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 31 deletions.
29 changes: 9 additions & 20 deletions ush/get_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions ush/set_leadhrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 6294716

Please sign in to comment.