Skip to content

Commit

Permalink
Fix time variable for xarray
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaehn committed Oct 19, 2023
1 parent 196d21d commit a52208c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jobs/prepare_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg):
# Merge GEOSP-dataset with other timesteps
elif (time.hour != 0):
# Change values of time dimension to current time
da_geosp = da_geosp.assign_coords(time=[time])
da_geosp = da_geosp.assign_coords(time=[np.datetime64(time)])
# Merge GEOSP into temporary file
ds_merged = xr.merge([ds, da_geosp])
ds_merged.attrs = ds.attrs
Expand Down

0 comments on commit a52208c

Please sign in to comment.