(units: str, calendar: str)
| 324 | |
| 325 | |
| 326 | def _unpack_time_units_and_ref_date_cftime(units: str, calendar: str): |
| 327 | # same as _unpack_netcdf_time_units but finalizes ref_date for |
| 328 | # processing in encode_cf_datetime |
| 329 | time_units, ref_date = _unpack_netcdf_time_units(units) |
| 330 | ref_date = cftime.num2date( |
| 331 | 0, |
| 332 | units=f"microseconds since {ref_date}", |
| 333 | calendar=calendar, |
| 334 | only_use_cftime_datetimes=True, |
| 335 | ) |
| 336 | return time_units, ref_date |
| 337 | |
| 338 | |
| 339 | def _decode_cf_datetime_dtype( |
no test coverage detected
searching dependent graphs…