dimensions
¶
Functions to create and manipulate dimensions for netCDF files.
as_naive_timestamp
¶
Convert a date-time object to a naive timestamp.
Source code in src/efts_io/dimensions.py
77 78 79 80 81 82 83 84 85 86 |
|
cftimes_to_pdtstamps
¶
cftimes_to_pdtstamps(
cftimes: Iterable[DatetimeGregorian],
tz_str: Optional[str] = None,
) -> ndarray[Timestamp, Timestamp]
Convert one or more Climate and Forecast (CF) times to timestamps.
Source code in src/efts_io/dimensions.py
302 303 304 305 306 307 |
|
check_is_utc
¶
Check that a date-time is in the UTC time zone.
Source code in src/efts_io/dimensions.py
39 40 41 42 43 44 45 46 47 |
|
create_netcdf_time_axis
¶
create_netcdf_time_axis(
d: Any,
time_step: str = "hours since",
tzoffset: Optional[str] = None,
) -> str
Create a time axis unit known to work for netCDF.
Source code in src/efts_io/dimensions.py
68 69 70 71 72 73 74 |
|
create_time_info
¶
create_time_info(
start: Any,
n: int,
time_step: str = "hours since",
time_step_delta: int = 1,
tzoffset: Optional[str] = None,
) -> Dict[str, Any]
Helper function to create the definition of the time dimension for use in a netCDF file.
Source code in src/efts_io/dimensions.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
create_timestamps
¶
create_timestamps(
time_dim_info: Dict[str, Any],
tz_str: Optional[str] = None,
) -> ndarray[Timestamp, Timestamp]
Create time axis timestamps given the time dimension information.
Source code in src/efts_io/dimensions.py
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
|
iso_date_time_str
¶
Convert a date-time object to a string in ISO format, using space as separator.
Source code in src/efts_io/dimensions.py
22 23 24 |
|