comparison db/tidy-observations @ 0:9dab44dcb331

Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
author Daniel O'Connor <darius@dons.net.au>
date Tue, 09 Feb 2010 13:44:25 +1030
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9dab44dcb331
1 /*
2 * $Id: tidy-observations,v 1.4 2010/01/03 03:03:17 grog Exp grog $
3 *
4 * Tidy up messed-up values returned from various stations.
5 */
6 USE weather
7 UPDATE remote_observations SET wind_gust = NULL WHERE wind_gust < 0;
8 UPDATE remote_observations SET rain = NULL WHERE rain < 0;
9 /* Never likely to go below this temperature here */
10 UPDATE remote_observations SET outside_temp = NULL WHERE outside_temp < -10;
11 /* This one is 0° F, which must mean something special to Wunderground */
12 UPDATE remote_observations SET outside_dewpoint = NULL WHERE outside_dewpoint = -17.8;
13 UPDATE remote_observations SET wind_gust = NULL WHERE wind_gust < 0;
14 UPDATE remote_observations SET rain = NULL WHERE rain < 0;
15 UPDATE remote_observations SET wind_speed = NULL WHERE wind_speed < 0;
16 UPDATE remote_observations SET outside_humidity = NULL WHERE outside_humidity < 0;
17 UPDATE remote_observations SET wind_direction = NULL WHERE wind_direction < 0;
18 UPDATE remote_observations SET pressure_msl = NULL WHERE pressure_msl < 900 OR pressure_msl > 1100;
19 UPDATE remote_observations SET outside_dewpoint = NULL WHERE outside_dewpoint < -20;