Closed claalmve closed 3 months ago
@claalmve I cannot reproduce the nans and a time index not -180 to 180 in either main or in this branch; can you provide some more guidance on how to test? The lat-lon bounds provided for me also do not retrieve any data -- is there a specific spatial resolution you are testing with?
Description of PR
Summary of changes and related issue Addressing small bug with warming levels when slicing warming level data that goes beyond 2100. Currently, it creates smaller slices and centered the years incorrectly. Instead of -180 to 168 for a 30-year monthly WL that is centered around 2086 (so missing the last year), it creates a time index that is from -174 to 174 instead (wrong).
This PR addresses this issue and centers the warming level slices correctly.
You can see this behavior by changing the default lat/lon params in
warming_levels.ipynb
to:and checking out warming level slice 4.0. You can also see this behavior in a larger lat/lon subset, this just filters down the data to two gridcells so you can more easily see where the NaNs are for missing time-based data vs missing spatial data (due to how the xarray grids behave with our data).
Relevant motivation and context Debug incorrect WL behavior.
Type of change
Checklist: