Skip to content

Commit

Permalink
Adjust ending forecast hour if using "HRRR-ZARR" and config args are …
Browse files Browse the repository at this point in the history
…provided.

Change functionality to stem from hsdata rather than specific model grid.
  • Loading branch information
Charlie Becker committed Jun 18, 2021
1 parent 689b88a commit 5be2910
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions bin/hsdata
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ def process_ensemble_member(run_date, member, config):
print("Starting", run_date, member)
start_date = run_date + timedelta(hours=config.start_hour)
end_date = run_date + timedelta(hours=config.end_hour)

if config.ensemble_name == "HRRR-ZARR":
if hasattr(config, "HRRR_alt_end_hour") and run_date.hour in config.HRRR_alt_run_hours:
end_date = run_date + timedelta(hours=config.HRRR_alt_end_hour)

if hasattr(config, "mask_file"):
mask_file = config.mask_file
else:
Expand Down
3 changes: 0 additions & 3 deletions hagelslag/data/ZarrModelGrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ def __init__(self,

def load_data(self):

if self.run_date.hour not in [0, 6, 12, 18]:
self.end_date = self.run_date + timedelta(hours=17)

units = ""
level = self.variable.split('-')[1]
self.variable = self.variable.split('-')[0]
Expand Down

0 comments on commit 5be2910

Please sign in to comment.