From 890a5254a64646a5d6d4321c5c758bca9eb469fd Mon Sep 17 00:00:00 2001 From: mccalluc Date: Mon, 6 Nov 2023 10:48:47 -0500 Subject: [PATCH] Correct units for "Annual cumulative horizontal solar radiation" --- my_project/tab_summary/app_summary.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/my_project/tab_summary/app_summary.py b/my_project/tab_summary/app_summary.py index bab78f1..c88d482 100644 --- a/my_project/tab_summary/app_summary.py +++ b/my_project/tab_summary/app_summary.py @@ -231,11 +231,11 @@ def update_location_info(ts, df, meta, si_ip): pass # global horizontal irradiance - total_solar_rad_unit = mapping_dictionary["glob_hor_rad"][si_ip]["unit"] - total_solar_rad = ( - f"Annual cumulative horizontal solar radiation: {round(df['glob_hor_rad'].sum() /1000, 2)} " - + total_solar_rad_unit - ) + # Note that the value is divided by 1000, so a corresponding change is made in the unit: + total_solar_rad_value = round(df['glob_hor_rad'].sum() / 1000, 2) + total_solar_rad_unit = 'k' + mapping_dictionary["glob_hor_rad"][si_ip]["unit"] + total_solar_rad = f"Annual cumulative horizontal solar radiation: {total_solar_rad_value} {total_solar_rad_unit}" + total_diffuse_rad = f"Percentage of diffuse horizontal solar radiation: {round(df['dif_hor_rad'].sum()/df['glob_hor_rad'].sum()*100, 1)} %" tmp_unit = mapping_dictionary["DBT"][si_ip]["unit"] average_yearly_tmp = (