diff --git a/README.md b/README.md index 3a036087..a6946dba 100644 --- a/README.md +++ b/README.md @@ -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**. diff --git a/cara/apps/expert.py b/cara/apps/expert.py index 7a324a7c..b017b9bb 100644 --- a/cara/apps/expert.py +++ b/cara/apps/expert.py @@ -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( diff --git a/cara/tests/models/test_piecewiseconstant.py b/cara/tests/models/test_piecewiseconstant.py index a0ba14f0..72f3d05e 100644 --- a/cara/tests/models/test_piecewiseconstant.py +++ b/cara/tests/models/test_piecewiseconstant.py @@ -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() diff --git a/cara/tests/test_known_quantities.py b/cara/tests/test_known_quantities.py index 5f463f39..91454898 100644 --- a/cara/tests/test_known_quantities.py +++ b/cara/tests/test_known_quantities.py @@ -308,7 +308,7 @@ def test_concentrations_hourly_dep_temp_startup(month, temperatures, time): def test_concentrations_hourly_dep_multipleventilation(): - m = build_hourly_dependent_model_multipleventilation('Jan') + m = build_hourly_dependent_model_multipleventilation('1') m.concentration(12.) @@ -333,7 +333,7 @@ def test_concentrations_hourly_dep_adding_artificial_transitions(month_temp_item list(np.random.random_sample(10)*24.)+list(np.arange(0,24.5,0.5)), ) def test_concentrations_refine_times(time): - month = 'Jan' + month = '1' m1 = build_hourly_dependent_model(month,intervals_open=((0, 24),)) m2 = build_hourly_dependent_model(month,intervals_open=((0, 24),), artificial_refinement=True) @@ -359,8 +359,8 @@ def build_exposure_model(concentration_model): @pytest.mark.parametrize( "month, expected_quanta", [ - ['Jan', 9.930854], - ['Jun', 37.962708], + ['1', 9.930854], + ['6', 37.962708], ], ) def test_quanta_hourly_dep(month,expected_quanta): @@ -380,8 +380,8 @@ def test_quanta_hourly_dep(month,expected_quanta): @pytest.mark.parametrize( "month, expected_quanta", [ - ['Jan', 9.993842], - ['Jun', 40.151985], + ['1', 9.993842], + ['6', 40.151985], ], ) def test_quanta_hourly_dep_refined(month,expected_quanta):