Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions SWEET_python/city_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from typing import List, Dict, Union, Any, Set, Optional
import pandas as pd
import numpy as np
import pycountry # What am i using this for...seems dumb
import pycountry # TODO: confirm whether this import is still needed.
from SWEET_python.class_defs import *
import copy
from geopy.geocoders import Nominatim
Expand Down Expand Up @@ -978,7 +978,6 @@ def load_andre_params(self, row, backfill=False):
* 1.1023
* 0.7
) # / 28
# Unit is Mg CO2e/Mg of organic waste, wtf, so convert to CH4. Mistake in sweet here
except:
mef_compost = 0

Expand Down Expand Up @@ -3078,7 +3077,6 @@ def import_basics(self, row) -> None:
* 1.1023
* 0.7
) # / 28
# Unit is Mg CO2e/Mg of organic waste, wtf, so convert to CH4. Mistake in sweet here
mef_compost = mef_compost.at[2000]
except:
mef_compost = 0
Expand Down Expand Up @@ -3496,7 +3494,6 @@ def _is_transient_db_error(err: Exception) -> bool:
* 1.1023
* 0.7
) # / 28
# Unit is Mg CO2e/Mg of organic waste, wtf, so convert to CH4. Mistake in sweet here
mef_compost = mef_compost.at[2000]
except:
mef_compost = 0
Expand Down Expand Up @@ -3775,7 +3772,6 @@ def _is_transient_db_error(err: Exception) -> bool:
* 1.1023
* 0.7
) # / 28
# Unit is Mg CO2e/Mg of organic waste, wtf, so convert to CH4. Mistake in sweet here
mef_compost = mef_compost.at[2000]
except:
mef_compost = 0
Expand Down Expand Up @@ -5687,14 +5683,6 @@ def _check_masses_v2(
)
)

# Make sure at some point this doesn't do crazy shit when implement_year is early or something
# if isinstance(parameters.waste_mass, dict):
# ratio = parameters.waste_mass['scenario'] / parameters.waste_mass['baseline']
# div_masses_df.compost.loc[parameters.implement_year:, :] *= ratio
# div_masses_df.anaerobic.loc[parameters.implement_year:, :] *= ratio
# div_masses_df.recycling.loc[parameters.implement_year:, :] *= ratio
# div_masses_df.combustion.loc[parameters.implement_year:, :] *= ratio

try:
# Create the final instances
final_div_masses_annual = DivMassesAnnual(
Expand Down
9 changes: 4 additions & 5 deletions SWEET_python/defaults_2019.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ def _find_iso3_csv() -> Path:
waste_fraction_defaults = waste_fraction_defaults.drop("total", axis=1)
# waste_fraction_defaults.head()
# waste_fraction_defaults = waste_fraction_defaults.T.to_dict()
# Ah shit hungary is wrong.
waste_fractions_country = {
"Kazakhstan": [21.5, 2.8, 26.5, 0.0, 7.0, 0.0, 0.0, 16.8, 1.5, 11.8, 11.9],
"Uzbekistan": [38.4, 0.0, 22.8, 4.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 34.0],
Expand Down Expand Up @@ -953,8 +952,8 @@ def get_precipitation_zone(rainfall):
"remediated_to_landfill": 0.1,
},
}
# mef_compost = 0.005876238822222 # Unit is Mg CO2e/Mg of organic waste, wtf
mef_anaerobic = 0.26 / 1000 * 1.1023 # Unit is Mg CH4/Mg organic waste...wtf

mef_anaerobic = 0.26 / 1000 * 1.1023
ch4_to_co2e = 28
gas_capture_efficiency = {"landfill": 0.6, "controlled_dumpsite": 0.45, "dumpsite": 0}
landfill_default_regions = set(
Expand All @@ -967,9 +966,9 @@ def get_precipitation_zone(rainfall):
"Western Europe",
]
)
# These numbers are kind of weird. I think...
# These numbers need additional review.
# Does this mean...waste that isn't diverted? But also is landfilled, as opposed to untracked?
# These are from IPCC, regions are slightly weird....SWEET has Central and Southern Asia, IPCC has south central and western...using south central for western here.
# These are from IPCC. SWEET has Central and Southern Asia, while IPCC has south central and western; using south central for western here.
# Africa is a single average and rest of oceania is from aus/nz
fraction_open_dumped = {
"Australia and New Zealand": 0.0,
Expand Down
2 changes: 1 addition & 1 deletion SWEET_python/singapore_k/singapore_k.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _build_lookup_array():
lookup_array[1, 5, 0] = 0.7
lookup_array[2, 5, 0] = 0.5

# stupid fake one i need for some reason deal with later
# Placeholder value; confirm whether this case needs a real lookup.
lookup_array[1, 5, 2] = 0.5

lookup_array[0, 6, 2] = 0.6
Expand Down