dvas.tools.dtas package

Copyright (c) 2020-2022 MeteoSwiss, contributors listed in AUTHORS.

Distributed under the terms of the GNU General Public License v3.0 or later.

SPDX-License-Identifier: GPL-3.0-or-later

This sub-package contains profile delta tools.

Submodules

dvas.tools.dtas.dtas module

Copyright (c) 2020-2022 MeteoSwiss, contributors listed in AUTHORS.

Distributed under the terms of the GNU General Public License v3.0 or later.

SPDX-License-Identifier: GPL-3.0-or-later

This module contains tools and routines related to deltas between profiles and CWS.

dvas.tools.dtas.dtas.single_delta(prf, cws, circular=False)

Compute the delta between a (single) error-less Profile|RSProfile and a (single) error-full CWS.

Errors from the CWS are simply passed over to the Delta. Time information is also dropped in the process.

Parameters:
  • prf (Profile|RSProfile) – the ‘candidate’ profile.

  • cws (CWSProfile) – the reference Combined Working Standard profile.

  • circular (bool, optional) – if True, will wrap delta values in the range [-180;+180[. Defaults to False.

Returns:

DeltaProfile – the delta profile, i.e. candidate - reference.

dvas.tools.dtas.dtas.vector_delta(prf, cws, dir_prf, dir_cws)
Compute the modulus of the vector difference between a (single) error-less Profile|RSProfile

and a (single) error-full CWS.

Time information is dropped in the process.

Warning

Errors from the CWS are propagated over to the Delta. In doing so, we assume that uncertainties are uncorrelated ! This is only correct for the wind.

Parameters:
  • prf (Profile|RSProfile) – the ‘candidate’ profile vector amplitude.

  • cws (CWSProfile) – the reference Combined Working Standard profile vector amplitude.

  • dir_prf (Profile|RSProfile) – the ‘candidate’ profile vector direction.

  • dir_cws (CWSProfile) – the reference Combined Working Standard profile vector direction.

Returns:

DeltaProfile – the delta profile, i.e. ||vec{candidate} - vec{reference}||.

dvas.tools.dtas.dtas.compute(prfs, cwss, circular=False, dir_prfs=None, dir_cwss=None)

Compute the deltas between many error-less profiles and error-full cws.

Parameters:
  • prfs (MultiProfile|MultiRSProfile) – the candidate profiles. Each will be dealt with separately,

  • cwss (MultiCWSProfile) – the reference combined working standard profiles. A 1-to-1 pairing with prfs is assumed, unless this contains a single profile, in which case the same CWS will be subtracted from all the Profiles. I.e. len(cwss) == 1 or len(cwss) == len(prfs).

  • circular (bool, optional) – if True, will wrap delta values in the range [-180;+180[. Defaults to False.

  • dir_prfs (MultiProfile|MultiRSProfile) – direction profiles, if one wants to compute the modulus of the vector difference. Defaults to None.

  • dir_cwss (MultiCWSProfile) – direction CWS profiles, if one wants to compute the modulus of the vector difference. Defaults to None.

Returns:

MultiDeltaProfile – the DeltaProfiles.