Package Exports
- weather-formulas
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (weather-formulas) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
weather-formulas
A library of weather calculations.
- Agnostic to input source, hook it up in any project
- I/O in SI units (International System of Units)
- Formulas and algorithms off Wikipedia with 1:1 variable naming
- All algorithms are automatically tested
Features / Currently supported
Dew Point Wind Chill (Australian) Apparent Temperature Heat Index Humidex
Install
$ npm install weather-formulas
How to use
const WF = require('weather-formulas');
const TEMPERATURE = 300, HUMIDITY = 60, WINDSPEED = 10; //300 Kelvin, 60% Relative Humidity, 10 M/S
let dewPointMF = WF.dewPointMagnusFormula(TEMPERATURE, HUMIDITY);
let dewPointAF = WF.dewPointArdenBuckEquation(TEMPERATURE, HUMIDITY);
let windChill = WF.windChillIndex(TEMPERATURE, WINDSPEED);
let apparentTemperature = WF.australianAapparentTemperature(TEMPERATURE, HUMIDITY, WINDSPEED);
let heatIndex = WF.heatIndex(TEMPERATURE, HUMIDITY); let heatIndexText = WF.heatIndexText(heatIndex); //output heat index threshold and warning text
let humidex = WF.humidex(TEMPERATURE, HUMIDITY);
let humidexText = WF.humidexText(humidex); //output humidex threshold and warning text
Miscellaneous
kelvinToCelcius(kelvin)
Contribute
Please feel free to contribute by creating a Pull Request with test code.