Skip to content

Dear Internet Explorer user: Your browser is no longer supported

Please switch to a modern browser such as Microsoft Edge, Mozilla Firefox or Google Chrome to view this website's content.

Calculating “Feels Like” Temperatures

Use the Aeris Weather API to calculate Australian Ambient Temperature (AT) or “feels like” calculations from private weather station data published to PWSweather.

I recently purchased a private weather station (PWS) that reports data every 60 seconds to PWSweather. Members of PWSweather can also sign-up to access the AerisWeather API, which allows users to access their weather station data online for downstream purposes (such as publishing to a personal website).

The Australian Bureau of Meteorology (BOM) displays “feels like” temperature readings alongside dry bulb temperatures on its website and app. This is actually known internationally as the Australian Apparent Temperature (AT) and is based on the work of Steadman (1994). It differs from models used in the United States, Canada and United Kingdom which is why I wanted to use it. My weather station does not natively calculate this metric, so I implemented a PHP routine to calculate it and publish the value to a website along with my other data.

Screen capture of Bureau of Meteorology website.
Output from the Australian Bureau of Meteorology’s website showing a dry bulb temperature of 10.4°C and “feels like” of 8.1°C for Melbourne. This is the Australian Apparent Temperature (AT) value.

There are two models of AT; one which factors in radiation and one that doesn’t. The version that factors-in radiation is complex and not utilised by the BOM. The BOM’s “feels like” metric is calculated as follows:



The vapour pressure can be calculated from the temperature and relative humidity using the equation:

\[ \rho =\frac{RH}{100}\times6.105\times e^{ \left(\frac{17.27\times T_a}{237.7 + T_a}\right)}\]

where RH is relative humidity (%).

My weather station provides data for Ta and ω whilst ρ has to be calculated from RH (which is also reported).

To do this in PHP, a call to the AerisWeather API is required:

$response = file_get_contents('');
$json = json_decode($response);
$time = $json->response->ob->dateTimeISO;

The PWSID, YOURID and YOURSECRET strings need to be replaced with your weather station ID (on PWSweather) and API credentials. This will return data in JSON format with current readings for your weather station (as last reported on PWSweather).

Next, add a PHP block that pulls out the relevant data and performs the calculations:

$rh = $json->response->ob->humidity;
$ta = $json->response->ob->tempC;
$vp = ($rh/100)*6.105*exp((17.27*$ta)/(237.7+$ta));
$ws = $json->response->ob->windSpeedKPH;
$wsm = $ws*0.277778;
$at = $ta+(0.33*$vp)-(0.70*$wsm)-4;

The AerisWeather API returns wind speed in kilometres per hour, so this needs to be changed to metres per second ($wsm) for the calculation to work.

Then to print the value on the website, call the $at variable:

<?php echo number_format($at, 1);?>&#176;

This will print the “Feels Like” temperature followed by a degrees symbol (°).



No comments have yet been submitted. Be the first!

Have Your Say

The following HTML is permitted:
<a href="" title=""> <b> <blockquote cite=""> <code> <em> <i> <q cite=""> <strike> <strong>

Comments will be published subject to the Editorial Policy.