Skip to content

Commit

Permalink
fix length bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanLaserGit committed Jan 19, 2024
1 parent 971a730 commit 14cf818
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/run_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def validate(catchments,realization_file=None):
df = pd.read_csv(full_path)
forcings_start = datetime.strptime(df['time'].iloc[0],'%Y-%m-%d %H:%M:%S')
forcings_end = datetime.strptime(df['time'].iloc[-1],'%Y-%m-%d %H:%M:%S')
dt_forcings_s = (forcings_end - forcings_start).total_seconds() / len(df['time'][0])
dt_forcings_s = (forcings_end - forcings_start).total_seconds() / len(df['time'])
assert start_time == forcings_start, f"Realization start time {start_time} does not match forcing start time {forcings_start}"
assert end_time == forcings_end, f"Realization end time {end_time} does not match forcing end time {forcings_end}"
assert dt_s == dt_forcings_s, f"Realization output_interval {dt_s} does not match forcing time axis {dt_forcings_s}"
Expand Down

0 comments on commit 14cf818

Please sign in to comment.