Module overview Contains functions for calculating thermodynamic properties of gas-vapor mixtures and standard atmosphere suitable for most engineering, physical, and meteorological applications.
Most of the functions are an implementation of the formulae found in the 2017 ASHRAE Handbook - Fundamentals, in both International System (SI), and Imperial (IP) units. Please refer to the information included in each function for their respective reference.
Example use psychrolib, only: GetTDewPointFromRelHum, SetUnitSystem, SI ! Set the unit system, for example to SI (can be either 'SI' or 'IP') call SetUnitSystem(SI) ! Calculate the dew point temperature for a dry bulb temperature of 25 C and a relative humidity of 80% print *, GetTDewPointFromRelHum(25.0, 0.80) 21.3094
Copyright - For the current library implementation Copyright (c) 2018 D. Thevenard and D. Meyer. - For equations and coefficients published ASHRAE Handbook — Fundamentals, Chapter 1 Copyright (c) 2017 ASHRAE Handbook — Fundamentals (https://www.ashrae.org)
License MIT (https://github.com/psychrometrics/psychrolib/LICENSE.txt)
Note from the Authors We have made every effort to ensure that the code is adequate, however, we make no representation with respect to its accuracy. Use at your own risk. Should you notice an error, or if you have a suggestion, please notify us through GitHub at https://github.com/psychrometrics/psychrolib/issues.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real, | private, | parameter | :: | R_DA_IP | = | 53.350 | Universal gas constant for dry air (IP version) in ft lb_Force lb_DryAir⁻¹ R⁻¹ Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 |
real, | private, | parameter | :: | R_DA_SI | = | 287.042 | Universal gas constant for dry air (SI version) in J kg_DryAir⁻¹ K⁻¹ Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 |
integer, | public, | parameter | :: | IP | = | 1 | |
integer, | public, | parameter | :: | SI | = | 2 | |
integer, | private | :: | PSYCHROLIB_UNITS | = | 0 | Unit system to use. |
|
real, | private | :: | PSYCHROLIB_TOLERANCE | = | 1.0 | Tolerance of temperature calculations. |
|
integer, | private, | parameter | :: | MAX_ITER_COUNT | = | 100 | Maximum number of iterations before exiting while loops. |
real, | private, | parameter | :: | MIN_HUM_RATIO | = | 1e-7 | Minimum acceptable humidity ratio used/returned by any functions. Any value above 0 or below the MIN_HUM_RATIO will be reset to this value. |
Return the system of units in use.
Check whether the system in use is IP or SI
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TFahrenheit | Temperature in degree Fahrenheit |
Temperature in degree Rankine
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TCelsius | Temperature in degree Celsius |
Tempearatyre in Kelvin
Return wet-bulb temperature given dry-bulb temperature, dew-point temperature, and pressure. References: ASHRAE Handbook - Fundamentals (2017) ch. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | TDewPoint | Dew-point temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Wet-bulb temperature in °F [IP] or °C [SI]
Return wet-bulb temperature given dry-bulb temperature, relative humidity, and pressure. References: ASHRAE Handbook - Fundamentals (2017) ch. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | RelHum | Relative humidity in range [0, 1] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Wet-bulb temperature in °F [IP] or °C [SI]
Return relative humidity given dry-bulb temperature and dew-point temperature. References: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 22
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | TDewPoint | Dew-point temperature in °F [IP] or °C [SI] |
Relative humidity in range [0, 1]
Return relative humidity given dry-bulb temperature, wet bulb temperature and pressure. References: ASHRAE Handbook - Fundamentals (2017) ch. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | TWetBulb | Wet-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Relative humidity in range [0, 1]
Return dew-point temperature given dry-bulb temperature and relative humidity. References: ASHRAE Handbook - Fundamentals (2017) ch. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | RelHum | Relative humidity in range [0, 1] |
Dew-point temperature in °F [IP] or °C [SI]
Return dew-point temperature given dry-bulb temperature, wet-bulb temperature, and pressure. References: ASHRAE Handbook - Fundamentals (2017) ch. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | TWetBulb | Wet-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Dew-point temperature in °F [IP] or °C [SI]
Return partial pressure of water vapor as a function of relative humidity and temperature. References: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 12, 22
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | RelHum | Relative humidity in range [0, 1] |
Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI]
Return relative humidity given dry-bulb temperature and vapor pressure. References: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 12, 22
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | VapPres | Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI] |
Relative humidity in range [0, 1]
Helper function returning the derivative of the natural log of the saturation vapor pressure as a function of dry-bulb temperature. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 5
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
Derivative of natural log of vapor pressure of saturated air in Psi [IP] or Pa [SI]
Return dew-point temperature given dry-bulb temperature and vapor pressure. References: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn. 5 and 6 Notes: The dew point temperature is solved by inverting the equation giving water vapor pressure at saturation from temperature rather than using the regressions provided by ASHRAE (eqn. 37 and 38) which are much less accurate and have a narrower range of validity. The Newton-Raphson (NR) method is used on the logarithm of water vapour pressure as a function of temperature, which is a very smooth function Convergence is usually achieved in 3 to 5 iterations. TDryBulb is not really needed here, just used for convenience.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | VapPres | Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI] |
Dew-point temperature in °F [IP] or °C [SI]
Return vapor pressure given dew point temperature. References: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 36
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDewPoint | Dew-point temperature in °F [IP] or °C [SI] |
Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI]
Return wet-bulb temperature given dry-bulb temperature, humidity ratio, and pressure. References: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 33 and 35 solved for Tstar
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Wet-bulb temperature in °F [IP] or °C [SI]
Return humidity ratio given dry-bulb temperature, wet-bulb temperature, and pressure. References: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 33 and 35
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | TWetBulb | Wet-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
Return humidity ratio given dry-bulb temperature, relative humidity, and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | RelHum | Relative humidity in range [0, 1] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
Return relative humidity given dry-bulb temperature, humidity ratio, and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Relative humidity in range [0, 1]
Return humidity ratio given dew-point temperature and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDewPoint | Dew-point temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
Return dew-point temperature given dry-bulb temperature, humidity ratio, and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Dew-point temperature in °F [IP] or °C [SI]
Return humidity ratio given water vapor pressure and atmospheric pressure. Reference: ASHRAE Fundamentals (2005) ch. 6 eqn. 22; ASHRAE Fundamentals (2009) ch. 1 eqn. 22.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | VapPres | Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
Return vapor pressure given humidity ratio and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 20 solved for pw
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI]
Return the specific humidity from humidity ratio (aka mixing ratio). Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 9b
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Dry_Air⁻¹ [IP] or kg_H₂O kg_Dry_Air⁻¹ [SI] |
Specific humidity in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
Return the humidity ratio (aka mixing ratio) from specific humidity. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 9b (solved for humidity ratio)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | SpecificHum | Specific humidity in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
Humidity ratio in lb_H₂O lb_Dry_Air⁻¹ [IP] or kg_H₂O kg_Dry_Air⁻¹ [SI]
Return dry-air enthalpy given dry-bulb temperature. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 28
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
Dry air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹ [SI]
Return dry-air density given dry-bulb temperature and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 Notes: Eqn 14 for the perfect gas relationship for dry air. Eqn 1 for the universal gas constant. The factor 144 in IP is for the conversion of Psi = lb in⁻² to lb ft⁻².
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Dry air density in lb ft⁻³ [IP] or kg m⁻³ [SI]
Return dry-air volume given dry-bulb temperature and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 Notes: Eqn 14 for the perfect gas relationship for dry air. Eqn 1 for the universal gas constant. The factor 144 in IP is for the conversion of Psi = lb in⁻² to lb ft⁻².
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Dry air volume in ft³ lb⁻¹ [IP] or in m³ kg⁻¹ [SI]
Return dry bulb temperature from enthalpy and humidity ratio.
Reference:
ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 30
Notes:
Based on the GetMoistAirEnthalpy
function, rearranged for temperature.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | MoistAirEnthalpy | Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹ |
||
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
Dry-bulb temperature in °F [IP] or °C [SI]
Return humidity ratio from enthalpy and dry-bulb temperature.
Reference:
ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 30
Notes:
Based on the GetMoistAirEnthalpy
function, rearranged for humidity ratio.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | MoistAirEnthalpy | Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹ |
||
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
Return saturation vapor pressure given dry-bulb temperature. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 5
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
Vapor pressure of saturated air in Psi [IP] or Pa [SI]
Return humidity ratio of saturated air given dry-bulb temperature and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 36, solved for W
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Humidity ratio of saturated air in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI]
Return saturated air enthalpy given dry-bulb temperature and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Saturated air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹ [SI]
Return Vapor pressure deficit given dry-bulb temperature, humidity ratio, and pressure. Reference: Oke (1987) eqn 2.13a
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Vapor pressure deficit in Psi [IP] or Pa [SI]
Return the degree of saturation (i.e humidity ratio of the air / humidity ratio of the air at saturation at the same temperature and pressure) given dry-bulb temperature, humidity ratio, and atmospheric pressure. Reference: ASHRAE Handbook - Fundamentals (2009) ch. 1 eqn 12 Notes: This definition is absent from the 2017 Handbook. Using 2009 version instead.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Degree of saturation in arbitrary unit
Return moist air enthalpy given dry-bulb temperature and humidity ratio. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 30
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹
Return moist air specific volume given dry-bulb temperature, humidity ratio, and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 26 Notes: In IP units, R_DA_IP / 144 equals 0.370486 which is the coefficient appearing in eqn 26 The factor 144 is for the conversion of Psi = lb in⁻² to lb ft⁻².
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Specific volume of moist air in ft³ lb⁻¹ of dry air [IP] or in m³ kg⁻¹ of dry air [SI]
Return moist air density given humidity ratio, dry bulb temperature, and pressure. Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 11
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
Moist air density in lb ft⁻³ [IP] or kg m⁻³ [SI]
Return standard atmosphere barometric pressure, given the elevation (altitude). Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 3
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | Altitude | Altitude in ft [IP] or m [SI] |
Standard atmosphere barometric pressure in Psi [IP] or Pa [SI]
Return standard atmosphere temperature, given the elevation (altitude). Reference: ASHRAE Handbook - Fundamentals (2017) ch. 1 eqn 4
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | Altitude | Altitude in ft [IP] or m [SI] |
Standard atmosphere dry-bulb temperature in °F [IP] or °C [SI]
Return sea level pressure given dry-bulb temperature, altitude above sea level and pressure. Reference: Hess SL, Introduction to theoretical meteorology, Holt Rinehart and Winston, NY 1959, ch. 6.5; Stull RB, Meteorology for scientists and engineers, 2nd edition, Brooks/Cole 2000, ch. 1. Notes: The standard procedure for the US is to use for TDryBulb the average of the current station temperature and the station temperature from 12 hours ago.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | StnPressure | Observed station pressure in Psi [IP] or Pa [SI] |
||
real, | intent(in) | :: | Altitude | Altitude in ft [IP] or m [SI] |
||
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
Sea level barometric pressure in Psi [IP] or Pa [SI]
Return station pressure from sea level pressure. Reference: See 'GetSeaLevelPressure' Notes: This function is just the inverse of 'GetSeaLevelPressure'.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | SeaLevelPressure | Sea level barometric pressure in Psi [IP] or Pa [SI] |
||
real, | intent(in) | :: | Altitude | Altitude in ft [IP] or m [SI] |
||
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
Station pressure in Psi [IP] or Pa [SI]
Set the system of units to use (SI or IP). Notes: this function HAS TO BE CALLED before the library can be used
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | UnitSystem |
Utility function to calculate humidity ratio, dew-point temperature, relative humidity, vapour pressure, moist air enthalpy, moist air volume, and degree of saturation of air given dry-bulb temperature, wet-bulb temperature, and pressure.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | TWetBulb | Wet-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
||
real, | intent(out) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(out) | :: | TDewPoint | Dew-point temperature in °F [IP] or °C [SI] |
||
real, | intent(out) | :: | RelHum | Relative humidity in range [0, 1] |
||
real, | intent(out) | :: | VapPres | Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI] |
||
real, | intent(out) | :: | MoistAirEnthalpy | Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹ [SI] |
||
real, | intent(out) | :: | MoistAirVolume | Specific volume of moist air in ft³ lb⁻¹ [IP] or in m³ kg⁻¹ [SI] |
||
real, | intent(out) | :: | DegreeOfSaturation | Degree of saturation [unitless] |
Utility function to calculate humidity ratio, wet-bulb temperature, relative humidity, vapour pressure, moist air enthalpy, moist air volume, and degree of saturation of air given dry-bulb temperature, dew-point temperature, and pressure.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | TDewPoint | Dew-point temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
||
real, | intent(out) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(out) | :: | TWetBulb | Wet-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(out) | :: | RelHum | Relative humidity in range [0, 1] |
||
real, | intent(out) | :: | VapPres | Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI] |
||
real, | intent(out) | :: | MoistAirEnthalpy | Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹ [SI] |
||
real, | intent(out) | :: | MoistAirVolume | Specific volume of moist air in ft³ lb⁻¹ [IP] or in m³ kg⁻¹ [SI] |
||
real, | intent(out) | :: | DegreeOfSaturation | Degree of saturation [unitless] |
Utility function to calculate humidity ratio, wet-bulb temperature, dew-point temperature, vapour pressure, moist air enthalpy, moist air volume, and degree of saturation of air given dry-bulb temperature, relative humidity and pressure.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | TDryBulb | Dry-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(in) | :: | RelHum | Relative humidity in range [0, 1] |
||
real, | intent(in) | :: | Pressure | Atmospheric pressure in Psi [IP] or Pa [SI] |
||
real, | intent(out) | :: | HumRatio | Humidity ratio in lb_H₂O lb_Air⁻¹ [IP] or kg_H₂O kg_Air⁻¹ [SI] |
||
real, | intent(out) | :: | TWetBulb | Wet-bulb temperature in °F [IP] or °C [SI] |
||
real, | intent(out) | :: | TDewPoint | Dew-point temperature in °F [IP] or °C [SI] |
||
real, | intent(out) | :: | VapPres | Partial pressure of water vapor in moist air in Psi [IP] or Pa [SI] |
||
real, | intent(out) | :: | MoistAirEnthalpy | Moist air enthalpy in Btu lb⁻¹ [IP] or J kg⁻¹ [SI] |
||
real, | intent(out) | :: | MoistAirVolume | Specific volume of moist air in ft³ lb⁻¹ [IP] or in m³ kg⁻¹ [SI] |
||
real, | intent(out) | :: | DegreeOfSaturation | Degree of saturation [unitless] |