diff --git a/app/lib/widgets/choropleth_map.dart b/app/lib/widgets/choropleth_map.dart index 829213203e03d8340eac0fbd6c80dac6ca25f620..f818c1f110a04d5a17a9ac4ff4531c32af270520 100644 --- a/app/lib/widgets/choropleth_map.dart +++ b/app/lib/widgets/choropleth_map.dart @@ -53,23 +53,23 @@ class ChoroplethMapState extends State<ChoroplethMap> { MapColorMapper( from: 0, to: 4, - color: Color(0xFFff0000), - text: '{0cm},{4cm}'), + color: Color(0xffff0000), + text: '{0},{1}'), MapColorMapper( from: 4, to: 8, color: Color(0xffff6a00), - text: '8cm'), + text: '2'), MapColorMapper( from: 8, to: 12, color: Color(0xFFb1ff00), - text: '12cm'), + text: '3'), MapColorMapper( from: 12, to: 400, color: Color(0xFF00d6ff), - text: '>15cm'), + text: '4'), ], ); } diff --git a/server/ModelFromNVE/logs/icemodelling_2024-05-08.log b/server/ModelFromNVE/logs/icemodelling_2024-05-08.log new file mode 100644 index 0000000000000000000000000000000000000000..4134b82376d9806aa00f249947e26dabe4b36508 --- /dev/null +++ b/server/ModelFromNVE/logs/icemodelling_2024-05-08.log @@ -0,0 +1,7 @@ +12:44: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969. +12:44: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-17 06:00:00 tm. Adding avg value -15.449999999999989. +12:44: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-02-17 06:00:00 sdfsw. Adding avg value 15.025000000000002. +12:44: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-02-18 06:00:00 sdfsw. Adding avg value 9.662500000000001. +12:44: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-18 06:00:00 sd. Adding avg value 35.3. +12:44: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-02-17 06:00:00 sd. Adding avg value 67.575. +12:44: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-02-18 06:00:00 sd. Adding avg value 66.6375. diff --git a/server/map_handler/__pycache__/update_measurements.cpython-311.pyc b/server/map_handler/__pycache__/update_measurements.cpython-311.pyc index e8071416f0505440aa1abfb89d7f0652e8615e0b..92ac977e4cdc09c13f9cd16db2a2af1f2d983f49 100644 Binary files a/server/map_handler/__pycache__/update_measurements.cpython-311.pyc and b/server/map_handler/__pycache__/update_measurements.cpython-311.pyc differ diff --git a/server/map_handler/add_new_lake.py b/server/map_handler/add_new_lake.py index 88c420355f0377e26e18dfab3e3f190e83e792aa..a674b4b91386f6ac3eb5583e9925b0354f7451b2 100644 --- a/server/map_handler/add_new_lake.py +++ b/server/map_handler/add_new_lake.py @@ -45,7 +45,7 @@ def cut_map(self, cursor, lake_name: str, cell_size_in_km: float = 0.5): bounds = polygons[0].bounds start_x, start_y, _, _ = bounds - cell_width = cell_size_in_km / 111.3200 + cell_width = 0.5 / 111.3200 cell_height = cell_width / cos(start_x * 0.01745) # Process all polygons diff --git a/server/map_handler/update_measurements.py b/server/map_handler/update_measurements.py index 380b11a522f5dec202d93b5da6d6462633c1d0a6..8b4756b4687f297fd116930fb3db33be239e6cb5 100644 --- a/server/map_handler/update_measurements.py +++ b/server/map_handler/update_measurements.py @@ -54,7 +54,10 @@ def update_measurements(self, lake_name: str): avg_thickness = sub_division['AvgThickness'] # Retrieve ice statistics for current subdivision - ice_stats = get_raw_dates(ice_prognosis_raw_data(sub_div_id=subdiv_id, x=center_lat, y=center_lng)) + temp_to_date = "2024-10-12" + temp_from_date = "2024-10-19" + ice_stats = get_raw_dates(ice_prognosis_raw_data( + sub_div_id=subdiv_id, x=center_lat, y=center_lng), to_date=temp_to_date, from_date=temp_from_date) # Ice statistics were retrieved successfully if len(ice_stats) > 0 and len(ice_stats[0]) > 0: @@ -156,8 +159,10 @@ def fill_remaining_subdivisions(lake_name: str, processed_ids: list): # Fetch weather data for each subdivision from the NVE model # NB hard coded date to december 2024 for testing, remove to_date param before use - # temp_date = [datetime(2023, 12, 12)] - ice_stats = get_raw_dates(ice_prognosis_raw_data(sub_div_id=sub_div_id, x=center_lat, y=center_lng)) + temp_to_date = "2024-10-12" + temp_from_date = "2024-10-19" + ice_stats = get_raw_dates(ice_prognosis_raw_data( + sub_div_id=sub_div_id, x=center_lat, y=center_lng), to_date=temp_to_date, from_date=temp_from_date) if len(ice_stats) > 0 and len(ice_stats[0]) > 0: total_ice_thickness = ice_stats[0]['Total ice (m)']