iconarray.core.utilities#

The utilities.py module contains various functions useful for analysing or plotting (ICON) data using xarray.

Contains public functions: ind_from_latlon, add_coordinates, get_stats wilks, show_data_vars

Functions

add_coordinates(lon, lat, lonmin, lonmax, ...)

Get the position of given lat/lon coordinates in relation to the bounds of regular lat/lon grid.

awhere_drop(ds, cond)

xr.Dataset.where equivalent that preserves the dtype of the array.

get_stats(varin1, varin2)

Get mean, difference of mean and p value for the T-test of the means of two independent samples (varin1, varin2).

ind_from_latlon(lon_array, lat_array, ...[, ...])

Find the indices of the n closest cells in a grid, relative to a given latitude/longitude point.

show_data_vars(ds)

Print a table with variables in dataset.

wilks(pvals, alpha)

Get threshold for p-values at which differences are significant at level alpha if the dependency of data points is accounted for according to Wilks et al. 2016 (https://doi.org/10.1175/BAMS-D-15-00267.1).