Skip to content

Commit

Permalink
fix(postprocess): Output radiation values in kWh
Browse files Browse the repository at this point in the history
This is what we do for radiation in Ladybug and I think it is closer to what people will expect.
  • Loading branch information
chriswmackey committed Jul 1, 2021
1 parent 566e5f0 commit 4ed16a3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions honeybee_radiance/cli/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ def annual_irradiance(folder, wea, timestep, sub_folder):
\b
This command generates 3 files for each input grid.
average_irradiance/{grid-name}.res -> Average Irradiance
peak_irradiance/{grid-name}.res -> Peak Irradiance
cumulative_radiation/{grid-name}.res -> Cumulative Radiation
average_irradiance/{grid-name}.res -> Average Irradiance (W/m2)
peak_irradiance/{grid-name}.res -> Peak Irradiance (W/m2)
cumulative_radiation/{grid-name}.res -> Cumulative Radiation (kWh/m2)
\b
Args:
Expand Down Expand Up @@ -293,7 +293,7 @@ def annual_irradiance(folder, wea, timestep, sub_folder):
total_val = sum(values)
avg_i.write('{}\n'.format(total_val / wea_len))
pk_i.write('{}\n'.format(max(values)))
cml_r.write('{}\n'.format(total_val / timestep))
cml_r.write('{}\n'.format(total_val / (timestep * 1000)))

# write rest of the lines
for line in input_file:
Expand All @@ -302,7 +302,7 @@ def annual_irradiance(folder, wea, timestep, sub_folder):
total_val = sum(values)
pk_i.write('{}\n'.format(max(values)))
avg_i.write('{}\n'.format(total_val / wea_len))
cml_r.write('{}\n'.format(total_val / timestep))
cml_r.write('{}\n'.format(total_val / (timestep * 1000)))
except ValueError:
pass # last line of the file
except Exception:
Expand Down

0 comments on commit 4ed16a3

Please sign in to comment.