# Tests for tag $station

Station location: | Ĺōćāţĩőń with UTF8 characters
Latitude: | 45° 41.16' N
Longitude: | 121° 33.96' W
Altitude (default unit): | 100 meters
Altitude (feet): | 328 feet
Altitude (meters): | 100 meters

# Tests for tag $current

Current dateTime: | 03-Sep-2010 11:20
Current dateTime with formatting: | 11:20
Raw dateTime: | 1283538000
Outside Temperature (normal formatting) | 10.2°C
Outside Temperature (explicit unit conversion to Celsius) | 10.2°C
Outside Temperature (explicit unit conversion to Fahrenheit) | 50.3°F
Outside Temperature (explicit unit conversion to Celsius, plus formatting) | 10.158°C
Outside Temperature (explicit unit conversion to Fahrenheit, plus formatting) | 50.284°F
Outside Temperature (with explicit binding to 'wx_binding') | 10.2°C
Outside Temperature (with explicit binding to 'alt_binding') | 7.3°C
Outside Temperature with nonsense binding 'foo_binding' | ?'foo_binding'?
Outside Temperature with explicit time | 10.2°C
Outside Temperature with nonsense time | N/A
Outside Temperature trend (3 hours) | 5.7°C
Outside Temperature trend with explicit time_delta (3600 seconds) | 2.4°C
Outside Temperature trend where previous value is known to be None (9000 seconds) | N/A
Trend with nonsense type | ?'foobar'?
Barometer (normal) | 1042.3 mbar
Barometer trend (3 hours) | -3.6 mbar
Barometer using $latest | 1042.3 mbar
Barometer using $latest and explicit data binding | 1029.1 mbar at 1283538000
Wind Chill (normal) | N/A
Heat Index (normal) | N/A
Heat Index (in Celsius) | N/A
Heat Index (in Fahrenheit) | N/A
Dewpoint | N/A
Humidity | N/A
Wind | 29 kph from 129°
Rain Rate | N/A
Inside Temperature | N/A
Test tag "exists" for an existent type: $current.outTemp.exists | PASS
Test tag "exists" for a nonsense type: $current.nonsense.exists | PASS
Test tag "has_data" for an existing type with data: $current.outTemp.has_data | PASS
Test tag "has_data" for an existing type without data: $current.hail.has_data | PASS
Test tag "has_data" for a nonsense type: $current.nonsense.has_data | PASS
Test for a bad observation type on a $current tag: $current.foobar | ?'foobar'?

# Tests for tag $hour

Start of hour: | 09/03/2010 11:00:00
Start of hour (unix epoch time): | 1283536800.0
Max Temperature | 10.2°C
Min Temperature | 9.7°C
Time of max temperature: | 11:20
Time of min temperature: | 11:10

# Iterate over three hours:

Start of hour | Min temperature | When
08:00 | 4.3°C | 08:10
09:00 | 5.5°C | 09:10
10:00 | 7.4°C | 10:10
11:00 | 9.7°C | 11:10

# Tests for tag $span

Current dateTime: | 03-Sep-2010 11:20
Min Temperature in last hour (via $span($time_delta=3600)): | 8.1°C
Min Temperature in last hour (via $span($hour_delta=1)): | 8.1°C
Min Temperature in last 90 min (via $span($time_delta=5400)): | 7.0°C
Min Temperature in last 90 min (via $span($hour_delta=1.5)): | 7.0°C
Max Temperature in last 24 hours (via $span($time_delta=86400)): | 26.2°C
Max Temperature in last 24 hours (via $span($hour_delta=24)): | 26.2°C
Max Temperature in last 24 hours (via $span($day_delta=1)): | 26.2°C
Min Temperature in last 7 days (via $span($time_delta=604800)): | 3.8°C
Min Temperature in last 7 days (via $span($hour_delta=168)): | 3.8°C
Min Temperature in last 7 days (via $span($day_delta=7)): | 3.8°C
Min Temperature in last 7 days (via $span($week_delta=1)): | 3.8°C
Rainfall in last 24 hours (via $span($time_delta=86400)): | 24.1 mm
Rainfall in last 24 hours (via $span($hour_delta=24)): | 24.1 mm
Rainfall in last 24 hours (via $span($day_delta=1)): | 24.1 mm
Max Windchill in last hour (existing obs type that is None): | N/A

# Tests for tag $day

Start of day: | 09/03/2010 00:00:00
Start of day (unix epoch time): | 1283497200
End of day (unix epoch time): | 1283583600
Max Temperature | 17.4°C
Min Temperature | 3.8°C
Time of max temperature: | 00:10
Time of min temperature: | 07:00
Last temperature of the day | 10.2°C
Time of the last temperature of the day | 09/03/2010 11:20:00
Max Temperature in alt_binding | 10.9°C
Min temp with explicit conversion to Celsius | 3.8°C
Min temp with explicit conversion to Fahrenheit | 38.8°F
Min temp with explicit conversion to nonsense type | $day.outTemp.min.badtype
Min temperature with inappropriate conversion: $day.outTemp.min.mbar | $day.outTemp.min.mbar
Nonexistent type: | N/A
Sum aggregation (rain) | 14.7 mm
High Wind from "$day.wind.max" | 39 kph from 90° at 01:00
High Wind from "$day.windGust.max" | 39 kph
High Wind from "$day.windSpeed.max" | 32 kph
Average wind from "$day.wind.avg" | 31 kph
High Wind from "$day.windSpeed.avg" | 31 kph
Average aggregation (wind) | 31 kph
RMS aggregation(wind) | 31 kph
Aggregation Vector Average (wind) | 30 kph
Aggregation Vector Direction (wind) | 107°
Test tag "has_data" with nonsense type | PASS
Test tag "exists" with an existing type that has no data | PASS
Test tag "has_data" with existent type that has no data | PASS
Test tag "has_data" with existent type that has data | PASS
Test for a bad observation type on a $day tag: $day.foobar.min | $day.foobar.min

# Tests for tag $yesterday

Start of yesterday: | 09/02/2010 00:00:00
Start of yesterday (unix epoch time): | 1283410800
Max Temperature yesterday | 26.2°C
Min Temperature yesterday | 4.1°C
Time of max temperature yesterday: | 19:00
Time of min temperature yesterday: | 07:00
Yesterday's last temperature | 17.9°C
Time of yesterday's last temperature | 09/03/2010 00:00:00

# Tests for tag $rainyear

Rainyear total | 1490.5 mm

# Test for tag $alltime

Max temp from $alltime.outTemp.max | 37.8°C at 02-Jul-2010 19:00
High Wind from "$alltime.wind.max" | 39 kph from 90° at 02-Jan-2010 00:00

# Tests for tag $Extras

Radar URL | "http://radar.weather.gov/ridge/lite/N0R/RTX_loop.gif"

# Tests for tag $almanac

Sunrise: | 06:29
Sunset: | 19:40
Moon: | Last quarter (29%full)

# Test for tag $unit

Tag "$unit.unit_type.outTemp" | degree_C
Tag "$unit.label.outTemp" | °C
Tag "$unit.format.outTemp" | %.1f
Example from customizing guide ("$day.outTemp.max.formatted$unit.label.outTemp") | 17.4°C
Add a new unit type, existing group | degree_C
Check its label | °C
Check its format | %.1f
Add a new unit type, new group | amp
Check its label | A
Check its format | %.1f

# Test for tag $obs

Tag "$obs.label.outTemp" | Outside Temperature

# Day images