def _sal_l1_param(prediction, observation):
    """
    Compute the first parameter of location component for SAL based on
    :cite:`WPHF2008`.

    This parameter indicates the normalized distance between the center of mass in
    observation and forecast.

    Parameters
    ----------
    prediction: array-like
        Array of shape (m,n) with prediction data. NaNs are ignored.
    observation: array-like
        Array of shape (m,n) with observation data. NaNs are ignored.

    Returns
    -------
    location_1: float
        The first parameter of location component which has a value between 0 to 1.
    """
    maximum_distance = sqrt(
        ((observation.shape[0]) ** 2) + ((observation.shape[1]) ** 2)
    )
    obi = center_of_mass(np.nan_to_num(observation))
    fori = center_of_mass(np.nan_to_num(prediction))
    dist = hypot(fori[1] - obi[1], fori[0] - obi[0])
    return dist / maximum_distance
Compute the first parameter of location component for SAL based on
:cite:`WPHF2008`.

This parameter indicates the normalized distance between the center of mass in
observation and forecast.

Parameters
----------
prediction: array-like
Array of shape (m,n) with prediction data. NaNs are ignored.
observation: array-like
Array of shape (m,n) with observation data. NaNs are ignored.

Returns
-------
location_1: float
The first parameter of location component which has a value between 0 to 1.
pysteps/verification/salscores.py