Hi, Karen

Offhand, no ideas.

However, I will say that your plot looks more like a plot of something in
units of W/m². Wouldn't Wh/m² be bigger numbers? Are you sure you're
plotting what you think you are plotting?

On Sun, Mar 7, 2021 at 12:11 PM Karen K <[email protected]> wrote:

> I defined a new aggregation type called 'energy_integral' for the
> observation type 'radiation'. And I added new unit groups to reflect the
> unit of the result:
>
> weewx.units.agg_group.setdefault('energy_integral','group_radiation_energy')
>
> weewx.units.USUnits.setdefault('group_radiation_energy','watt_hour_per_meter_squared')
>
> weewx.units.MetricUnits.setdefault('group_radiation_energy','watt_hour_per_meter_squared')
>
> weewx.units.MetricWXUnits.setdefault('group_radiation_energy','watt_hour_per_meter_squared')
>
> weewx.units.default_unit_format_dict.setdefault('watt_hour_per_meter_squared',"%.0f")
>
> weewx.units.default_unit_label_dict.setdefault('watt_hour_per_meter_squared',u"
> Wh/m²")
>
> Then I defined a get_aggregate() function that returns the value.
>
> If I use a tag like $yesterday.radiation.energy_integral then I get the
> right unit Wh/m^2.
>
> But the graph is labelled with the unit label of the original value. That
> is W/m^2 (without h) instead of Wh/m^2.
>
> I wonder what I could do to have the correct unit label in graphs, too?
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-development/15a59830-708a-4888-a04f-46f4a802aeb2n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-development/15a59830-708a-4888-a04f-46f4a802aeb2n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/CAPq0zEAMykVvvqCbsqom%2B%2B0KUTMx21COs2fsr8JnH509ZCzxRw%40mail.gmail.com.

Reply via email to