Class WeatherHelper
Helpers for weather.
public static class WeatherHelper
- Inheritance
-
WeatherHelper
Fields
MeanSeaLevel
The mean sea-level pressure (MSLP) is the average atmospheric pressure at mean sea level.
public static readonly Pressure MeanSeaLevel
Field Value
Methods
CalculateActualVaporPressure(Temperature, RelativeHumidity)
Calculates the actual vapor pressure.
public static Pressure CalculateActualVaporPressure(Temperature airTemperature, RelativeHumidity relativeHumidity)
Parameters
airTemperature
TemperatureThe dry air temperature.
relativeHumidity
RelativeHumidityThe relative humidity (RH).
Returns
- Pressure
The actual vapor pressure.
CalculateAltitude(Pressure)
Calculates the altitude in meters from the given pressure. Assumes mean sea-level pressure and temperature of 15C.
public static Length CalculateAltitude(Pressure pressure)
Parameters
pressure
PressureThe pressure at the point for which altitude is being calculated.
Returns
- Length
The altitude.
CalculateAltitude(Pressure, Pressure)
Calculates the altitude in meters from the given pressure and sea-level pressure. Assumes temperature of 15C.
public static Length CalculateAltitude(Pressure pressure, Pressure seaLevelPressure)
Parameters
pressure
PressureThe pressure at the point for which altitude is being calculated.
seaLevelPressure
PressureThe sea-level pressure.
Returns
- Length
The altitude.
CalculateAltitude(Pressure, Pressure, Temperature)
Calculates the altitude in meters from the given pressure, sea-level pressure and air temperature.
public static Length CalculateAltitude(Pressure pressure, Pressure seaLevelPressure, Temperature airTemperature)
Parameters
pressure
PressureThe pressure at the point for which altitude is being calculated.
seaLevelPressure
PressureThe sea-level pressure.
airTemperature
TemperatureThe dry air temperature at the point for which altitude is being calculated.
Returns
- Length
The altitude.
CalculateAltitude(Pressure, Temperature)
Calculates the altitude in meters from the given pressure and air temperature. Assumes mean sea-level pressure.
public static Length CalculateAltitude(Pressure pressure, Temperature airTemperature)
Parameters
pressure
PressureThe pressure at the point for which altitude is being calculated.
airTemperature
TemperatureThe dry air temperature at the point for which altitude is being calculated.
Returns
- Length
The altitude.
CalculateBarometricPressure(Pressure, Temperature, Length)
Calculates the barometric pressure from a raw reading, using the reduction formula from the german met service.
This is a more complex variant of CalculateSeaLevelPressure(Pressure, Length, Temperature). It gives the value that a weather station gives
for a particular area and is also used in meteorological charts.
public static Pressure CalculateBarometricPressure(Pressure measuredPressure, Temperature measuredTemperature, Length measurementAltitude)
Parameters
measuredPressure
PressureMeasured pressure at the observation point.
measuredTemperature
TemperatureMeasured temperature at the observation point.
measurementAltitude
LengthHeight over sea level of the observation point (to be really precise, geopotential heights have to be used above ~750m). Do not use the height obtained by calling CalculateAltitude(Pressure) or any of its overloads, since what would use redundant data.
Returns
- Pressure
The barometric pressure at the point of observation.
Remarks
CalculateBarometricPressure(Pressure, Temperature, Length, RelativeHumidity)
Calculates the barometric pressure from a raw reading, using the reduction formula from the german met service. This is a more complex variant of CalculateSeaLevelPressure(Pressure, Length, Temperature). It gives the value that a weather station gives for a particular area and is also used in meteorological charts. Use this method if you also have the relative humidity.
public static Pressure CalculateBarometricPressure(Pressure measuredPressure, Temperature measuredTemperature, Length measurementAltitude, RelativeHumidity relativeHumidity)
Parameters
measuredPressure
PressureMeasured pressure at the observation point.
measuredTemperature
TemperatureMeasured temperature at the observation point.
measurementAltitude
LengthHeight over sea level of the observation point (to be really precise, geopotential heights have to be used above ~750m).
relativeHumidity
RelativeHumidityRelative humidity at point of measurement.
Returns
- Pressure
The barometric pressure at the point of observation.
Remarks
CalculateBarometricPressure(Pressure, Temperature, Pressure, Length)
Calculates the barometric pressure from a raw reading, using the reduction formula from the german met service.
This is a more complex variant of CalculateSeaLevelPressure(Pressure, Length, Temperature). It gives the value that a weather station gives
for a particular area and is also used in meteorological charts.
public static Pressure CalculateBarometricPressure(Pressure measuredPressure, Temperature measuredTemperature, Pressure vaporPressure, Length measurementAltitude)
Parameters
measuredPressure
PressureMeasured pressure at the observation point.
measuredTemperature
TemperatureMeasured temperature at the observation point.
vaporPressure
PressureVapor pressure, meteorologic definition.
measurementAltitude
LengthHeight over sea level of the observation point (to be really precise, geopotential heights have to be used above ~750m).
Returns
- Pressure
The barometric pressure at the point of observation.
Remarks
CalculateDewPoint(Temperature, RelativeHumidity)
Calculates the dew point.
public static Temperature CalculateDewPoint(Temperature airTemperature, RelativeHumidity relativeHumidity)
Parameters
airTemperature
TemperatureThe dry air temperature.
relativeHumidity
RelativeHumidityThe relative humidity (RH).
Returns
- Temperature
The dew point.
Remarks
CalculateHeatIndex(Temperature, RelativeHumidity)
The heat index (or apparent temperature) is used to measure the amount of discomfort during the summer months when heat and humidity often combine to make it feel hotter than it actually is. The heat index is usually used for afternoon high temperatures.
public static Temperature CalculateHeatIndex(Temperature airTemperature, RelativeHumidity relativeHumidity)
Parameters
airTemperature
TemperatureThe dry air temperature.
relativeHumidity
RelativeHumidityThe relative humidity (RH).
Returns
- Temperature
The heat index, also known as the apparent temperature.
CalculatePressure(Pressure, Length, Temperature)
Calculates the approximate absolute pressure from given sea-level pressure, altitude and air temperature.
public static Pressure CalculatePressure(Pressure seaLevelPressure, Length altitude, Temperature airTemperature)
Parameters
seaLevelPressure
PressureThe sea-level pressure.
altitude
LengthThe altitude in meters at the point for which pressure is being calculated.
airTemperature
TemperatureThe air temperature at the point for which pressure is being calculated.
Returns
- Pressure
The estimated absolute pressure at the given altitude.
CalculateSaturatedVaporPressureOverIce(Temperature)
Calculates the saturated vapor pressure for a given air temperature over ice. The formula used is valid for temperatures between -100°C and +0°C.
public static Pressure CalculateSaturatedVaporPressureOverIce(Temperature airTemperature)
Parameters
airTemperature
TemperatureThe dry air temperature.
Returns
- Pressure
The saturated vapor pressure.
Remarks
From https://de.wikibooks.org/wiki/Tabellensammlung_Chemie/_Stoffdaten_Wasser, after D. Sonntag (1982).
CalculateSaturatedVaporPressureOverWater(Temperature)
Calculates the saturated vapor pressure for a given air temperature over water. The formula used is valid for temperatures between -100°C and +100°C.
public static Pressure CalculateSaturatedVaporPressureOverWater(Temperature airTemperature)
Parameters
airTemperature
TemperatureThe dry air temperature.
Returns
- Pressure
The saturated vapor pressure.
Remarks
From https://de.wikibooks.org/wiki/Tabellensammlung_Chemie/_Stoffdaten_Wasser, after D. Sonntag (1982).
CalculateSeaLevelPressure(Pressure, Length, Temperature)
Calculates the approximate sea-level pressure from given absolute pressure, altitude and air temperature.
public static Pressure CalculateSeaLevelPressure(Pressure pressure, Length altitude, Temperature airTemperature)
Parameters
pressure
PressureThe air pressure at the point of measurement.
altitude
LengthThe altitude at the point of the measurement.
airTemperature
TemperatureThe air temperature.
Returns
- Pressure
The estimated absolute sea-level pressure.
Remarks
CalculatePressure(Pressure, Length, Temperature) solved for sea level pressure.
CalculateTemperature(Pressure, Pressure, Length)
Calculates the temperature gradient for the given pressure difference.
public static Temperature CalculateTemperature(Pressure pressure, Pressure seaLevelPressure, Length altitude)
Parameters
pressure
PressureThe air pressure at the point for which temperature is being calculated.
seaLevelPressure
PressureThe sea-level pressure.
altitude
LengthThe altitude in meters at the point for which temperature is being calculated.
Returns
- Temperature
The standard temperature at the given altitude, when the given pressure difference is known.
Remarks
CalculatePressure(Pressure, Length, Temperature) solved for temperature.