Home > climate, r-code > wxcalc: building a library of weather related functions

wxcalc: building a library of weather related functions

2012 June 4

As we saw in the previous thread, the activity of eolian sands can be characterized by the ratio of precipitation to potential evapotranspiration. In order to calculate the latter, I need access to some weather related functions such as the derivation of vapor pressure from dew point temperature. Searching for the equations I needed, I stumbled over the “Weather Calculator” site (by Tim Brice and Todd Hall) hosted on a El Paso, Texas NOAA NWS site. While the calculator isn’t of much use for me, the equations behind it were available in a set of pdf files.

I have coded the conversion and other functions into an R source file ‘wxcalc.R‘. A subsequent, perfunctory search did not reveal any R packages with vapor pressure functions – so this might be of some utility. I will be updating this as I go with additional functions … and perhaps modifying some of the existing ones. Thus I will be keeping a dated copy in the following directory:
http://rhinohide.org/co2/analysis/wxcalc/lib/bak

Here is a list of the 73 functions included so far.
Tf2Tc
Tf2Tk
Tc2Tf
Tc2Tk
Tk2Tf
Tk2Tc
Tf2Tr
Tr2Tf
Tc2Tr
Tr2Tc
Pinhg2Pmmhg
Pmmhg2Pinhg
Pinhg2Pmb
Pmb2Pinhg
Pinhg2Pkpa
Pkpa2Pinhg
Pinhg2Ppsi
Ppsi2Pinhg
Pmmhg2Pmb
Pmb2Pmmhg
Pkpa2Pmmhg
Pmmhg2Ppsi
Ppsi2Pmmhg
Pmb2Pkpa
Pkpa2Pmb
Ppsi2Pmb
Pkpa2Psi
Ppsi2Pkpa
Pmmhg2Patm
Patm2Pmmgh
Pinhg2Patm
Patm2Pinhg
Ppsi2Patm
Patm2Psi
Pmb2Patm
Patm2Pmb
Pkpa2Patm
Patm2Pkpa
Wmph2Wknts
Wknts2Wmph
Wmph2Wmps
Wmps2Wmph
Wmph2Wftps
Wftps2Wmph
Wmph2Wkmph
Wkmph2Wmph
Wknts2Wmps
Wmps2Wknts
Wknts2Wftps
Wftps2Wknts
Wknts2Wkmph
Wkmph2Wknts
Wftps2Wmps
Wmps2Wftps
Wmps2Wkmph
Wkmph2Wmps
Wftps2Wkmph
Wkmph2Wftps
getVP
getRH
getVPwb
getRHwb
getTDwb
getDensityAltitude
getHeatIndex
getMixingRatio
getPressureAltitude
getSpeedOfSound
getStationPressure
getVirtualTemperature
getDewpointTemperature
getWindChill
getWindChillwps

Advertisements