Add the climate download, cached outside the repository, and record the source chosen
This commit is contained in:
1 parent
15dbf07603
commit
91c2bd1c47
12 files changed
+690
No files matched your search
@@ -0,0 +1 @@
|
||||
{"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 1, "VALUE": 6.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 2, "VALUE": 8.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 3, "VALUE": 11.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 4, "VALUE": 14.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 5, "VALUE": 18.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 6, "VALUE": 21.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 7, "VALUE": 24.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 8, "VALUE": 24.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 9, "VALUE": 20.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 10, "VALUE": 14.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 11, "VALUE": 9.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-123.1, 49.2]}, "properties": {"STN_ID": 1111, "STATION_NAME": "FIXTURE 1111", "MONTH": 12, "VALUE": 6.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-114.0, 51.0]}, "properties": {"STN_ID": 2222, "STATION_NAME": "FIXTURE 2222", "MONTH": 1, "VALUE": -2.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-114.0, 51.0]}, "properties": {"STN_ID": 2222, "STATION_NAME": "FIXTURE 2222", "MONTH": 2, "VALUE": 0.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-114.0, 51.0]}, "properties": {"STN_ID": 2222, "STATION_NAME": "FIXTURE 2222", "MONTH": 3, "VALUE": 5.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-114.0, 51.0]}, "properties": {"STN_ID": 2222, "STATION_NAME": "FIXTURE 2222", "MONTH": 4, "VALUE": 11.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-114.0, 51.0]}, "properties": {"STN_ID": 2222, "STATION_NAME": "FIXTURE 2222", "MONTH": 5, "VALUE": 17.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-114.0, 51.0]}, "properties": {"STN_ID": 2222, "STATION_NAME": "FIXTURE 2222", "MONTH": 6, "VALUE": 21.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-114.0, 51.0]}, "properties": {"STN_ID": 2222, "STATION_NAME": "FIXTURE 2222", "MONTH": 7, "VALUE": 24.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-114.0, 51.0]}, "properties": {"STN_ID": 2222, "STATION_NAME": "FIXTURE 2222", "MONTH": 8, "VALUE": 24.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geometry": {"type": "Point", "coordinates": [-114.0, 51.0]}, "properties": {"STN_ID": 2222, "STATION_NAME": "FIXTURE 2222", "MONTH": 9, "VALUE": 19.0, "E_NORMAL_ELEMENT_NAME": "Mean daily max temperature deg C"}}, {"type": "Feature", "geoLine truncated
|
||||
@@ -0,0 +1,13 @@
|
||||
"STATION","DATE","LATITUDE","LONGITUDE","ELEVATION","NAME","month","MLY-TMAX-NORMAL"
|
||||
"USW00000001","01","37.7","-119.5","1500.0","FIXTURE","01","50.0"
|
||||
"USW00000001","02","37.7","-119.5","1500.0","FIXTURE","02","54.0"
|
||||
"USW00000001","03","37.7","-119.5","1500.0","FIXTURE","03","59.0"
|
||||
"USW00000001","04","37.7","-119.5","1500.0","FIXTURE","04","64.0"
|
||||
"USW00000001","05","37.7","-119.5","1500.0","FIXTURE","05","72.0"
|
||||
"USW00000001","06","37.7","-119.5","1500.0","FIXTURE","06","82.0"
|
||||
"USW00000001","07","37.7","-119.5","1500.0","FIXTURE","07","90.0"
|
||||
"USW00000001","08","37.7","-119.5","1500.0","FIXTURE","08","89.0"
|
||||
"USW00000001","09","37.7","-119.5","1500.0","FIXTURE","09","82.0"
|
||||
"USW00000001","10","37.7","-119.5","1500.0","FIXTURE","10","71.0"
|
||||
"USW00000001","11","37.7","-119.5","1500.0","FIXTURE","11","58.0"
|
||||
"USW00000001","12","37.7","-119.5","1500.0","FIXTURE","12","50.0"
|
||||
|
@@ -0,0 +1,13 @@
|
||||
"STATION","DATE","LATITUDE","LONGITUDE","ELEVATION","NAME","month","MLY-TMAX-NORMAL"
|
||||
"USW00000002","01","32.2","-110.9","800.0","FIXTURE","01","66.0"
|
||||
"USW00000002","02","32.2","-110.9","800.0","FIXTURE","02","70.0"
|
||||
"USW00000002","03","32.2","-110.9","800.0","FIXTURE","03","77.0"
|
||||
"USW00000002","04","32.2","-110.9","800.0","FIXTURE","04","85.0"
|
||||
"USW00000002","05","32.2","-110.9","800.0","FIXTURE","05","94.0"
|
||||
"USW00000002","06","32.2","-110.9","800.0","FIXTURE","06","104.0"
|
||||
"USW00000002","07","32.2","-110.9","800.0","FIXTURE","07","103.0"
|
||||
"USW00000002","08","32.2","-110.9","800.0","FIXTURE","08","101.0"
|
||||
"USW00000002","09","32.2","-110.9","800.0","FIXTURE","09","97.0"
|
||||
"USW00000002","10","32.2","-110.9","800.0","FIXTURE","10","88.0"
|
||||
"USW00000002","11","32.2","-110.9","800.0","FIXTURE","11","75.0"
|
||||
"USW00000002","12","32.2","-110.9","800.0","FIXTURE","12","66.0"
|
||||
|
@@ -0,0 +1,13 @@
|
||||
"STATION","DATE","LATITUDE","LONGITUDE","ELEVATION","NAME","month","MLY-TMAX-NORMAL"
|
||||
"USW00000003","01","47.6","-122.3","10.0","FIXTURE","01","47.0"
|
||||
"USW00000003","02","47.6","-122.3","10.0","FIXTURE","02","50.0"
|
||||
"USW00000003","03","47.6","-122.3","10.0","FIXTURE","03","54.0"
|
||||
"USW00000003","04","47.6","-122.3","10.0","FIXTURE","04","59.0"
|
||||
"USW00000003","05","47.6","-122.3","10.0","FIXTURE","05","65.0"
|
||||
"USW00000003","06","47.6","-122.3","10.0","FIXTURE","06","70.0"
|
||||
"USW00000003","07","47.6","-122.3","10.0","FIXTURE","07","76.0"
|
||||
"USW00000003","08","47.6","-122.3","10.0","FIXTURE","08","77.0"
|
||||
"USW00000003","09","47.6","-122.3","10.0","FIXTURE","09","72.0"
|
||||
"USW00000003","10","47.6","-122.3","10.0","FIXTURE","10","62.0"
|
||||
"USW00000003","11","47.6","-122.3","10.0","FIXTURE","11","52.0"
|
||||
"USW00000003","12","47.6","-122.3","10.0","FIXTURE","12","47.0"
|
||||
|
@@ -0,0 +1,3 @@
|
||||
USW00000001 37.7000 -119.5000 1500.0 CA FIXTURE SIERRA
|
||||
USW00000002 32.2000 -110.9000 800.0 AZ FIXTURE DESERT
|
||||
USW00000003 47.6000 -122.3000 10.0 WA FIXTURE COAST
|
||||
@@ -0,0 +1 @@
|
||||
{"latitude": 37.7, "longitude": -119.5, "elevation": 3400.0, "daily_units": {"time": "iso8601", "temperature_2m_max": "\u00b0C", "snow_depth_max": "m"}, "daily": {"time": ["2015-01-01", "2015-01-02", "2015-01-03", "2015-01-04", "2015-01-05", "2015-01-06", "2015-01-07", "2015-01-08", "2015-01-09", "2015-01-10", "2015-01-11", "2015-01-12", "2015-01-13", "2015-01-14", "2015-01-15", "2015-01-16", "2015-01-17", "2015-01-18", "2015-01-19", "2015-01-20", "2015-01-21", "2015-01-22", "2015-01-23", "2015-01-24", "2015-01-25", "2015-01-26", "2015-01-27", "2015-01-28", "2015-01-29", "2015-01-30", "2015-01-31", "2015-02-01", "2015-02-02", "2015-02-03", "2015-02-04", "2015-02-05", "2015-02-06", "2015-02-07", "2015-02-08", "2015-02-09", "2015-02-10", "2015-02-11", "2015-02-12", "2015-02-13", "2015-02-14", "2015-02-15", "2015-02-16", "2015-02-17", "2015-02-18", "2015-02-19", "2015-02-20", "2015-02-21", "2015-02-22", "2015-02-23", "2015-02-24", "2015-02-25", "2015-02-26", "2015-02-27", "2015-02-28", "2015-03-01", "2015-03-02", "2015-03-03", "2015-03-04", "2015-03-05", "2015-03-06", "2015-03-07", "2015-03-08", "2015-03-09", "2015-03-10", "2015-03-11", "2015-03-12", "2015-03-13", "2015-03-14", "2015-03-15", "2015-03-16", "2015-03-17", "2015-03-18", "2015-03-19", "2015-03-20", "2015-03-21", "2015-03-22", "2015-03-23", "2015-03-24", "2015-03-25", "2015-03-26", "2015-03-27", "2015-03-28", "2015-03-29", "2015-03-30", "2015-03-31", "2015-04-01", "2015-04-02", "2015-04-03", "2015-04-04", "2015-04-05", "2015-04-06", "2015-04-07", "2015-04-08", "2015-04-09", "2015-04-10", "2015-04-11", "2015-04-12", "2015-04-13", "2015-04-14", "2015-04-15", "2015-04-16", "2015-04-17", "2015-04-18", "2015-04-19", "2015-04-20", "2015-04-21", "2015-04-22", "2015-04-23", "2015-04-24", "2015-04-25", "2015-04-26", "2015-04-27", "2015-04-28", "2015-04-29", "2015-04-30", "2015-05-01", "2015-05-02", "2015-05-03", "2015-05-04", "2015-05-05", "2015-05-06", "2015-05-07", "2015-05-08", "2015-05-09", "2015-05-10", "2015-05-11", "2015-05-12", "2015-05-13", "2015-05-14", "2015-05-15", "2015-05-16", "2015-05-17", "2015-05-18", "2015-05-19", "2015-05-20", "2015-05-21", "2015-05-22", "2015-05-23", "2015-05-24", "2015-05-25", "2015-05-26", "2015-05-27", "2015-05-28", "2015-05-29", "2015-05-30", "2015-05-31", "2015-06-01", "2015-06-02", "2015-06-03", "2015-06-04", "2015-06-05", "2015-06-06", "2015-06-07", "2015-06-08", "2015-06-09", "2015-06-10", "2015-06-11", "2015-06-12", "2015-06-13", "2015-06-14", "2015-06-15", "2015-06-16", "2015-06-17", "2015-06-18", "2015-06-19", "2015-06-20", "2015-06-21", "2015-06-22", "2015-06-23", "2015-06-24", "2015-06-25", "2015-06-26", "2015-06-27", "2015-06-28", "2015-06-29", "2015-06-30", "2015-07-01", "2015-07-02", "2015-07-03", "2015-07-04", "2015-07-05", "2015-07-06", "2015-07-07", "2015-07-08", "2015-07-09", "2015-07-10", "2015-07-11", "2015-07-12", "2015-07-13", "2015-07-14", "2015-07-15", "2015-07-16", "2015-07-17", "2015-07-18", "2015-07-19", "2015-07-20", "2015-07-21", "2015-07-22", "2015-07-23", "2015-07-24", "2015-07-25", "2015-07-26", "2015-07-27", "2015-07-28", "2015-07-29", "2015-07-30", "2015-07-31", "2015-08-01", "2015-08-02", "2015-08-03", "2015-08-04", "2015-08-05", "2015-08-06", "2015-08-07", "2015-08-08", "2015-08-09", "2015-08-10", "2015-08-11", "2015-08-12", "2015-08-13", "2015-08-14", "2015-08-15", "2015-08-16", "2015-08-17", "2015-08-18", "2015-08-19", "2015-08-20", "2015-08-21", "2015-08-22", "2015-08-23", "2015-08-24", "2015-08-25", "2015-08-26", "2015-08-27", "2015-08-28", "2015-08-29", "2015-08-30", "2015-08-31", "2015-09-01", "2015-09-02", "2015-09-03", "2015-09-04", "2015-09-05", "2015-09-06", "2015-09-07", "2015-09-08", "2015-09-09", "2015-09-10", "2015-09-11", "2015-09-12", "2015-09-13", "2015-09-14", "2015-09-15", "2015-09-16", "2015-09-17", "2015-09-18", "2015-09-19", "2015-09-20", "2015-09-21", "2015-09-22", "2015-09-23", "2015-09-24", "2015-09-25", "2015-09-26", "2015-09-27", "2015-09-28", "2015-09-29", "2015-09-30", "2015-10-01", "2015-10-02", "2015-10-03", "2015-10-04", "2015-10-05", "2015-10-06", "2015-10-07", "2015-10-08", "2015-10-09", "2015-10-10", "2015-10-11", "2015-10-12", "2015-10-13", "2015-10-14", "2015-10-15", "2015-10-16", "2015-10-17", "2015-10-18", "2015-10-19", "2015-10-20", "2015-10-21", "2015-10-22", "2015-10-23", "2015-10-24", "2015-10-25", "2015-10-26", "2015-10-27", "2015-10-28", "2015-10-29", "2015-10-30", "2015-10-31", "2015-11-01", "2015-11-02", "2015-11-03", "2015-11-04", "2015-11-05", "2015-11-06", "2015-11-07", "2015-11-08", "2015-11-09", "2015-11-10", "2015-11-11", "2015-11-12", "2015-11-13", "2015-11-14", "2015-11-15", "2015-11-16", "2015-11-17", "2015-11-18", "2015-11-19", "2015-11-20", "2015-11-21", "2015-11-22", "2015-11-23", "2015-11-24", "2015-11-25", "2015-11-26", "2015-11-27", "2015-11-28", "2015-11-29", "2015-11-30", "2015-12-01", "2015-12-02", "2015-12-03", "2015-12-04", "2015-12-05", "2015-12-06", "2015-12-07", "2015-12-08", "2015-12-09", "2015-12-10", "2015-12-11Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"latitude": 37.7, "longitude": -119.5, "elevation": 20.0, "daily_units": {"time": "iso8601", "temperature_2m_max": "\u00b0C", "snow_depth_max": "m"}, "daily": {"time": ["2015-01-01", "2015-01-02", "2015-01-03", "2015-01-04", "2015-01-05", "2015-01-06", "2015-01-07", "2015-01-08", "2015-01-09", "2015-01-10", "2015-01-11", "2015-01-12", "2015-01-13", "2015-01-14", "2015-01-15", "2015-01-16", "2015-01-17", "2015-01-18", "2015-01-19", "2015-01-20", "2015-01-21", "2015-01-22", "2015-01-23", "2015-01-24", "2015-01-25", "2015-01-26", "2015-01-27", "2015-01-28", "2015-01-29", "2015-01-30", "2015-01-31", "2015-02-01", "2015-02-02", "2015-02-03", "2015-02-04", "2015-02-05", "2015-02-06", "2015-02-07", "2015-02-08", "2015-02-09", "2015-02-10", "2015-02-11", "2015-02-12", "2015-02-13", "2015-02-14", "2015-02-15", "2015-02-16", "2015-02-17", "2015-02-18", "2015-02-19", "2015-02-20", "2015-02-21", "2015-02-22", "2015-02-23", "2015-02-24", "2015-02-25", "2015-02-26", "2015-02-27", "2015-02-28", "2015-03-01", "2015-03-02", "2015-03-03", "2015-03-04", "2015-03-05", "2015-03-06", "2015-03-07", "2015-03-08", "2015-03-09", "2015-03-10", "2015-03-11", "2015-03-12", "2015-03-13", "2015-03-14", "2015-03-15", "2015-03-16", "2015-03-17", "2015-03-18", "2015-03-19", "2015-03-20", "2015-03-21", "2015-03-22", "2015-03-23", "2015-03-24", "2015-03-25", "2015-03-26", "2015-03-27", "2015-03-28", "2015-03-29", "2015-03-30", "2015-03-31", "2015-04-01", "2015-04-02", "2015-04-03", "2015-04-04", "2015-04-05", "2015-04-06", "2015-04-07", "2015-04-08", "2015-04-09", "2015-04-10", "2015-04-11", "2015-04-12", "2015-04-13", "2015-04-14", "2015-04-15", "2015-04-16", "2015-04-17", "2015-04-18", "2015-04-19", "2015-04-20", "2015-04-21", "2015-04-22", "2015-04-23", "2015-04-24", "2015-04-25", "2015-04-26", "2015-04-27", "2015-04-28", "2015-04-29", "2015-04-30", "2015-05-01", "2015-05-02", "2015-05-03", "2015-05-04", "2015-05-05", "2015-05-06", "2015-05-07", "2015-05-08", "2015-05-09", "2015-05-10", "2015-05-11", "2015-05-12", "2015-05-13", "2015-05-14", "2015-05-15", "2015-05-16", "2015-05-17", "2015-05-18", "2015-05-19", "2015-05-20", "2015-05-21", "2015-05-22", "2015-05-23", "2015-05-24", "2015-05-25", "2015-05-26", "2015-05-27", "2015-05-28", "2015-05-29", "2015-05-30", "2015-05-31", "2015-06-01", "2015-06-02", "2015-06-03", "2015-06-04", "2015-06-05", "2015-06-06", "2015-06-07", "2015-06-08", "2015-06-09", "2015-06-10", "2015-06-11", "2015-06-12", "2015-06-13", "2015-06-14", "2015-06-15", "2015-06-16", "2015-06-17", "2015-06-18", "2015-06-19", "2015-06-20", "2015-06-21", "2015-06-22", "2015-06-23", "2015-06-24", "2015-06-25", "2015-06-26", "2015-06-27", "2015-06-28", "2015-06-29", "2015-06-30", "2015-07-01", "2015-07-02", "2015-07-03", "2015-07-04", "2015-07-05", "2015-07-06", "2015-07-07", "2015-07-08", "2015-07-09", "2015-07-10", "2015-07-11", "2015-07-12", "2015-07-13", "2015-07-14", "2015-07-15", "2015-07-16", "2015-07-17", "2015-07-18", "2015-07-19", "2015-07-20", "2015-07-21", "2015-07-22", "2015-07-23", "2015-07-24", "2015-07-25", "2015-07-26", "2015-07-27", "2015-07-28", "2015-07-29", "2015-07-30", "2015-07-31", "2015-08-01", "2015-08-02", "2015-08-03", "2015-08-04", "2015-08-05", "2015-08-06", "2015-08-07", "2015-08-08", "2015-08-09", "2015-08-10", "2015-08-11", "2015-08-12", "2015-08-13", "2015-08-14", "2015-08-15", "2015-08-16", "2015-08-17", "2015-08-18", "2015-08-19", "2015-08-20", "2015-08-21", "2015-08-22", "2015-08-23", "2015-08-24", "2015-08-25", "2015-08-26", "2015-08-27", "2015-08-28", "2015-08-29", "2015-08-30", "2015-08-31", "2015-09-01", "2015-09-02", "2015-09-03", "2015-09-04", "2015-09-05", "2015-09-06", "2015-09-07", "2015-09-08", "2015-09-09", "2015-09-10", "2015-09-11", "2015-09-12", "2015-09-13", "2015-09-14", "2015-09-15", "2015-09-16", "2015-09-17", "2015-09-18", "2015-09-19", "2015-09-20", "2015-09-21", "2015-09-22", "2015-09-23", "2015-09-24", "2015-09-25", "2015-09-26", "2015-09-27", "2015-09-28", "2015-09-29", "2015-09-30", "2015-10-01", "2015-10-02", "2015-10-03", "2015-10-04", "2015-10-05", "2015-10-06", "2015-10-07", "2015-10-08", "2015-10-09", "2015-10-10", "2015-10-11", "2015-10-12", "2015-10-13", "2015-10-14", "2015-10-15", "2015-10-16", "2015-10-17", "2015-10-18", "2015-10-19", "2015-10-20", "2015-10-21", "2015-10-22", "2015-10-23", "2015-10-24", "2015-10-25", "2015-10-26", "2015-10-27", "2015-10-28", "2015-10-29", "2015-10-30", "2015-10-31", "2015-11-01", "2015-11-02", "2015-11-03", "2015-11-04", "2015-11-05", "2015-11-06", "2015-11-07", "2015-11-08", "2015-11-09", "2015-11-10", "2015-11-11", "2015-11-12", "2015-11-13", "2015-11-14", "2015-11-15", "2015-11-16", "2015-11-17", "2015-11-18", "2015-11-19", "2015-11-20", "2015-11-21", "2015-11-22", "2015-11-23", "2015-11-24", "2015-11-25", "2015-11-26", "2015-11-27", "2015-11-28", "2015-11-29", "2015-11-30", "2015-12-01", "2015-12-02", "2015-12-03", "2015-12-04", "2015-12-05", "2015-12-06", "2015-12-07", "2015-12-08", "2015-12-09", "2015-12-10", "2015-12-11",Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"latitude": 37.7, "longitude": -119.5, "elevation": 400.0, "daily_units": {"time": "iso8601", "temperature_2m_max": "\u00b0C", "snow_depth_max": "m"}, "daily": {"time": ["2015-01-01", "2015-01-02", "2015-01-03", "2015-01-04", "2015-01-05", "2015-01-06", "2015-01-07", "2015-01-08", "2015-01-09", "2015-01-10", "2015-01-11", "2015-01-12", "2015-01-13", "2015-01-14", "2015-01-15", "2015-01-16", "2015-01-17", "2015-01-18", "2015-01-19", "2015-01-20", "2015-01-21", "2015-01-22", "2015-01-23", "2015-01-24", "2015-01-25", "2015-01-26", "2015-01-27", "2015-01-28", "2015-01-29", "2015-01-30", "2015-01-31", "2015-02-01", "2015-02-02", "2015-02-03", "2015-02-04", "2015-02-05", "2015-02-06", "2015-02-07", "2015-02-08", "2015-02-09", "2015-02-10", "2015-02-11", "2015-02-12", "2015-02-13", "2015-02-14", "2015-02-15", "2015-02-16", "2015-02-17", "2015-02-18", "2015-02-19", "2015-02-20", "2015-02-21", "2015-02-22", "2015-02-23", "2015-02-24", "2015-02-25", "2015-02-26", "2015-02-27", "2015-02-28", "2015-03-01", "2015-03-02", "2015-03-03", "2015-03-04", "2015-03-05", "2015-03-06", "2015-03-07", "2015-03-08", "2015-03-09", "2015-03-10", "2015-03-11", "2015-03-12", "2015-03-13", "2015-03-14", "2015-03-15", "2015-03-16", "2015-03-17", "2015-03-18", "2015-03-19", "2015-03-20", "2015-03-21", "2015-03-22", "2015-03-23", "2015-03-24", "2015-03-25", "2015-03-26", "2015-03-27", "2015-03-28", "2015-03-29", "2015-03-30", "2015-03-31", "2015-04-01", "2015-04-02", "2015-04-03", "2015-04-04", "2015-04-05", "2015-04-06", "2015-04-07", "2015-04-08", "2015-04-09", "2015-04-10", "2015-04-11", "2015-04-12", "2015-04-13", "2015-04-14", "2015-04-15", "2015-04-16", "2015-04-17", "2015-04-18", "2015-04-19", "2015-04-20", "2015-04-21", "2015-04-22", "2015-04-23", "2015-04-24", "2015-04-25", "2015-04-26", "2015-04-27", "2015-04-28", "2015-04-29", "2015-04-30", "2015-05-01", "2015-05-02", "2015-05-03", "2015-05-04", "2015-05-05", "2015-05-06", "2015-05-07", "2015-05-08", "2015-05-09", "2015-05-10", "2015-05-11", "2015-05-12", "2015-05-13", "2015-05-14", "2015-05-15", "2015-05-16", "2015-05-17", "2015-05-18", "2015-05-19", "2015-05-20", "2015-05-21", "2015-05-22", "2015-05-23", "2015-05-24", "2015-05-25", "2015-05-26", "2015-05-27", "2015-05-28", "2015-05-29", "2015-05-30", "2015-05-31", "2015-06-01", "2015-06-02", "2015-06-03", "2015-06-04", "2015-06-05", "2015-06-06", "2015-06-07", "2015-06-08", "2015-06-09", "2015-06-10", "2015-06-11", "2015-06-12", "2015-06-13", "2015-06-14", "2015-06-15", "2015-06-16", "2015-06-17", "2015-06-18", "2015-06-19", "2015-06-20", "2015-06-21", "2015-06-22", "2015-06-23", "2015-06-24", "2015-06-25", "2015-06-26", "2015-06-27", "2015-06-28", "2015-06-29", "2015-06-30", "2015-07-01", "2015-07-02", "2015-07-03", "2015-07-04", "2015-07-05", "2015-07-06", "2015-07-07", "2015-07-08", "2015-07-09", "2015-07-10", "2015-07-11", "2015-07-12", "2015-07-13", "2015-07-14", "2015-07-15", "2015-07-16", "2015-07-17", "2015-07-18", "2015-07-19", "2015-07-20", "2015-07-21", "2015-07-22", "2015-07-23", "2015-07-24", "2015-07-25", "2015-07-26", "2015-07-27", "2015-07-28", "2015-07-29", "2015-07-30", "2015-07-31", "2015-08-01", "2015-08-02", "2015-08-03", "2015-08-04", "2015-08-05", "2015-08-06", "2015-08-07", "2015-08-08", "2015-08-09", "2015-08-10", "2015-08-11", "2015-08-12", "2015-08-13", "2015-08-14", "2015-08-15", "2015-08-16", "2015-08-17", "2015-08-18", "2015-08-19", "2015-08-20", "2015-08-21", "2015-08-22", "2015-08-23", "2015-08-24", "2015-08-25", "2015-08-26", "2015-08-27", "2015-08-28", "2015-08-29", "2015-08-30", "2015-08-31", "2015-09-01", "2015-09-02", "2015-09-03", "2015-09-04", "2015-09-05", "2015-09-06", "2015-09-07", "2015-09-08", "2015-09-09", "2015-09-10", "2015-09-11", "2015-09-12", "2015-09-13", "2015-09-14", "2015-09-15", "2015-09-16", "2015-09-17", "2015-09-18", "2015-09-19", "2015-09-20", "2015-09-21", "2015-09-22", "2015-09-23", "2015-09-24", "2015-09-25", "2015-09-26", "2015-09-27", "2015-09-28", "2015-09-29", "2015-09-30", "2015-10-01", "2015-10-02", "2015-10-03", "2015-10-04", "2015-10-05", "2015-10-06", "2015-10-07", "2015-10-08", "2015-10-09", "2015-10-10", "2015-10-11", "2015-10-12", "2015-10-13", "2015-10-14", "2015-10-15", "2015-10-16", "2015-10-17", "2015-10-18", "2015-10-19", "2015-10-20", "2015-10-21", "2015-10-22", "2015-10-23", "2015-10-24", "2015-10-25", "2015-10-26", "2015-10-27", "2015-10-28", "2015-10-29", "2015-10-30", "2015-10-31", "2015-11-01", "2015-11-02", "2015-11-03", "2015-11-04", "2015-11-05", "2015-11-06", "2015-11-07", "2015-11-08", "2015-11-09", "2015-11-10", "2015-11-11", "2015-11-12", "2015-11-13", "2015-11-14", "2015-11-15", "2015-11-16", "2015-11-17", "2015-11-18", "2015-11-19", "2015-11-20", "2015-11-21", "2015-11-22", "2015-11-23", "2015-11-24", "2015-11-25", "2015-11-26", "2015-11-27", "2015-11-28", "2015-11-29", "2015-11-30", "2015-12-01", "2015-12-02", "2015-12-03", "2015-12-04", "2015-12-05", "2015-12-06", "2015-12-07", "2015-12-08", "2015-12-09", "2015-12-10", "2015-12-11"Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"error": true, "reason": "No data"}
|
||||
@@ -0,0 +1,154 @@
|
||||
"""Tests for tools/season_climate.py. All offline: an injected opener
|
||||
serves the canned responses in fixtures/season/.
|
||||
|
||||
Run from the repository root:
|
||||
python3 -m unittest discover tools/tests
|
||||
"""
|
||||
import io
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
sys.dont_write_bytecode = True
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
import season_climate as C # noqa: E402
|
||||
import validate as V # noqa: E402
|
||||
|
||||
FIX = os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures", "season")
|
||||
|
||||
|
||||
def fixture_bytes(name):
|
||||
with open(os.path.join(FIX, name), "rb") as f:
|
||||
return f.read()
|
||||
|
||||
|
||||
class FakeResponse(io.BytesIO):
|
||||
headers = {}
|
||||
|
||||
|
||||
class FakeOpener:
|
||||
"""Routes by address to a fixture and counts the calls."""
|
||||
|
||||
def __init__(self, open_meteo="open_meteo_alpine.json"):
|
||||
self.calls = []
|
||||
self.open_meteo = open_meteo
|
||||
|
||||
def __call__(self, req, timeout=None):
|
||||
url = req.full_url if hasattr(req, "full_url") else str(req)
|
||||
self.calls.append(url)
|
||||
if "archive-api.open-meteo.com" in url:
|
||||
return FakeResponse(fixture_bytes(self.open_meteo))
|
||||
if "ghcnd-stations.txt" in url:
|
||||
return FakeResponse(fixture_bytes("noaa_stations.txt"))
|
||||
if "normals-monthly" in url:
|
||||
for sid in ("USW00000001", "USW00000002", "USW00000003"):
|
||||
if sid in url:
|
||||
return FakeResponse(fixture_bytes(f"noaa_{sid}.csv"))
|
||||
raise AssertionError(url)
|
||||
if "api.weather.gc.ca" in url:
|
||||
return FakeResponse(fixture_bytes("eccc_normals.geojson"))
|
||||
raise AssertionError(url)
|
||||
|
||||
|
||||
class OpenMeteoTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
C.DELAY_S = 0
|
||||
|
||||
def test_a_fixture_response_becomes_point_normals(self):
|
||||
with tempfile.TemporaryDirectory() as cache:
|
||||
got = C.fetch_normals(37.7, -119.5, 3400.0, cache=cache, opener=FakeOpener())
|
||||
self.assertIsNotNone(got)
|
||||
self.assertEqual(len(got.tmax_c), 12)
|
||||
self.assertEqual(len(got.snow_cm), 12)
|
||||
self.assertEqual(got.tmax_c[0], -2.0) # January, degrees C
|
||||
self.assertEqual(got.tmax_c[6], 21.0) # July
|
||||
self.assertEqual(got.snow_cm[0], 120.0) # 1.2 metres of snow, in cm
|
||||
self.assertEqual(got.snow_cm[7], 0.0)
|
||||
|
||||
def test_values_are_rounded_to_a_tenth(self):
|
||||
with tempfile.TemporaryDirectory() as cache:
|
||||
got = C.fetch_normals(37.7, -119.5, None, cache=cache, opener=FakeOpener())
|
||||
for value in list(got.tmax_c) + list(got.snow_cm):
|
||||
self.assertEqual(value, round(value, 1))
|
||||
|
||||
def test_cell_elevation_is_used_when_none_is_asked_for(self):
|
||||
with tempfile.TemporaryDirectory() as cache:
|
||||
got = C.fetch_normals(37.7, -119.5, None, cache=cache, opener=FakeOpener())
|
||||
self.assertEqual(got.elev_m, 3400.0)
|
||||
|
||||
def test_a_second_call_reads_the_cache_not_the_network(self):
|
||||
opener = FakeOpener()
|
||||
with tempfile.TemporaryDirectory() as cache:
|
||||
first = C.fetch_normals(37.7, -119.5, 3400.0, cache=cache, opener=opener)
|
||||
second = C.fetch_normals(37.7, -119.5, 3400.0, cache=cache, opener=opener)
|
||||
self.assertEqual(first, second)
|
||||
self.assertEqual(len(opener.calls), 1)
|
||||
|
||||
def test_a_point_with_no_data_returns_none_not_zeros(self):
|
||||
with tempfile.TemporaryDirectory() as cache:
|
||||
got = C.fetch_normals(0.0, 0.0, None, cache=cache,
|
||||
opener=FakeOpener("open_meteo_nodata.json"))
|
||||
self.assertIsNone(got)
|
||||
|
||||
def test_the_desert_and_coast_fixtures_parse(self):
|
||||
with tempfile.TemporaryDirectory() as cache:
|
||||
desert = C.fetch_normals(32.2, -110.9, 800.0, cache=cache,
|
||||
opener=FakeOpener("open_meteo_desert.json"))
|
||||
coast = C.fetch_normals(47.6, -122.3, 10.0, cache=cache,
|
||||
opener=FakeOpener("open_meteo_coast.json"))
|
||||
self.assertEqual(desert.tmax_c[6], 44.0)
|
||||
self.assertTrue(all(v == 0.0 for v in desert.snow_cm))
|
||||
self.assertEqual(coast.tmax_c[0], 9.0)
|
||||
|
||||
|
||||
class NoaaTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
C.DELAY_S = 0
|
||||
|
||||
def test_noaa_fixture_becomes_point_normals(self):
|
||||
with tempfile.TemporaryDirectory() as cache:
|
||||
got = C.fetch_noaa(37.71, -119.51, 1500.0, cache=cache, opener=FakeOpener())
|
||||
self.assertIsNotNone(got)
|
||||
self.assertEqual(len(got.tmax_c), 12)
|
||||
self.assertEqual(got.tmax_c[0], 10.0) # 50 F in C, no lapse change
|
||||
self.assertIsNone(got.snow_cm) # the normals carry no snow depth
|
||||
|
||||
def test_noaa_lapse_adjusts_to_the_point_elevation(self):
|
||||
with tempfile.TemporaryDirectory() as cache:
|
||||
got = C.fetch_noaa(37.71, -119.51, 2500.0, cache=cache, opener=FakeOpener())
|
||||
self.assertEqual(got.tmax_c[0], 3.5) # 10 C less 6.5 C for 1000 m
|
||||
|
||||
def test_noaa_returns_none_far_from_any_station(self):
|
||||
with tempfile.TemporaryDirectory() as cache:
|
||||
got = C.fetch_noaa(66.5, -65.0, None, cache=cache, opener=FakeOpener())
|
||||
self.assertIsNone(got)
|
||||
|
||||
|
||||
class EcccTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
C.DELAY_S = 0
|
||||
|
||||
def test_eccc_fixture_becomes_point_normals(self):
|
||||
with tempfile.TemporaryDirectory() as cache:
|
||||
got = C.fetch_eccc(49.25, -123.05, None, cache=cache, opener=FakeOpener())
|
||||
self.assertIsNotNone(got)
|
||||
self.assertEqual(got.tmax_c[0], 6.0) # the nearer of the two stations
|
||||
self.assertEqual(got.tmax_c[6], 24.0)
|
||||
self.assertIsNone(got.snow_cm)
|
||||
|
||||
|
||||
class SourceTest(unittest.TestCase):
|
||||
def test_the_cache_is_outside_the_repository(self):
|
||||
self.assertFalse(os.path.abspath(C.CACHE_DIR).startswith(os.path.abspath(V.ROOT)))
|
||||
|
||||
def test_the_source_says_its_licence_and_period(self):
|
||||
for key in ("name", "publisher", "url", "licence", "period"):
|
||||
self.assertIn(key, C.SOURCE)
|
||||
self.assertTrue(str(C.SOURCE[key]).strip())
|
||||
self.assertIn("CC BY 4.0", C.SOURCE["licence"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user