Skip to content

Normalisation can result in divide-by-zero error for more than one input inventory #101

@liammegill

Description

@liammegill

Type of issue

  • bug report

Description

A divide-by-zero error can occur in apply_evolution if the following conditions are met:

  • Normalisation input file is used
  • Multiple emission inventories are used
  • A time range is applied beyond the range of the inventories

The issue has been localised to apply_norm, specifically to the linear interpolation of ei_inv_dict to ei_inv_interp_dict.

After a discussion with @stefan-voelk, we have concluded that solving this problem will require significant changes to OpenAirClim. Therefore, for the time being, we will further constrain the valid time range for normalisation (see https://openairclim.org/user_guide/02_evolution.html#time-constraints) to match that of scaling. In other words, the first and last years of time_range must be inventory years if multiple inventories are used. Normalisation will still be possible for a single emission inventory as before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions