utils#

Utility helpers.

Functions#

align_bounds_to_l2(ds, resolutions, min_row, ...)

Align the given bounds to the L2 grid.

coord_to_index(ds, lat, lon)

Map latitude/longitude or indices to integer grid indices.

cut_to_filled_area(ds, resolutions, ...[, ...])

Create index slices that crop to filled mask cells, with optional coarse alignment.

dict_to_multiline_string(d[, spacing])

Convert a dictionary into a formatted multiline string.

distance_100m_units(di, dj, l0_resolution[, ...])

Convert index deltas to distance in ~100 m units using l0_resolution.

find_best_gauge_location_by_area(ds, ...[, ...])

Find best gauge location given reference gauge location, refernce cathcment area and allowed area and value deviation.

get_upscaling_factor(resolutions[, ...])

Compute integer upscaling factor from a Resolution-like object.

pretty_print_df(df[, max_col_width, title])

Pretty-print a DataFrame as an ASCII table with simple truncation.