Skip to content

Conversation

@msteckle
Copy link
Collaborator

Thank you for contributing to ILAMB-Data. Use this template when submitting a pull request.

🛠 Summary of changes

Include a reference to the issue # in this section
Summarize the changes you are making to the repo. Are you fixing a bug? Adding a dataset? Describe what you did in a few sentences or bullet points:

  • Fixed bug in time array:
     # numpy array of time bounds
     tb_arr = np.asarray([[cf.DatetimeNoLeap(t.dt.year, t.dt.month, t.dt.day) for t in ds['time']], 
-                         [cf.DatetimeNoLeap(t.dt.year, t.dt.month, t.dt.day) for t in ds['time']]]).T
+                         [cf.DatetimeNoLeap(t.dt.year + (t.dt.month==12), (t.dt.month+1) if t.dt.month < 12 else 1, t.dt.day) for t in ds['time']]]).T
     tb_da = xr.DataArray(tb_arr, dims=('time', 'nv'))
     ds['time_bounds'] = tb_da

@msteckle msteckle requested a review from nocollier October 28, 2025 16:53
@msteckle msteckle self-assigned this Oct 28, 2025
@msteckle msteckle added the bug Something isn't working label Oct 28, 2025
@msteckle msteckle merged commit ccfa789 into master Oct 28, 2025
@msteckle msteckle deleted the bugfix-gimms-lai branch October 28, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants