Skip to content

Commit

Permalink
Add initial time as hdf5 attribute in callbacks
Browse files Browse the repository at this point in the history
- This is easier to directly load than the units 'time since initial time'
- still keep the units
  • Loading branch information
cpjordan committed Sep 16, 2024
1 parent ce23e8e commit a63c4d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions thetis/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def __init__(self, solver_obj, array_dim=1, attrs=None,
if init_date is not None and include_time:
time_units = 'seconds since ' + init_date.isoformat()
self.var_attrs['time'] = {'units': time_units}
self.attrs['simulation_initial_date'] = init_date.isoformat()

def set_write_mode(self, mode):
"""
Expand Down

0 comments on commit a63c4d0

Please sign in to comment.