hestia-earth-models 0.53.12__py3-none-any.whl → 0.54.1__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/cycle/input/ecoinventV3.py +2 -1
- hestia_earth/models/geospatialDatabase/sandContent.py +1 -1
- hestia_earth/models/impact_assessment/emissions.py +1 -1
- hestia_earth/models/ipcc2019/pastureGrass.py +5 -4
- hestia_earth/models/mocking/search-results.json +258 -258
- hestia_earth/models/site/cationExchangeCapacityPerKgSoil.py +2 -2
- hestia_earth/models/site/flowingWater.py +2 -2
- hestia_earth/models/site/netPrimaryProduction.py +2 -2
- hestia_earth/models/site/organicCarbonPerHa.py +2 -2
- hestia_earth/models/site/organicCarbonPerKgSoil.py +2 -2
- hestia_earth/models/site/organicCarbonPerM3Soil.py +2 -2
- hestia_earth/models/site/organicMatterPerKgSoil.py +2 -2
- hestia_earth/models/site/organicMatterPerM3Soil.py +2 -2
- hestia_earth/models/site/potentialEvapotranspirationAnnual.py +2 -2
- hestia_earth/models/site/potentialEvapotranspirationMonthly.py +2 -2
- hestia_earth/models/site/precipitationAnnual.py +2 -2
- hestia_earth/models/site/precipitationMonthly.py +2 -2
- hestia_earth/models/site/rainfallAnnual.py +2 -2
- hestia_earth/models/site/rainfallMonthly.py +2 -2
- hestia_earth/models/site/temperatureAnnual.py +2 -2
- hestia_earth/models/site/temperatureMonthly.py +2 -2
- hestia_earth/models/site/totalNitrogenPerKgSoil.py +2 -2
- hestia_earth/models/site/waterDepth.py +2 -2
- hestia_earth/models/utils/lookup.py +2 -2
- hestia_earth/models/version.py +1 -1
- {hestia_earth_models-0.53.12.dist-info → hestia_earth_models-0.54.1.dist-info}/METADATA +2 -2
- {hestia_earth_models-0.53.12.dist-info → hestia_earth_models-0.54.1.dist-info}/RECORD +31 -31
- {hestia_earth_models-0.53.12.dist-info → hestia_earth_models-0.54.1.dist-info}/WHEEL +1 -1
- tests/models/ipcc2019/test_pastureGrass.py +6 -0
- {hestia_earth_models-0.53.12.dist-info → hestia_earth_models-0.54.1.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.53.12.dist-info → hestia_earth_models-0.54.1.dist-info}/top_level.txt +0 -0
|
@@ -52,7 +52,8 @@ LOOKUPS = {
|
|
|
52
52
|
"material": "ecoinventMapping",
|
|
53
53
|
"pesticideAI": "ecoinventMapping",
|
|
54
54
|
"soilAmendment": "ecoinventMapping",
|
|
55
|
-
"transport": "ecoinventMapping"
|
|
55
|
+
"transport": "ecoinventMapping",
|
|
56
|
+
"veterinaryDrugs": "ecoinventMapping"
|
|
56
57
|
}
|
|
57
58
|
MODEL = 'ecoinventV3'
|
|
58
59
|
MODEL_KEY = 'impactAssessment' # keep to generate entry in "model-links.json"
|
|
@@ -69,7 +69,7 @@ def _should_run_emission(impact_assessment: dict):
|
|
|
69
69
|
|
|
70
70
|
logRequirements(impact_assessment, model=MODEL, term=term_id,
|
|
71
71
|
has_value=has_value,
|
|
72
|
-
|
|
72
|
+
emission_included_in_models=not_deleted)
|
|
73
73
|
|
|
74
74
|
should_run = all([has_value, not_deleted])
|
|
75
75
|
logShouldRun(impact_assessment, MODEL, term_id, should_run)
|
|
@@ -6,6 +6,7 @@ Source:
|
|
|
6
6
|
[IPCC 2019, Vol.4, Chapter 10](https://www.ipcc-nggip.iges.or.jp/public/2019rf/pdf/4_Volume4/19R_V4_Ch10_Livestock.pdf).
|
|
7
7
|
"""
|
|
8
8
|
from hestia_earth.schema import TermTermType, AnimalReferencePeriod
|
|
9
|
+
from hestia_earth.utils.api import download_hestia
|
|
9
10
|
from hestia_earth.utils.lookup import download_lookup, get_table_value, column_name, extract_grouped_data
|
|
10
11
|
from hestia_earth.utils.model import filter_list_term_type
|
|
11
12
|
from hestia_earth.utils.tools import list_sum, safe_parse_float, non_empty_list
|
|
@@ -30,7 +31,7 @@ REQUIREMENTS = {
|
|
|
30
31
|
"term.@id": "pastureGrass",
|
|
31
32
|
"key": {
|
|
32
33
|
"@type": "Term",
|
|
33
|
-
"term.termType": ["crop", "
|
|
34
|
+
"term.termType": ["crop", "landCover"]
|
|
34
35
|
}
|
|
35
36
|
}],
|
|
36
37
|
"animals": [{
|
|
@@ -93,7 +94,7 @@ LOOKUPS = {
|
|
|
93
94
|
"crop-property": ["energyDigestibilityRuminants", "energyContentHigherHeatingValue"],
|
|
94
95
|
"crop": "grazedPastureGrassInputId",
|
|
95
96
|
"forage-property": ["energyDigestibilityRuminants", "energyContentHigherHeatingValue"],
|
|
96
|
-
"
|
|
97
|
+
"landCover": "grazedPastureGrassInputId"
|
|
97
98
|
}
|
|
98
99
|
RETURNS = {
|
|
99
100
|
"Input": [{
|
|
@@ -104,7 +105,7 @@ RETURNS = {
|
|
|
104
105
|
MODEL_KEY = 'pastureGrass'
|
|
105
106
|
KEY_TERM_TYPES = [
|
|
106
107
|
TermTermType.CROP.value,
|
|
107
|
-
TermTermType.
|
|
108
|
+
TermTermType.LANDCOVER.value
|
|
108
109
|
]
|
|
109
110
|
|
|
110
111
|
|
|
@@ -382,7 +383,7 @@ def _calculate_NEwool(cycle: dict):
|
|
|
382
383
|
|
|
383
384
|
def _pastureGrass_key_property_value(practice: dict, column: dict):
|
|
384
385
|
term_id = _practice_input_id(practice)
|
|
385
|
-
term =
|
|
386
|
+
term = download_hestia(term_id)
|
|
386
387
|
term_type = term.get('termType')
|
|
387
388
|
value = list_sum(practice.get('value', [0]))
|
|
388
389
|
lookup_value = _node_property_value(MODEL, {'@id': term_id, 'termType': term_type}, column)
|