Changes to temperature handling

This commit is contained in:
jdevine 2021-08-10 18:57:17 +02:00
parent 629732533c
commit 27acb96b65
3 changed files with 5 additions and 5 deletions

View file

@ -65,9 +65,9 @@ In order for the natural ventilation option to work correctly for other geograph
There are some scripts to help download and process the temperature data from your nearest weather station in the https://gitlab.cern.ch/cara/climatology-data repository.
Once you have used the scripts, the hourly temperature data for your location should be added to the file `data.py` in place of the default values for Geneva. The temperature values for your locations should be pasted into the `Geneva_hourly_temperatures_celsius_per_hour` variable, **without changing the variable name** in the following format:
`'Jan': [0.2, -0.3, -0.5, -0.9, -1.1, -1.4, -1.5, -1.5, -1.1, 0.1, 1.5,
`'1': [0.2, -0.3, -0.5, -0.9, -1.1, -1.4, -1.5, -1.5, -1.1, 0.1, 1.5,
2.8, 3.8, 4.4, 4.5, 4.4, 4.4, 3.9, 3.1, 2.7, 2.2, 1.7, 1.5, 1.1],
'Feb': [0.9, 0.3, 0.0, -0.5, -0.7, -1.1, -1.2, -1.1, -0.7, 0.8, 2.5,
'2': [0.9, 0.3, 0.0, -0.5, -0.7, -1.1, -1.2, -1.1, -0.7, 0.8, 2.5,
4.2, 5.4, 6.2, 6.3, 6.2, 6.1, 5.5, 4.5, 4.1, 3.5, 2.8, 2.5, 2.0],...`
CARA currently supports **only one geographic location for weather data per instance**.

View file

@ -360,10 +360,10 @@ class ModelWidgets(View):
def _build_month(self, node) -> WidgetGroup:
month_choice = widgets.Select(options=list(data.GenevaTemperatures.keys()), value='Jan')
month_choice = widgets.Select(options=list(data.Temperatures.keys()), value='1')
def on_month_change(change):
node.outside_temp = data.GenevaTemperatures[change['new']]
node.outside_temp = data.Temperatures[change['new']]
month_choice.observe(on_month_change, names=['value'])
return WidgetGroup(

View file

@ -81,5 +81,5 @@ def test_piecewiseconstant_vs_interval(time):
def test_piecewiseconstant_transition_times():
outside_temp = data.GenevaTemperatures['Jan']
outside_temp = data.GenevaTemperatures['1']
assert set(outside_temp.transition_times) == outside_temp.interval().transition_times()