Skip to content

Commit

Permalink
Merge pull request #207 from mccalluc/solar-radiation-units
Browse files Browse the repository at this point in the history
Correct units for "Annual cumulative horizontal solar radiation"
  • Loading branch information
FedericoTartarini authored Nov 8, 2023
2 parents 84687cb + 890a525 commit c5697bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions my_project/tab_summary/app_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down

0 comments on commit c5697bc

Please sign in to comment.