In the gregorian case, the index should be proportional to normal datetimes.
(cf_da, calendar, freq)
| 614 | @pytest.mark.parametrize("calendar", ["gregorian", "proleptic_gregorian"]) |
| 615 | @pytest.mark.parametrize("freq", ["1D", "1ME", "1YE"]) |
| 616 | def test_get_clean_interp_index_dt(cf_da, calendar, freq) -> None: |
| 617 | """In the gregorian case, the index should be proportional to normal datetimes.""" |
| 618 | g = cf_da(calendar, freq=freq) |
| 619 | g["stime"] = xr.Variable( |
| 620 | data=g.time.to_index().to_datetimeindex(time_unit="ns"), dims=("time",) |
| 621 | ) |
| 622 | |
| 623 | gi = get_clean_interp_index(g, "time") |
| 624 | si = get_clean_interp_index(g, "time", use_coordinate="stime") |
| 625 | np.testing.assert_array_equal(gi, si) |
| 626 | |
| 627 | |
| 628 | @requires_cftime |
nothing calls this directly
no test coverage detected
searching dependent graphs…