hestia-earth-models 0.64.9__py3-none-any.whl → 0.64.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hestia-earth-models might be problematic. Click here for more details.
- hestia_earth/models/cml2001Baseline/abioticResourceDepletionFossilFuels.py +175 -0
- hestia_earth/models/cml2001Baseline/abioticResourceDepletionMineralsAndMetals.py +136 -0
- hestia_earth/models/cml2001Baseline/eutrophicationPotentialExcludingFate.py +2 -2
- hestia_earth/models/cml2001Baseline/terrestrialAcidificationPotentialIncludingFateAverageEurope.py +2 -2
- hestia_earth/models/cml2001NonBaseline/eutrophicationPotentialIncludingFateAverageEurope.py +2 -2
- hestia_earth/models/cml2001NonBaseline/terrestrialAcidificationPotentialExcludingFate.py +2 -2
- hestia_earth/models/cycle/completeness/cropResidue.py +15 -10
- hestia_earth/models/cycle/completeness/freshForage.py +60 -0
- hestia_earth/models/edip2003/ozoneDepletionPotential.py +2 -2
- hestia_earth/models/environmentalFootprintV3/soilQualityIndexLandTransformation.py +2 -2
- hestia_earth/models/fantkeEtAl2016/damageToHumanHealthParticulateMatterFormation.py +7 -17
- hestia_earth/models/ipcc2013ExcludingFeedbacks/gwp100.py +2 -2
- hestia_earth/models/ipcc2013IncludingFeedbacks/gwp100.py +2 -2
- hestia_earth/models/ipcc2019/aboveGroundBiomass.py +31 -243
- hestia_earth/models/ipcc2019/belowGroundBiomass.py +529 -0
- hestia_earth/models/ipcc2019/biomass_utils.py +406 -0
- hestia_earth/models/ipcc2019/{co2ToAirAboveGroundBiomassStockChangeLandUseChange.py → co2ToAirAboveGroundBiomassStockChange.py} +19 -7
- hestia_earth/models/ipcc2019/{co2ToAirBelowGroundBiomassStockChangeLandUseChange.py → co2ToAirBelowGroundBiomassStockChange.py} +19 -7
- hestia_earth/models/ipcc2019/co2ToAirCarbonStockChange_utils.py +402 -73
- hestia_earth/models/ipcc2019/{co2ToAirSoilOrganicCarbonStockChangeManagementChange.py → co2ToAirSoilOrganicCarbonStockChange.py} +20 -8
- hestia_earth/models/ipcc2019/organicCarbonPerHa.py +3 -1
- hestia_earth/models/ipcc2019/pastureGrass_utils.py +6 -7
- hestia_earth/models/ipcc2021/gwp100.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsClimateChange.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsWaterStress.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthClimateChange.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthParticulateMatterFormation.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthPhotochemicalOzoneFormation.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthStratosphericOzoneDepletion.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthWaterStress.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToMarineEcosystemsMarineEutrophication.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsClimateChange.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +2 -2
- hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsTerrestrialAcidification.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsClimateChange.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsWaterStress.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthClimateChange.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthParticulateMatterFormation.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthPhotochemicalOzoneFormation.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthStratosphericOzoneDepletion.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthWaterStress.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToMarineEcosystemsMarineEutrophication.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsClimateChange.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialAcidification.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsWaterStress.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthClimateChange.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthParticulateMatterFormation.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthPhotochemicalOzoneFormation.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthStratosphericOzoneDepletion.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthWaterStress.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToMarineEcosystemsMarineEutrophication.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsClimateChange.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsTerrestrialAcidification.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsWaterStress.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthClimateChange.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthParticulateMatterFormation.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthPhotochemicalOzoneFormation.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthStratosphericOzoneDepletion.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthWaterStress.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToMarineEcosystemsMarineEutrophication.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsClimateChange.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialAcidification.py +2 -2
- hestia_earth/models/mocking/build_mock_search.py +44 -0
- hestia_earth/models/mocking/mock_search.py +8 -49
- hestia_earth/models/mocking/search-results.json +3055 -558
- hestia_earth/models/poschEtAl2008/terrestrialAcidificationPotentialAccumulatedExceedance.py +3 -3
- hestia_earth/models/poschEtAl2008/terrestrialEutrophicationPotentialAccumulatedExceedance.py +3 -3
- hestia_earth/models/preload_requests.py +1 -1
- hestia_earth/models/recipe2016Egalitarian/ecosystemDamageOzoneFormation.py +2 -2
- hestia_earth/models/recipe2016Egalitarian/freshwaterEutrophicationPotential.py +2 -2
- hestia_earth/models/recipe2016Egalitarian/humanDamageOzoneFormation.py +2 -2
- hestia_earth/models/recipe2016Egalitarian/marineEutrophicationPotential.py +2 -2
- hestia_earth/models/recipe2016Egalitarian/ozoneDepletionPotential.py +2 -2
- hestia_earth/models/recipe2016Egalitarian/terrestrialAcidificationPotential.py +2 -2
- hestia_earth/models/recipe2016Hierarchist/ecosystemDamageOzoneFormation.py +2 -2
- hestia_earth/models/recipe2016Hierarchist/freshwaterEutrophicationPotential.py +2 -2
- hestia_earth/models/recipe2016Hierarchist/humanDamageOzoneFormation.py +2 -2
- hestia_earth/models/recipe2016Hierarchist/marineEutrophicationPotential.py +2 -2
- hestia_earth/models/recipe2016Hierarchist/ozoneDepletionPotential.py +2 -2
- hestia_earth/models/recipe2016Hierarchist/terrestrialAcidificationPotential.py +2 -2
- hestia_earth/models/recipe2016Individualist/ecosystemDamageOzoneFormation.py +2 -2
- hestia_earth/models/recipe2016Individualist/freshwaterEutrophicationPotential.py +2 -2
- hestia_earth/models/recipe2016Individualist/humanDamageOzoneFormation.py +2 -2
- hestia_earth/models/recipe2016Individualist/marineEutrophicationPotential.py +2 -2
- hestia_earth/models/recipe2016Individualist/ozoneDepletionPotential.py +2 -2
- hestia_earth/models/recipe2016Individualist/terrestrialAcidificationPotential.py +2 -2
- hestia_earth/models/schmidt2007/utils.py +13 -4
- hestia_earth/models/utils/blank_node.py +73 -3
- hestia_earth/models/utils/constant.py +8 -1
- hestia_earth/models/utils/cycle.py +10 -13
- hestia_earth/models/utils/fuel.py +1 -1
- hestia_earth/models/utils/impact_assessment.py +49 -24
- hestia_earth/models/utils/lookup.py +36 -7
- hestia_earth/models/utils/pesticideAI.py +1 -1
- hestia_earth/models/utils/property.py +11 -4
- hestia_earth/models/utils/term.py +15 -8
- hestia_earth/models/version.py +1 -1
- {hestia_earth_models-0.64.9.dist-info → hestia_earth_models-0.64.11.dist-info}/METADATA +2 -2
- {hestia_earth_models-0.64.9.dist-info → hestia_earth_models-0.64.11.dist-info}/RECORD +123 -114
- {hestia_earth_models-0.64.9.dist-info → hestia_earth_models-0.64.11.dist-info}/WHEEL +1 -1
- tests/models/cml2001Baseline/test_abioticResourceDepletionFossilFuels.py +196 -0
- tests/models/cml2001Baseline/test_abioticResourceDepletionMineralsAndMetals.py +124 -0
- tests/models/cycle/completeness/test_freshForage.py +21 -0
- tests/models/edip2003/test_ozoneDepletionPotential.py +1 -13
- tests/models/environmentalFootprintV3/test_soilQualityIndexLandTransformation.py +1 -2
- tests/models/impact_assessment/test_emissions.py +1 -0
- tests/models/ipcc2019/test_aboveGroundBiomass.py +27 -63
- tests/models/ipcc2019/test_belowGroundBiomass.py +146 -0
- tests/models/ipcc2019/test_biomass_utils.py +115 -0
- tests/models/ipcc2019/{test_co2ToAirAboveGroundBiomassStockChangeLandUseChange.py → test_co2ToAirAboveGroundBiomassStockChange.py} +5 -5
- tests/models/ipcc2019/{test_co2ToAirBelowGroundBiomassStockChangeLandUseChange.py → test_co2ToAirBelowGroundBiomassStockChange.py} +5 -5
- tests/models/ipcc2019/{test_co2ToAirSoilOrganicCarbonStockChangeManagementChange.py → test_co2ToAirSoilOrganicCarbonStockChange.py} +5 -5
- tests/models/ipcc2021/test_gwp100.py +2 -2
- tests/models/utils/test_impact_assessment.py +3 -3
- hestia_earth/models/ipcc2019/aboveGroundBiomass_utils.py +0 -180
- tests/models/ipcc2019/test_aboveGroundBiomass_utils.py +0 -92
- {hestia_earth_models-0.64.9.dist-info → hestia_earth_models-0.64.11.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.64.9.dist-info → hestia_earth_models-0.64.11.dist-info}/top_level.txt +0 -0
|
@@ -4,6 +4,7 @@ from hestia_earth.models.log import logRequirements, logShouldRun
|
|
|
4
4
|
from hestia_earth.models.utils.blank_node import cumulative_nodes_term_match
|
|
5
5
|
from hestia_earth.models.utils.emission import _new_emission
|
|
6
6
|
|
|
7
|
+
from .organicCarbonPerHa_tier_1_utils import _assign_ipcc_land_use_category
|
|
7
8
|
from .co2ToAirCarbonStockChange_utils import create_run_function, create_should_run_function
|
|
8
9
|
from . import MODEL
|
|
9
10
|
|
|
@@ -40,7 +41,10 @@ RETURNS = {
|
|
|
40
41
|
"depth": "30"
|
|
41
42
|
}]
|
|
42
43
|
}
|
|
43
|
-
TERM_ID = 'co2ToAirSoilOrganicCarbonStockChangeManagementChange'
|
|
44
|
+
TERM_ID = 'co2ToAirSoilOrganicCarbonStockChangeLandUseChange,co2ToAirSoilOrganicCarbonStockChangeManagementChange'
|
|
45
|
+
|
|
46
|
+
_LU_EMISSION_TERM_ID = "co2ToAirSoilOrganicCarbonStockChangeLandUseChange"
|
|
47
|
+
_MG_EMISSION_TERM_ID = "co2ToAirSoilOrganicCarbonStockChangeManagementChange"
|
|
44
48
|
|
|
45
49
|
_DEPTH_UPPER = 0
|
|
46
50
|
_DEPTH_LOWER = 30
|
|
@@ -57,6 +61,7 @@ _SITE_TYPE_SYSTEMS_MAPPING = {
|
|
|
57
61
|
|
|
58
62
|
def _emission(
|
|
59
63
|
*,
|
|
64
|
+
term_id: str,
|
|
60
65
|
value: list[float],
|
|
61
66
|
method_tier: EmissionMethodTier,
|
|
62
67
|
sd: list[float] = None,
|
|
@@ -94,7 +99,7 @@ def _emission(
|
|
|
94
99
|
"methodTier": method_tier.value,
|
|
95
100
|
"depth": _DEPTH_LOWER
|
|
96
101
|
}
|
|
97
|
-
emission = _new_emission(
|
|
102
|
+
emission = _new_emission(term_id, MODEL) | {
|
|
98
103
|
key: value for key, value in update_dict.items() if value
|
|
99
104
|
}
|
|
100
105
|
return emission
|
|
@@ -115,17 +120,24 @@ def run(cycle: dict) -> list[dict]:
|
|
|
115
120
|
A list of [Emission nodes](https://www.hestia.earth/schema/Emission) containing model results.
|
|
116
121
|
"""
|
|
117
122
|
should_run_exec = create_should_run_function(
|
|
118
|
-
_CARBON_STOCK_TERM_ID,
|
|
119
|
-
_should_compile_inventory_func,
|
|
120
|
-
|
|
123
|
+
carbon_stock_term_id=_CARBON_STOCK_TERM_ID,
|
|
124
|
+
should_compile_inventory_func=_should_compile_inventory_func,
|
|
125
|
+
summarise_land_use_func=lambda nodes: _assign_ipcc_land_use_category(nodes, None),
|
|
126
|
+
detect_land_use_change_func=lambda a, b: a != b,
|
|
127
|
+
should_run_measurement_func=_should_run_measurement_func,
|
|
121
128
|
)
|
|
122
129
|
|
|
123
|
-
run_exec = create_run_function(
|
|
130
|
+
run_exec = create_run_function(
|
|
131
|
+
new_emission_func=_emission,
|
|
132
|
+
land_use_change_emission_term_id=_LU_EMISSION_TERM_ID,
|
|
133
|
+
management_change_emission_term_id=_MG_EMISSION_TERM_ID
|
|
134
|
+
)
|
|
124
135
|
|
|
125
136
|
should_run, cycle_id, inventory, logs = should_run_exec(cycle)
|
|
126
137
|
|
|
127
|
-
|
|
128
|
-
|
|
138
|
+
for term_id in [_LU_EMISSION_TERM_ID, _MG_EMISSION_TERM_ID]:
|
|
139
|
+
logRequirements(cycle, model=MODEL, term=term_id, **logs)
|
|
140
|
+
logShouldRun(cycle, MODEL, term_id, should_run)
|
|
129
141
|
|
|
130
142
|
return run_exec(cycle_id, inventory) if should_run else []
|
|
131
143
|
|
|
@@ -24,7 +24,6 @@ from . import MODEL # noqa
|
|
|
24
24
|
|
|
25
25
|
REQUIREMENTS = {
|
|
26
26
|
"Site": {
|
|
27
|
-
"siteType": ["cropland", "permanent pasture", "forest", "other natural vegetation"],
|
|
28
27
|
"management": [
|
|
29
28
|
{"@type": "Management", "value": "", "term.termType": "landCover"}
|
|
30
29
|
],
|
|
@@ -88,6 +87,9 @@ REQUIREMENTS = {
|
|
|
88
87
|
},
|
|
89
88
|
{"@type": "Management", "value": "", "startDate": "", "endDate": "", "term.@id": "shortBareFallow"}
|
|
90
89
|
]
|
|
90
|
+
},
|
|
91
|
+
"none": {
|
|
92
|
+
"siteType": ["glass or high accessible cover"]
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
}
|
|
@@ -4,6 +4,7 @@ from hestia_earth.utils.lookup import download_lookup, get_table_value, column_n
|
|
|
4
4
|
from hestia_earth.utils.tools import list_sum, safe_parse_float
|
|
5
5
|
|
|
6
6
|
from hestia_earth.models.log import debugValues
|
|
7
|
+
from hestia_earth.models.utils import weighted_average
|
|
7
8
|
from hestia_earth.models.utils.input import get_feed_inputs
|
|
8
9
|
from hestia_earth.models.utils.term import get_lookup_value
|
|
9
10
|
from hestia_earth.models.utils.property import get_node_property, get_node_property_value, node_property_lookup_value
|
|
@@ -30,17 +31,15 @@ def _get_activityCoefficient(animal: dict, systems: list) -> float:
|
|
|
30
31
|
term_id = term.get('@id')
|
|
31
32
|
lookup = download_lookup('system-liveAnimal-activityCoefficient-ipcc2019.csv')
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
values = [(
|
|
34
35
|
safe_parse_float(
|
|
35
36
|
get_table_value(lookup, 'termid', system.get('term', {}).get('@id'), column_name(term_id)),
|
|
36
37
|
0
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
list_sum(system.get('value', [0])) for system in systems
|
|
41
|
-
])
|
|
38
|
+
),
|
|
39
|
+
list_sum(system.get('value', [0]))
|
|
40
|
+
) for system in systems]
|
|
42
41
|
|
|
43
|
-
return
|
|
42
|
+
return weighted_average(values)
|
|
44
43
|
|
|
45
44
|
|
|
46
45
|
def _calculate_NEm(cycle: dict, animal: dict) -> float:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv", 'allEffects')
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthParticulateMatterFormation.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthPhotochemicalOzoneFormation.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthStratosphericOzoneDepletion.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
|
@@ -47,5 +47,5 @@ def run(impact_assessment: dict):
|
|
|
47
47
|
)
|
|
48
48
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
49
49
|
value=value)
|
|
50
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
51
|
-
return _indicator(value)
|
|
50
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
51
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactAllEffects100Years/damageToMarineEcosystemsMarineEutrophication.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsClimateChange.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv", 'allEffects')
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthParticulateMatterFormation.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthPhotochemicalOzoneFormation.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthStratosphericOzoneDepletion.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
|
@@ -47,5 +47,5 @@ def run(impact_assessment: dict):
|
|
|
47
47
|
)
|
|
48
48
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
49
49
|
value=value)
|
|
50
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
51
|
-
return _indicator(value)
|
|
50
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
51
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactAllEffectsInfinite/damageToMarineEcosystemsMarineEutrophication.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsClimateChange.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsWaterStress.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv", 'certainEffects')
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthParticulateMatterFormation.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthPhotochemicalOzoneFormation.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthStratosphericOzoneDepletion.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
|
@@ -47,5 +47,5 @@ def run(impact_assessment: dict):
|
|
|
47
47
|
)
|
|
48
48
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
49
49
|
value=value)
|
|
50
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
51
|
-
return _indicator(value)
|
|
50
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
51
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactCertainEffects100Years/damageToMarineEcosystemsMarineEutrophication.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsClimateChange.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsWaterStress.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv", 'certainEffects')
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
2
2
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
3
|
-
from hestia_earth.models.utils.impact_assessment import
|
|
3
|
+
from hestia_earth.models.utils.impact_assessment import impact_emission_lookup_value
|
|
4
4
|
from . import MODEL
|
|
5
5
|
|
|
6
6
|
REQUIREMENTS = {
|
|
@@ -26,7 +26,7 @@ def _indicator(value: float):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def run(impact_assessment: dict):
|
|
29
|
-
value =
|
|
29
|
+
value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
|
|
30
30
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
31
31
|
value=value)
|
|
32
32
|
logShouldRun(impact_assessment, MODEL, TERM_ID, True)
|
hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthParticulateMatterFormation.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|
hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthPhotochemicalOzoneFormation.py
CHANGED
|
@@ -33,5 +33,5 @@ def run(impact_assessment: dict):
|
|
|
33
33
|
value = impact_country_value(MODEL, TERM_ID, impact_assessment, f"{list(LOOKUPS.keys())[0]}.csv")
|
|
34
34
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
35
35
|
value=value)
|
|
36
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID,
|
|
37
|
-
return _indicator(value)
|
|
36
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
37
|
+
return None if value is None else _indicator(value)
|