Chapter 8 Miscellaneous functions
8.1 Downloading data from weather station networks
National meteorological agencies are increasingly adopting an open data philosophy. Previous versions of meteoland included functions for accessing daily weather data from different meteorological agencies in Spain. Since ver. 2.0.0 these functions have been deprecated. Instead, the user is strongly recommended to use package meteospain.
8.2 Reshaping data obtained from other packages
meteoland provides functions to facilitate reshaping weather data acquired using other R packages into the meteoland format. At present, two packages are supported, meteospain, worldmet. The corresponding data reshape functions are called meteospain2meteoland()
and worldmet2meteoland()
.
8.3 Physical utility functions
Several utility functions are included in the package corresponding to physical calculations:
utils_atmosphericPressure()
: Atmospheric pressure \(P_{atm}\) in kPa from elevation \(z\) in m. \[\begin{equation} P_{atm}(z) = 101.32500 \cdot \left[1.0 - 2.2569 \cdot 10^{-5} \cdot z \right]^{5.2353} \end{equation}\]utils_airDensity()
: Air density in \(kg \cdot m^{-3}\) from temperature in Celsius and atmospheric pressure: \[\begin{equation} \rho_{air} = \frac{P_{atm}}{1.01 \cdot (T+273.16) \cdot 0.287} \end{equation}\]utils_saturationVP()
: Saturation water vapour pressure \(VP\) in kPa from temperature \(T\) in degrees Celsius: \[\begin{equation} VP(T) = 0.61078 \cdot e^{\left(\frac{17.269\cdot T}{237.3+T}\right)} \end{equation}\]saturationVaporPressureCurveSlope()
: Saturation water vapour pressure curve slope \(s_{vp}\) in \(kPa \cdot ^\circ C^{-1}\) from temperature \(T\) in degrees Celsius: \[\begin{equation} s_{vp}(T) = 4098.0 \cdot \frac{0.6108 \cdot e^{(17.27 \cdot T)/(T + 237.3)}}{(T + 237.3)^2} \end{equation}\]utils_averageDailyVP()
: Average daily water vapour pressure \(vp_{atm}\) in kPa calculated from minimum and maximum temperatures and relative humidities: \[\begin{equation} vp_{atm} = \frac{VP(T_{min}) \cdot (RH_{max}/100) + VP(T_{max}) \cdot (RH_{min}/100)}{2} \end{equation}\]utils_latentHeatVaporisation()
: Latent heat of vaporisation \(\lambda_v\) in \(MJ·kg^{-1}\) from temperature in degrees Celsius: \[\begin{equation} \lambda_v(T) = (2.5023-(0.00243054 \cdot T)) \end{equation}\]utils_latentHeatVaporisationMol()
: Latent heat of vaporisation \(\lambda_v\) in \(J·mol^{-1}\) from temperature in degrees Celsius: \[\begin{equation} \lambda_v(T) = (2.5023\cdot 10^6-(2430.54\cdot T))\cdot 0.018 \end{equation}\]utils_psychrometricConstant()
: Psychrometric constant in \(kPa· ^\circ C^{-1}\) from temperature in degrees Celsius and atmospheric pressure in kPa: \[\begin{equation} \gamma_v = \frac{0.00163 \cdot P_{atm}}{\lambda_v(T)} \end{equation}\]