dctools.debug.debug_utils

Debug, visualization and introspection utilities.

These functions are kept for ad-hoc debugging sessions but are not part of the production pipeline and are excluded from test-coverage reporting.

Functions

ensure_timestamp(date_input)

Convert to Timestamp only if not already a Timestamp.

find_unpicklable_objects(obj[, path])

Recursively finds unserializable objects.

get_active_workers_count()

Return the number of active Dask workers.

get_current_worker_id()

Get current worker ID from within a task.

get_dask_config_workers()

Return Dask workers configuration.

get_dates_from_startdate(start_date, ndays)

Get dates of n days after start_date.

is_dask_worker()

Check via environment variables.

log_memory(stage)

Log the current memory usage of the process.

print_structure_types(obj[, indent, ...])

Print hierarchically the types contained in obj with some metadata.

show_worker_info()

Function executed on a Dask worker.

visualize_netcdf_with_geometry(ds, geometry, ...)

Visualize a NetCDF dataset variable along with a geometry on a map.

walk_obj(obj)

Recursively yield all leaf elements from a nested structure.