Skip to content

Commit

Permalink
update changelog and help text
Browse files Browse the repository at this point in the history
  • Loading branch information
adfarth committed Jan 31, 2024
1 parent 7572d13 commit f717f7a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ Classify the change according to the following categories:
"propane"=>138.6 to 139.16,
"diesel_oil"=>163.1 to 163.61
)

- Changed default source for CO2 grid emissions values to NREL's Cambium 2022 Database (by default: CO2e, long-run marginal emissions rates levelized (averaged) over the analysis period, assuming start year 2024). Added new emissions inputs and call to Cambium API in `src/core/electric_utility.jl`. Include option for user to use AVERT data for CO2 using **co2_from_avert** boolian.
- Update `electric_utility` **emissions_region** to **avert_emissions_region** and **distance_to_emissions_region_meters** to **distance_to_avert_emissions_region_meters**.

### Added
- Added endpoint `v3/cambium_emissions_profile` to `urls.py`, `views.py`, `http.jl` to obtain Cambium emissions profile. Mainly for use in web tool.

## v3.4.0
### Minor Updates
Expand Down
44 changes: 21 additions & 23 deletions reoptjl/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,23 +418,23 @@ class SiteOutputs(BaseModel, models.Model):
)
annual_emissions_tonnes_CO2 = models.FloatField(
null=True, blank=True,
help_text="Total tons of CO2 emissions associated with the site's energy consumption in an one."
help_text="Average annual total tons of emissions associated with the site's grid-purchased electricity and on-site fuel consumption."
)
annual_emissions_tonnes_NOx = models.FloatField(
null=True, blank=True,
help_text="Total tons of NOx emissions associated with the site's energy consumption in an average year."
help_text="Average annual total tons of emissions associated with the site's grid-purchased electricity and on-site fuel consumption."
)
annual_emissions_tonnes_SO2 = models.FloatField(
null=True, blank=True,
help_text="Total tons of SO2 emissions associated with the site's energy consumption in an average year."
help_text="Average annual total tons of emissions associated with the site's grid-purchased electricity and on-site fuel consumption."
)
annual_emissions_tonnes_PM25 = models.FloatField(
null=True, blank=True,
help_text="Total tons of PM2.5 emissions associated with the site's energy consumption in an average year."
help_text="Average annual total tons of emissions associated with the site's grid-purchased electricity and on-site fuel consumption."
)
annual_emissions_from_fuelburn_tonnes_CO2 = models.FloatField(
null=True, blank=True,
help_text="Total tons of CO2 emissions associated with the site's onsite fuel burn in an average year."
help_text="Total tons of CO2e emissions associated with the site's onsite fuel burn in an average year."
)
annual_emissions_from_fuelburn_tonnes_NOx = models.FloatField(
null=True, blank=True,
Expand All @@ -450,7 +450,7 @@ class SiteOutputs(BaseModel, models.Model):
)
lifecycle_emissions_tonnes_CO2 = models.FloatField(
null=True, blank=True,
help_text="Total tons of CO2 emissions associated with the site's energy consumption over the analysis period."
help_text="Total tons of CO2e emissions associated with the site's energy consumption over the analysis period."
)
lifecycle_emissions_tonnes_NOx = models.FloatField(
null=True, blank=True,
Expand All @@ -466,7 +466,7 @@ class SiteOutputs(BaseModel, models.Model):
)
lifecycle_emissions_from_fuelburn_tonnes_CO2 = models.FloatField(
null=True, blank=True,
help_text="Total tons of CO2 emissions associated with the site's onsite fuel burn over the analysis period."
help_text="Total tons of CO2e emissions associated with the site's onsite fuel burn over the analysis period."
)
lifecycle_emissions_from_fuelburn_tonnes_NOx = models.FloatField(
null=True, blank=True,
Expand Down Expand Up @@ -508,7 +508,7 @@ class SiteOutputs(BaseModel, models.Model):
)
annual_emissions_tonnes_CO2_bau = models.FloatField(
null=True, blank=True,
help_text="Total tons of CO2 emissions associated with the site's energy consumption in an average year in the BAU case."
help_text="Total tons of CO2e emissions associated with the site's energy consumption in an average year in the BAU case."
)
annual_emissions_tonnes_NOx_bau = models.FloatField(
null=True, blank=True,
Expand All @@ -524,7 +524,7 @@ class SiteOutputs(BaseModel, models.Model):
)
annual_emissions_from_fuelburn_tonnes_CO2_bau = models.FloatField(
null=True, blank=True,
help_text="Total tons of CO2 emissions associated with the site's onsite fuel burn in an average year in the BAU case."
help_text="Total tons of CO2e emissions associated with the site's onsite fuel burn in an average year in the BAU case."
)
annual_emissions_from_fuelburn_tonnes_NOx_bau = models.FloatField(
null=True, blank=True,
Expand All @@ -540,7 +540,7 @@ class SiteOutputs(BaseModel, models.Model):
)
lifecycle_emissions_tonnes_CO2_bau = models.FloatField(
null=True, blank=True,
help_text="Total tons of CO2 emissions associated with the site's energy consumption over the analysis period in the BAU case."
help_text="Total tons of CO2e emissions associated with the site's energy consumption over the analysis period in the BAU case."
)
lifecycle_emissions_tonnes_NOx_bau = models.FloatField(
null=True, blank=True,
Expand All @@ -556,7 +556,7 @@ class SiteOutputs(BaseModel, models.Model):
)
lifecycle_emissions_from_fuelburn_tonnes_CO2_bau = models.FloatField(
null=True, blank=True,
help_text="Total tons of CO2 emissions associated with the site's onsite fuel burn over the analysis period in the BAU case."
help_text="Total tons of CO2e emissions associated with the site's onsite fuel burn over the analysis period in the BAU case."
)
lifecycle_emissions_from_fuelburn_tonnes_NOx_bau = models.FloatField(
null=True, blank=True,
Expand Down Expand Up @@ -1690,7 +1690,7 @@ class ElectricUtilityInputs(BaseModel, models.Model):
cambium_location_type = models.TextField(
blank=True,
default = "States",
help_text=("Geographic boundary at which emissions are calculated. Options: ['Nations', 'GEA Regions', 'States', 'Balancing Areas'].")
help_text=("Geographic boundary at which emissions are calculated. Options: ['Nations', 'GEA Regions', 'States'].")
)
cambium_metric_col = models.TextField(
blank=True,
Expand All @@ -1709,7 +1709,7 @@ class ElectricUtilityInputs(BaseModel, models.Model):
cambium_levelization_years = models.IntegerField(
validators=[
MinValueValidator(1),
MaxValueValidator(1000)
MaxValueValidator(100)
],
blank=True,
null=True,
Expand All @@ -1719,7 +1719,7 @@ class ElectricUtilityInputs(BaseModel, models.Model):
cambium_grid_level = models.TextField(
blank=True,
default = "enduse",
help_text=("Impacts grid climate emissions calculation. Options: enduse or busbar. Busbar refers to point where bulk generating stations connect to grid; enduse refers to point of consumption (includes distribution loss rate).")
help_text=("Impacts grid climate emissions calculation. Options: ['enduse' or 'busbar']. Busbar refers to point where bulk generating stations connect to grid; enduse refers to point of consumption (includes distribution loss rate).")
)
co2_from_avert = models.BooleanField(
default=False,
Expand Down Expand Up @@ -1827,9 +1827,7 @@ def clean(self):
self.outage_probabilities = [1/len(self.outage_durations)] * len(self.outage_durations)

if self.co2_from_avert or len(self.emissions_factor_series_lb_CO2_per_kwh) > 0:
self.emissions_factor_CO2_decrease_fraction = 0.02163
else:
self.emissions_factor_CO2_decrease_fraction = 0.0
self.emissions_factor_CO2_decrease_fraction = 0.02163 # leave blank otherwise; the Julia Pkg will set to 0 unless site is in AK or HI

if error_messages:
raise ValidationError(error_messages)
Expand Down Expand Up @@ -2426,11 +2424,11 @@ class ElectricTariffOutputs(BaseModel, models.Model):
)
year_one_export_benefit_before_tax = models.FloatField(
null=True, blank=True,
help_text="Optimal year one value of exported energy"
help_text="Optimal year one value of exported energy. A positive value indicates a benefit."
)
year_one_export_benefit_before_tax_bau = models.FloatField(
null=True, blank=True,
help_text="Business as usual year one value of exported energy"
help_text="Business as usual year one value of exported energy. A positive value indicates a benefit."
)
year_one_coincident_peak_cost_before_tax = models.FloatField(
null=True, blank=True,
Expand Down Expand Up @@ -3732,7 +3730,7 @@ class GeneratorInputs(BaseModel, models.Model):
MaxValueValidator(1e4)
],
blank=True,
help_text="Pounds of CO2 emitted per gallon of generator fuel burned."
help_text="Pounds of CO2e emitted per gallon of generator fuel burned."
)
emissions_factor_lb_NOx_per_gal = models.FloatField(
default=0.0775544,
Expand All @@ -3741,7 +3739,7 @@ class GeneratorInputs(BaseModel, models.Model):
MaxValueValidator(1e4)
],
blank=True,
help_text="Pounds of CO2 emitted per gallon of generator fuel burned."
help_text="Pounds of NOx emitted per gallon of generator fuel burned."
)
emissions_factor_lb_SO2_per_gal = models.FloatField(
default=0.040020476,
Expand All @@ -3750,7 +3748,7 @@ class GeneratorInputs(BaseModel, models.Model):
MaxValueValidator(1e4)
],
blank=True,
help_text="Pounds of CO2 emitted per gallon of generator fuel burned."
help_text="Pounds of SO2 emitted per gallon of generator fuel burned."
)
emissions_factor_lb_PM25_per_gal = models.FloatField(
default=0.0,
Expand All @@ -3759,7 +3757,7 @@ class GeneratorInputs(BaseModel, models.Model):
MaxValueValidator(1e4)
],
blank=True,
help_text="Pounds of CO2 emitted per gallon of generator fuel burned."
help_text="Pounds of PM2.5 emitted per gallon of generator fuel burned."
)
replacement_year = models.IntegerField(
validators=[
Expand Down

0 comments on commit f717f7a

Please sign in to comment.