def _windspeed(key, values): if 'windUnits' in data and \ len(data['windUnits'].compressed()) > 0: windunits = data['windUnits'].compressed()[0] else: windunits = 'knots' return key, [tools.change_to_si_units(windunits, int(val)) \ for val in values.compressed().tolist()]
def _dewpoint(key, values): return key, [tools.change_to_si_units('degC', val) \ for val in values.compressed().tolist()]
def _qnh_in_inhg00(key, values): return 'pressureReducedToMeanSeaLevel', \ [tools.change_to_si_units('inhg00', float(val.replace('A', ''))) \ for val in values.compressed().tolist()]
def _temperature(key, values): return 'airTemperature', [tools.change_to_si_units('degC', val) \ for val in values.compressed().tolist()]