Functions

mcradar.utilities.air_density(T, P)

The density of air.

Parameters:
  • T – Ambient temperature [K].

  • P – Ambient pressure [Pa].

Returns:

The kinematic viscosity [Pa/s].

mcradar.utilities.air_dynamic_viscosity(T)

The kinematic viscosity of air.

Parameters:

T – Ambient temperature [K].

Returns:

The kinematic viscosity [Pa/s].

mcradar.utilities.air_kinematic_viscosity(T, P)

The kinematic viscosity of air.

Parameters:
  • T – Ambient temperature [K].

  • P – Ambient pressure [Pa].

Returns:

The kinematic viscosity [m^2/s].

mcradar.utilities.db2lin(data)

Convert from logarithm to linear units

Parameters:

data (single value or an array) –

Return type:

returns the data converted to linear

mcradar.utilities.fall_velocity_HW(area, mass, D_max, T=273.15, P=100000.0)

The Heymsfield-Westbrook fall velocity.

Parameters:
  • area – Projected area [m^2].

  • mass – Particle mass [kg].

  • D_max – Particle maximum dimension [m].

  • T – Ambient temperature [K].

  • P – Ambient pressure [Pa].

Returns:

The fall velocity [m/s].

mcradar.utilities.lin2db(data)

Convert from linear to logarithm units

Parameters:

data (single value or an array) –

Return type:

returns the data converted to dB

mcradar.tableOperator.calcRho(mcTable)

Calculate the density of each super particles [g/cm^3].

Parameters:

mcTable (output from getMcSnowTable()) –

Returns:

  • mcTable with an additional column for the density.

  • The density is calculated separately for aspect ratio < 1

  • and for aspect ratio >= 1.

mcradar.tableOperator.calcRhophys(mcTable)

calculate the density of the particle, using the rime mass, ice mass, water mass,… :param mcTable: :type mcTable: output from getMcSnowTable()

Return type:

mcTable with an additional column for the density.

mcradar.tableOperator.creatRadarCols(mcTable, dicSettings)

Create the Ze and KDP column

Parameters:
  • mcTable (output from getMcSnowTable()) –

  • wls (wavelenght (iterable) [mm]) –

Returns:

  • mcTable with a empty columns ‘sZe*_’ ‘sKDP_*’ for*

  • storing Ze_H and Ze_V and sKDP of one particle of a

  • given wavelength

mcradar.tableOperator.getMcSnowTable(mcSnowPath)

Read McSnow output table

Parameters:

mcSnowPath (path for the output from McSnow) –

Returns:

  • Pandas DataFrame with the McSnow output variables. This DataFrame additionally includes

  • a column for the radii and the density [sRho]. The

  • velocity is negative towards the ground.

mcradar.tableOperator.kernel_estimate(R_SP_list, Rgrid, sigma0=0.62, weight=None, space='loge')

Calculate the kernel density estimate (kde) based on the super-particle list (adapted from McSnow’s mo_output routines (f.e. write_distributions_meltdegree) :param R_SP_list: :type R_SP_list: list of the radii of the superparticle :param Rgrid: :type Rgrid: array of radii on which the kde is calculated :param sigma0: :type sigma0: bandwidth prefactor of the kde (default value from Shima et al. (2009) :param weight: :type weight: weight applied during integration (in this application the multiplicity) :param space: :type space: space in which the kde is applied (loge: logarithmix with base e, lin: linear space; D2: radii transformed by r_new=r**2)