|
PALM-meteo
|
Classes | |
| class | DTIndexer |
| class | NotWholeTimestep |
| class | SliceBoolExtender |
| class | SliceExtender |
| class | Workflow |
Functions | |
| def | distribute (what, into, reverse=False) |
| def | distribute_chunks (sizes, nthreads, prefix=(), reverse=False) |
| def | find_free_fname (fpath, overwrite=False) |
| def | tstep (td, step) |
| def | ensure_dimension (f, dimname, dimsize) |
| def | getvar (f, varname, *args, **kwargs) |
| def | assert_dir (filepath) |
Variables | |
| ax_ = np.newaxis | |
| int | rad = np.pi / 180. |
| td0 = datetime.timedelta(0) | |
| utc = datetime.timezone.utc | |
| midnight = datetime.time(0) | |
| utcdefault = lambda dt: dt.replace(tzinfo=utc) if dt.tzinfo is None else dt | |
| midnight_of = lambda dt: datetime.datetime.combine(dt.date(), midnight, dt.tzinfo) | |
| fext_re = re.compile(r'\.(\d{3})$') | |
| where_range = lambda mask: (np.argmax(mask), len(mask)-np.argmax(mask[::-1])) | |
| def palmmeteo.utils.assert_dir | ( | filepath | ) |
Creates a directory for an output file if it doesn't exist already.
| def palmmeteo.utils.distribute | ( | what, | |
| into, | |||
reverse = False |
|||
| ) |
Distributes integer into integers as evenly as possible
| def palmmeteo.utils.distribute_chunks | ( | sizes, | |
| nthreads, | |||
prefix = (), |
|||
reverse = False |
|||
| ) |
Distributes an n-dim array among threads as evenly as possible
| def palmmeteo.utils.ensure_dimension | ( | f, | |
| dimname, | |||
| dimsize | |||
| ) |
Creates a dimension in a netCDF file or verifies its size if it already exists.
| def palmmeteo.utils.find_free_fname | ( | fpath, | |
overwrite = False |
|||
| ) |
| def palmmeteo.utils.getvar | ( | f, | |
| varname, | |||
| * | args, | ||
| ** | kwargs | ||
| ) |
Creates a variable in a netCDF file or returns it if it already exists. Does NOT verify its parameters.
| def palmmeteo.utils.tstep | ( | td, | |
| step | |||
| ) |
Fully divide datetime td by timedelta step.
| palmmeteo.utils.ax_ = np.newaxis |
| palmmeteo.utils.fext_re = re.compile(r'\.(\d{3})$') |
| palmmeteo.utils.midnight = datetime.time(0) |
| palmmeteo.utils.midnight_of = lambda dt: datetime.datetime.combine(dt.date(), midnight, dt.tzinfo) |
| int palmmeteo.utils.rad = np.pi / 180. |
| palmmeteo.utils.td0 = datetime.timedelta(0) |
| palmmeteo.utils.utc = datetime.timezone.utc |
| palmmeteo.utils.utcdefault = lambda dt: dt.replace(tzinfo=utc) if dt.tzinfo is None else dt |
| palmmeteo.utils.where_range = lambda mask: (np.argmax(mask), len(mask)-np.argmax(mask[::-1])) |