dubfi.util ========== .. py:module:: dubfi.util .. autoapi-nested-parse:: Collection of utility functions for dubfi. .. codeauthor:: Valentin Bruch, DWD .. versionadded:: 0.1.0 (initial release) Functions --------- .. autoapisummary:: dubfi.util.str2timedelta64 dubfi.util.config_overwrite dubfi.util.sphere_dist_deg dubfi.util.earth_dist_deg dubfi.util.sphere_dist_rad Module Contents --------------- .. py:function:: str2timedelta64(s) Convert string (user input) to np.timedelta64. .. py:function:: config_overwrite(config, changes) Overwrite config by given changes, recursively updating dictionaries. .. py:function:: sphere_dist_deg(lon1, lat1, lon2, lat2) Like :func:`sphere_dist_rad`, but input and output is in degrees. .. py:function:: earth_dist_deg(lon1, lat1, lon2, lat2) Distance on spherical earth input in degrees, output in meters. :param lon1: longitude of first position(s) (degrees east) :type lon1: array or float :param lat1: latitude of first position(s) (degrees north) :type lat1: array or float :param lon2: longitude of second position(s) (degrees east) :type lon2: array or float :param lat2: latitude of second position(s) (degrees north) :type lat2: array or float :rtype: distance on spherical earth (meters) .. py:function:: sphere_dist_rad(lon1, lat1, lon2, lat2) Angle between two points on the unit sphere. :param lon1: longitude of first position(s) (radians) :type lon1: array or float :param lat1: latitude of first position(s) (radians) :type lat1: array or float :param lon2: longitude of second position(s) (radians) :type lon2: array or float :param lat2: latitude of second position(s) (radians) :type lat2: array or float :rtype: angle on unit sphere (radians)