MCPcopy Index your code
hub / github.com/pydata/xarray / _unpack_time_units_and_ref_date_cftime

Function _unpack_time_units_and_ref_date_cftime

xarray/coding/times.py:326–336  ·  view source on GitHub ↗
(units: str, calendar: str)

Source from the content-addressed store, hash-verified

324
325
326def _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
339def _decode_cf_datetime_dtype(

Callers 2

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…