Skip to content

Commit 7aa23c5

Browse files
jjokellaclaude
andcommitted
mkforcing/seas5_daily_to_6hourly: valid_time as integer
Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent b7a75b2 commit 7aa23c5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mkforcing/seas5_daily_to_6hourly.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,14 +464,14 @@ def main():
464464
ref_time_seconds = (ref_time - np.datetime64('1970-01-01T00:00:00')) / np.timedelta64(1, 's')
465465
else:
466466
ref_time_seconds = float(ref_time)
467-
valid_time_seconds = ref_time_seconds + target_periods_hours * 3600
467+
valid_time_seconds = (ref_time_seconds + target_periods_hours * 3600).astype(np.int64)
468468
ds_out["valid_time"] = xr.DataArray(
469469
data=valid_time_seconds,
470470
dims=["forecast_period"],
471471
attrs={
472472
"standard_name": "time",
473473
"long_name": "time",
474-
"units": "seconds since 1970-01-01T00:00:00",
474+
"units": "seconds since 1970-01-01",
475475
"calendar": "proleptic_gregorian",
476476
},
477477
)

0 commit comments

Comments
 (0)