hestia-earth-models 0.70.0__py3-none-any.whl → 0.70.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.
Files changed (168) hide show
  1. hestia_earth/models/aware/scarcityWeightedWaterUse.py +8 -16
  2. hestia_earth/models/config/Cycle.json +52 -64
  3. hestia_earth/models/config/ImpactAssessment.json +12 -4
  4. hestia_earth/models/config/Site.json +33 -22
  5. hestia_earth/models/cycle/transformation.py +1 -1
  6. hestia_earth/models/cycle/utils.py +0 -6
  7. hestia_earth/models/data/ecoinventV3/__init__.py +15 -13
  8. hestia_earth/models/ecoalimV9/__init__.py +13 -0
  9. hestia_earth/models/ecoalimV9/cycle.py +128 -0
  10. hestia_earth/models/ecoalimV9/impact_assessment.py +125 -0
  11. hestia_earth/models/ecoalimV9/utils.py +31 -0
  12. hestia_earth/models/ecoinventV3/__init__.py +6 -14
  13. hestia_earth/models/ecoinventV3/utils.py +1 -29
  14. hestia_earth/models/ecoinventV3AndEmberClimate/__init__.py +8 -2
  15. hestia_earth/models/emissionNotRelevant/__init__.py +33 -8
  16. hestia_earth/models/{cycle → hestia}/aboveGroundCropResidue.py +4 -3
  17. hestia_earth/models/{cycle → hestia}/aboveGroundCropResidueTotal.py +1 -1
  18. hestia_earth/models/{site → hestia}/brackishWater.py +1 -1
  19. hestia_earth/models/{site → hestia}/cationExchangeCapacityPerKgSoil.py +1 -1
  20. hestia_earth/models/{cycle → hestia}/coldCarcassWeightPerHead.py +1 -1
  21. hestia_earth/models/{cycle → hestia}/coldDressedCarcassWeightPerHead.py +1 -1
  22. hestia_earth/models/{cycle → hestia}/concentrateFeed.py +1 -1
  23. hestia_earth/models/{cycle → hestia}/cropResidueManagement.py +1 -1
  24. hestia_earth/models/{cycle → hestia}/croppingIntensity.py +1 -1
  25. hestia_earth/models/{cycle → hestia}/energyContentLowerHeatingValue.py +1 -1
  26. hestia_earth/models/{cycle → hestia}/excretaKgMass.py +7 -2
  27. hestia_earth/models/{cycle → hestia}/excretaKgN.py +1 -1
  28. hestia_earth/models/{cycle → hestia}/excretaKgVs.py +1 -1
  29. hestia_earth/models/{cycle → hestia}/feedConversionRatio/__init__.py +1 -1
  30. hestia_earth/models/{site → hestia}/flowingWater.py +1 -1
  31. hestia_earth/models/{site → hestia}/freshWater.py +1 -1
  32. hestia_earth/models/{cycle → hestia}/inorganicFertiliser.py +1 -1
  33. hestia_earth/models/{cycle → hestia}/irrigatedTypeUnspecified.py +14 -19
  34. hestia_earth/models/hestia/landCover.py +30 -22
  35. hestia_earth/models/{cycle → hestia}/liveAnimal.py +1 -1
  36. hestia_earth/models/{cycle → hestia}/longFallowRatio.py +1 -1
  37. hestia_earth/models/{cycle → hestia}/materialAndSubstrate.py +1 -1
  38. hestia_earth/models/{cycle → hestia}/milkYield.py +1 -1
  39. hestia_earth/models/{site → hestia}/netPrimaryProduction.py +1 -1
  40. hestia_earth/models/{site → hestia}/organicCarbonPerHa.py +1 -1
  41. hestia_earth/models/{cycle → hestia}/pastureGrass.py +1 -1
  42. hestia_earth/models/{cycle → hestia}/pastureSystem.py +1 -1
  43. hestia_earth/models/{site → hestia}/potentialEvapotranspirationAnnual.py +3 -3
  44. hestia_earth/models/{site → hestia}/potentialEvapotranspirationMonthly.py +3 -3
  45. hestia_earth/models/{site → hestia}/precipitationAnnual.py +3 -3
  46. hestia_earth/models/{site → hestia}/precipitationMonthly.py +3 -3
  47. hestia_earth/models/{site → hestia}/rainfallAnnual.py +3 -3
  48. hestia_earth/models/{site → hestia}/rainfallMonthly.py +3 -3
  49. hestia_earth/models/{cycle → hestia}/readyToCookWeightPerHead.py +1 -1
  50. hestia_earth/models/{cycle → hestia}/residueBurnt.py +1 -1
  51. hestia_earth/models/{cycle → hestia}/residueIncorporated.py +1 -1
  52. hestia_earth/models/{cycle → hestia}/residueLeftOnField.py +1 -1
  53. hestia_earth/models/hestia/residueRemoved.py +65 -13
  54. hestia_earth/models/{site → hestia}/salineWater.py +1 -1
  55. hestia_earth/models/{site → hestia}/soilMeasurement.py +1 -1
  56. hestia_earth/models/{cycle → hestia}/stockingDensityAnimalHousingAverage.py +1 -1
  57. hestia_earth/models/{site → hestia}/temperatureAnnual.py +3 -3
  58. hestia_earth/models/{site → hestia}/temperatureMonthly.py +3 -3
  59. hestia_earth/models/{site → hestia}/totalNitrogenPerKgSoil.py +1 -1
  60. hestia_earth/models/{cycle → hestia}/unknownPreSeasonWaterRegime.py +1 -1
  61. hestia_earth/models/hestia/utils.py +93 -0
  62. hestia_earth/models/{site → hestia}/waterDepth.py +1 -1
  63. hestia_earth/models/hestia/waterSalinity.py +78 -0
  64. hestia_earth/models/ipcc2019/aboveGroundBiomass.py +1 -1
  65. hestia_earth/models/ipcc2019/belowGroundBiomass.py +1 -1
  66. hestia_earth/models/ipcc2019/biomass_utils.py +2 -4
  67. hestia_earth/models/ipcc2019/ch4ToAirFloodedRice.py +163 -78
  68. hestia_earth/models/ipcc2019/co2ToAirCarbonStockChange_utils.py +31 -20
  69. hestia_earth/models/ipcc2019/co2ToAirUreaHydrolysis.py +16 -9
  70. hestia_earth/models/ipcc2019/nonCo2EmissionsToAirNaturalVegetationBurning.py +35 -47
  71. hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_1.py +86 -1
  72. hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_2.py +127 -1
  73. hestia_earth/models/ipcc2019/organicCarbonPerHa_utils.py +7 -5
  74. hestia_earth/models/mocking/search-results.json +764 -772
  75. hestia_earth/models/pooreNemecek2018/utils.py +8 -2
  76. hestia_earth/models/schmidt2007/ch4ToAirWasteTreatment.py +1 -4
  77. hestia_earth/models/schmidt2007/h2SToAirWasteTreatment.py +1 -4
  78. hestia_earth/models/schmidt2007/n2OToAirWasteTreatmentDirect.py +1 -4
  79. hestia_earth/models/schmidt2007/nh3ToAirWasteTreatment.py +1 -4
  80. hestia_earth/models/utils/background_emissions.py +52 -0
  81. hestia_earth/models/utils/blank_node.py +9 -5
  82. hestia_earth/models/utils/impact_assessment.py +26 -17
  83. hestia_earth/models/utils/lookup.py +48 -39
  84. hestia_earth/models/utils/measurement.py +3 -3
  85. hestia_earth/models/version.py +1 -1
  86. {hestia_earth_models-0.70.0.dist-info → hestia_earth_models-0.70.1.dist-info}/METADATA +2 -2
  87. {hestia_earth_models-0.70.0.dist-info → hestia_earth_models-0.70.1.dist-info}/RECORD +163 -158
  88. tests/models/aware/test_scarcityWeightedWaterUse.py +1 -12
  89. tests/models/ecoalimV9/__init__.py +0 -0
  90. tests/models/ecoalimV9/test_cycle.py +21 -0
  91. tests/models/ecoalimV9/test_impact_assessment.py +24 -0
  92. tests/models/environmentalFootprintV3_1/test_scarcityWeightedWaterUse.py +4 -2
  93. tests/models/{cycle → hestia}/test_aboveGroundCropResidue.py +1 -1
  94. tests/models/{cycle → hestia}/test_aboveGroundCropResidueTotal.py +1 -1
  95. tests/models/{site → hestia}/test_brackishWater.py +1 -1
  96. tests/models/{site → hestia}/test_cationExchangeCapacityPerKgSoil.py +1 -1
  97. tests/models/{cycle → hestia}/test_coldCarcassWeightPerHead.py +1 -1
  98. tests/models/{cycle → hestia}/test_coldDressedCarcassWeightPerHead.py +1 -1
  99. tests/models/{cycle → hestia}/test_concentrateFeed.py +1 -1
  100. tests/models/{cycle → hestia}/test_cropResidueManagement.py +1 -1
  101. tests/models/{cycle → hestia}/test_croppingIntensity.py +1 -1
  102. tests/models/{cycle → hestia}/test_energyContentLowerHeatingValue.py +5 -3
  103. tests/models/{cycle → hestia}/test_excretaKgMass.py +1 -1
  104. tests/models/{cycle → hestia}/test_excretaKgN.py +1 -1
  105. tests/models/{cycle → hestia}/test_excretaKgVs.py +1 -1
  106. tests/models/{cycle → hestia}/test_feedConversionRatio.py +1 -1
  107. tests/models/{site → hestia}/test_flowingWater.py +1 -1
  108. tests/models/{site → hestia}/test_freshWater.py +1 -1
  109. tests/models/{cycle → hestia}/test_inorganicFertiliser.py +1 -1
  110. tests/models/{cycle → hestia}/test_irrigatedTypeUnspecified.py +2 -5
  111. tests/models/hestia/test_landCover.py +4 -34
  112. tests/models/{cycle → hestia}/test_liveAnimal.py +1 -1
  113. tests/models/{cycle → hestia}/test_longFallowRatio.py +1 -1
  114. tests/models/{site → hestia}/test_management.py +1 -1
  115. tests/models/{cycle → hestia}/test_materialsAndSubstrate.py +1 -1
  116. tests/models/{cycle → hestia}/test_milkYield.py +1 -1
  117. tests/models/{site → hestia}/test_netPrimaryProduction.py +1 -1
  118. tests/models/{site → hestia}/test_organicCarbonPerHa.py +1 -1
  119. tests/models/{site → hestia}/test_organicCarbonPerKgSoil.py +1 -1
  120. tests/models/{site → hestia}/test_organicCarbonPerM3Soil.py +1 -1
  121. tests/models/{site → hestia}/test_organicMatterPerKgSoil.py +1 -1
  122. tests/models/{site → hestia}/test_organicMatterPerM3Soil.py +1 -1
  123. tests/models/{cycle → hestia}/test_pastureGrass.py +1 -1
  124. tests/models/{cycle → hestia}/test_pastureSystem.py +1 -1
  125. tests/models/{site → hestia}/test_potentialEvapotranspirationAnnual.py +1 -1
  126. tests/models/{site → hestia}/test_potentialEvapotranspirationMonthly.py +1 -1
  127. tests/models/{site → hestia}/test_precipitationAnnual.py +1 -1
  128. tests/models/{site → hestia}/test_precipitationMonthly.py +1 -1
  129. tests/models/{site → hestia}/test_rainfallAnnual.py +1 -1
  130. tests/models/{site → hestia}/test_rainfallMonthly.py +1 -1
  131. tests/models/{cycle → hestia}/test_readyToCookWeightPerHead.py +1 -1
  132. tests/models/{cycle → hestia}/test_residueBurnt.py +1 -1
  133. tests/models/{cycle → hestia}/test_residueIncorporated.py +1 -1
  134. tests/models/{cycle → hestia}/test_residueLeftOnField.py +1 -1
  135. tests/models/hestia/test_residueRemoved.py +15 -3
  136. tests/models/{site → hestia}/test_salineWater.py +1 -1
  137. tests/models/{site → hestia}/test_soilMeasurement.py +2 -2
  138. tests/models/{cycle → hestia}/test_stockingDensityAnimalHousingAverage.py +1 -1
  139. tests/models/{site → hestia}/test_temperatureAnnual.py +1 -1
  140. tests/models/{site → hestia}/test_temperatureMonthly.py +1 -1
  141. tests/models/{site → hestia}/test_totalNitrogenPerKgSoil.py +1 -1
  142. tests/models/{cycle → hestia}/test_unknownPreSeasonWaterRegime.py +1 -1
  143. tests/models/{site → hestia}/test_waterDepth.py +1 -1
  144. tests/models/hestia/test_waterSalinity.py +26 -0
  145. tests/models/ipcc2019/test_ch4ToAirFloodedRice.py +10 -42
  146. tests/models/ipcc2019/test_co2ToAirSoilOrganicCarbonStockChange.py +2 -1
  147. tests/models/ipcc2019/test_nonCo2EmissionsToAirNaturalVegetationBurning.py +3 -2
  148. tests/models/test_ecoinventV3AndEmberClimate.py +2 -2
  149. tests/models/test_emissionNotRelevant.py +0 -8
  150. tests/models/utils/test_measurement.py +1 -1
  151. hestia_earth/models/cycle/residueRemoved.py +0 -54
  152. hestia_earth/models/hestia/nh3ToSurfaceWaterAquacultureSystems.py +0 -64
  153. hestia_earth/models/site/utils.py +0 -93
  154. tests/models/cycle/test_residueRemoved.py +0 -37
  155. tests/models/hestia/test_nh3ToSurfaceWaterAquacultureSystems.py +0 -51
  156. /hestia_earth/models/{cycle → hestia}/feedConversionRatio/feedConversionRatioCarbon.py +0 -0
  157. /hestia_earth/models/{cycle → hestia}/feedConversionRatio/feedConversionRatioDryMatter.py +0 -0
  158. /hestia_earth/models/{cycle → hestia}/feedConversionRatio/feedConversionRatioEnergy.py +0 -0
  159. /hestia_earth/models/{cycle → hestia}/feedConversionRatio/feedConversionRatioFedWeight.py +0 -0
  160. /hestia_earth/models/{cycle → hestia}/feedConversionRatio/feedConversionRatioNitrogen.py +0 -0
  161. /hestia_earth/models/{site → hestia}/management.py +0 -0
  162. /hestia_earth/models/{site → hestia}/organicCarbonPerKgSoil.py +0 -0
  163. /hestia_earth/models/{site → hestia}/organicCarbonPerM3Soil.py +0 -0
  164. /hestia_earth/models/{site → hestia}/organicMatterPerKgSoil.py +0 -0
  165. /hestia_earth/models/{site → hestia}/organicMatterPerM3Soil.py +0 -0
  166. {hestia_earth_models-0.70.0.dist-info → hestia_earth_models-0.70.1.dist-info}/LICENSE +0 -0
  167. {hestia_earth_models-0.70.0.dist-info → hestia_earth_models-0.70.1.dist-info}/WHEEL +0 -0
  168. {hestia_earth_models-0.70.0.dist-info → hestia_earth_models-0.70.1.dist-info}/top_level.txt +0 -0
@@ -74,7 +74,7 @@ def _get_factor_from_region(impact_assessment: dict, site: dict):
74
74
  return safe_parse_float(value, None)
75
75
 
76
76
 
77
- def _run(impact_assessment: dict):
77
+ def run(impact_assessment: dict):
78
78
  cycle = impact_assessment.get('cycle', {})
79
79
  product = get_product(impact_assessment)
80
80
  fresh_water = emission_value(impact_assessment, 'freshwaterWithdrawalsDuringCycle')
@@ -87,26 +87,18 @@ def _run(impact_assessment: dict):
87
87
  impact_assessment, product, sum_input_impacts(cycle.get('inputs', []), TERM_ID), model=MODEL, term_id=TERM_ID
88
88
  )
89
89
 
90
- logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
91
- fresh_water=fresh_water,
92
- aware_id=aware_id,
93
- factor=factor,
94
- inputs_value=inputs_value)
95
-
96
90
  value = sum_values([
97
91
  multiply_values([fresh_water, factor]),
98
92
  inputs_value
99
93
  ])
100
- return _indicator(value) if value is not None else None
101
94
 
95
+ logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
96
+ fresh_water=fresh_water,
97
+ aware_id=aware_id,
98
+ factor=factor,
99
+ inputs_value=inputs_value)
102
100
 
103
- def _should_run(impact_assessment: dict):
104
- site = get_site(impact_assessment)
105
- # does not run without a site as data is geospatial
106
- should_run = all([site])
101
+ should_run = all([value is not None])
107
102
  logShouldRun(impact_assessment, MODEL, TERM_ID, should_run)
108
- return should_run
109
-
110
103
 
111
- def run(impact_assessment: dict):
112
- return _run(impact_assessment) if _should_run(impact_assessment) else None
104
+ return [_indicator(value)] if should_run else []
@@ -28,7 +28,7 @@
28
28
  },
29
29
  {
30
30
  "key": "practices",
31
- "model": "cycle",
31
+ "model": "hestia",
32
32
  "value": "croppingIntensity",
33
33
  "runStrategy": "add_blank_node_if_missing",
34
34
  "mergeStrategy": "list",
@@ -93,7 +93,7 @@
93
93
  },
94
94
  {
95
95
  "key": "inputs",
96
- "model": "cycle",
96
+ "model": "hestia",
97
97
  "value": "materialAndSubstrate",
98
98
  "runStrategy": "always",
99
99
  "mergeStrategy": "list",
@@ -103,7 +103,7 @@
103
103
  [
104
104
  {
105
105
  "key": "practices",
106
- "model": "cycle",
106
+ "model": "hestia",
107
107
  "value": "residueBurnt",
108
108
  "runStrategy": "add_blank_node_if_missing",
109
109
  "mergeStrategy": "list",
@@ -111,7 +111,7 @@
111
111
  },
112
112
  {
113
113
  "key": "practices",
114
- "model": "cycle",
114
+ "model": "hestia",
115
115
  "value": "residueIncorporated",
116
116
  "runStrategy": "add_blank_node_if_missing",
117
117
  "mergeStrategy": "list",
@@ -119,7 +119,7 @@
119
119
  },
120
120
  {
121
121
  "key": "practices",
122
- "model": "cycle",
122
+ "model": "hestia",
123
123
  "value": "residueLeftOnField",
124
124
  "runStrategy": "add_blank_node_if_missing",
125
125
  "mergeStrategy": "list",
@@ -127,7 +127,7 @@
127
127
  },
128
128
  {
129
129
  "key": "practices",
130
- "model": "cycle",
130
+ "model": "hestia",
131
131
  "value": "residueRemoved",
132
132
  "runStrategy": "add_blank_node_if_missing",
133
133
  "mergeStrategy": "list",
@@ -169,14 +169,6 @@
169
169
  {
170
170
  "key": "practices",
171
171
  "model": "hestia",
172
- "value": "residueRemoved",
173
- "runStrategy": "add_blank_node_if_missing",
174
- "mergeStrategy": "list",
175
- "stage": 1
176
- },
177
- {
178
- "key": "practices",
179
- "model": "cycle",
180
172
  "value": "cropResidueManagement",
181
173
  "runStrategy": "always",
182
174
  "mergeStrategy": "list",
@@ -192,7 +184,7 @@
192
184
  },
193
185
  {
194
186
  "key": "products",
195
- "model": "cycle",
187
+ "model": "hestia",
196
188
  "value": "aboveGroundCropResidueTotal",
197
189
  "runStrategy": "add_blank_node_if_missing",
198
190
  "mergeStrategy": "list",
@@ -224,7 +216,7 @@
224
216
  },
225
217
  {
226
218
  "key": "products",
227
- "model": "cycle",
219
+ "model": "hestia",
228
220
  "value": "aboveGroundCropResidue",
229
221
  "runStrategy": "always",
230
222
  "mergeStrategy": "list",
@@ -241,7 +233,7 @@
241
233
  [
242
234
  {
243
235
  "key": "practices",
244
- "model": "cycle",
236
+ "model": "hestia",
245
237
  "value": "residueBurnt",
246
238
  "runStrategy": "add_blank_node_if_missing",
247
239
  "mergeStrategy": "list",
@@ -249,7 +241,7 @@
249
241
  },
250
242
  {
251
243
  "key": "practices",
252
- "model": "cycle",
244
+ "model": "hestia",
253
245
  "value": "residueIncorporated",
254
246
  "runStrategy": "add_blank_node_if_missing",
255
247
  "mergeStrategy": "list",
@@ -257,7 +249,7 @@
257
249
  },
258
250
  {
259
251
  "key": "practices",
260
- "model": "cycle",
252
+ "model": "hestia",
261
253
  "value": "residueLeftOnField",
262
254
  "runStrategy": "add_blank_node_if_missing",
263
255
  "mergeStrategy": "list",
@@ -265,7 +257,7 @@
265
257
  },
266
258
  {
267
259
  "key": "practices",
268
- "model": "cycle",
260
+ "model": "hestia",
269
261
  "value": "residueRemoved",
270
262
  "runStrategy": "add_blank_node_if_missing",
271
263
  "mergeStrategy": "list",
@@ -323,7 +315,7 @@
323
315
  [
324
316
  {
325
317
  "key": "practices",
326
- "model": "cycle",
318
+ "model": "hestia",
327
319
  "value": "longFallowRatio",
328
320
  "runStrategy": "add_blank_node_if_missing",
329
321
  "mergeStrategy": "list",
@@ -331,7 +323,7 @@
331
323
  },
332
324
  {
333
325
  "key": "practices",
334
- "model": "cycle",
326
+ "model": "hestia",
335
327
  "value": "irrigatedTypeUnspecified",
336
328
  "runStrategy": "add_blank_node_if_missing",
337
329
  "runArgs": {
@@ -342,7 +334,7 @@
342
334
  },
343
335
  {
344
336
  "key": "practices",
345
- "model": "cycle",
337
+ "model": "hestia",
346
338
  "value": "unknownPreSeasonWaterRegime",
347
339
  "runStrategy": "add_blank_node_if_missing",
348
340
  "runArgs": {
@@ -353,7 +345,7 @@
353
345
  },
354
346
  {
355
347
  "key": "practices",
356
- "model": "cycle",
348
+ "model": "hestia",
357
349
  "value": "stockingDensityAnimalHousingAverage",
358
350
  "runStrategy": "always",
359
351
  "mergeStrategy": "list",
@@ -441,7 +433,7 @@
441
433
  },
442
434
  {
443
435
  "key": "inputs",
444
- "model": "cycle",
436
+ "model": "hestia",
445
437
  "value": "inorganicFertiliser",
446
438
  "runStrategy": "always",
447
439
  "mergeStrategy": "list",
@@ -594,7 +586,7 @@
594
586
  [
595
587
  {
596
588
  "key": "products",
597
- "model": "cycle",
589
+ "model": "hestia",
598
590
  "value": "coldCarcassWeightPerHead",
599
591
  "runStrategy": "always",
600
592
  "mergeStrategy": "list",
@@ -602,7 +594,7 @@
602
594
  },
603
595
  {
604
596
  "key": "products",
605
- "model": "cycle",
597
+ "model": "hestia",
606
598
  "value": "coldDressedCarcassWeightPerHead",
607
599
  "runStrategy": "always",
608
600
  "mergeStrategy": "list",
@@ -610,7 +602,7 @@
610
602
  },
611
603
  {
612
604
  "key": "products",
613
- "model": "cycle",
605
+ "model": "hestia",
614
606
  "value": "readyToCookWeightPerHead",
615
607
  "runStrategy": "always",
616
608
  "mergeStrategy": "list",
@@ -670,7 +662,7 @@
670
662
  },
671
663
  {
672
664
  "key": "animals",
673
- "model": "cycle",
665
+ "model": "hestia",
674
666
  "value": "milkYield",
675
667
  "runStrategy": "always",
676
668
  "mergeStrategy": "list",
@@ -679,7 +671,7 @@
679
671
  ],
680
672
  {
681
673
  "key": "inputs",
682
- "model": "cycle",
674
+ "model": "hestia",
683
675
  "value": "energyContentLowerHeatingValue",
684
676
  "runStrategy": "always",
685
677
  "mergeStrategy": "list",
@@ -735,7 +727,7 @@
735
727
  },
736
728
  {
737
729
  "key": "practices",
738
- "model": "cycle",
730
+ "model": "hestia",
739
731
  "value": "pastureSystem",
740
732
  "runStrategy": "always",
741
733
  "mergeStrategy": "list",
@@ -743,7 +735,7 @@
743
735
  },
744
736
  {
745
737
  "key": "practices",
746
- "model": "cycle",
738
+ "model": "hestia",
747
739
  "value": "pastureGrass",
748
740
  "runStrategy": "add_blank_node_if_missing",
749
741
  "mergeStrategy": "list",
@@ -776,7 +768,7 @@
776
768
  },
777
769
  {
778
770
  "key": "products",
779
- "model": "cycle",
771
+ "model": "hestia",
780
772
  "value": "liveAnimal",
781
773
  "runStrategy": "always",
782
774
  "mergeStrategy": "list",
@@ -784,7 +776,7 @@
784
776
  },
785
777
  {
786
778
  "key": "practices",
787
- "model": "cycle",
779
+ "model": "hestia",
788
780
  "value": "feedConversionRatio",
789
781
  "runStrategy": "always",
790
782
  "mergeStrategy": "list",
@@ -844,7 +836,7 @@
844
836
  },
845
837
  {
846
838
  "key": "products",
847
- "model": "cycle",
839
+ "model": "hestia",
848
840
  "value": "concentrateFeed",
849
841
  "runStrategy": "always",
850
842
  "mergeStrategy": "list",
@@ -853,7 +845,7 @@
853
845
  ],
854
846
  {
855
847
  "key": "products",
856
- "model": "cycle",
848
+ "model": "hestia",
857
849
  "value": "excretaKgMass",
858
850
  "runStrategy": "always",
859
851
  "mergeStrategy": "list",
@@ -862,7 +854,7 @@
862
854
  [
863
855
  {
864
856
  "key": "products",
865
- "model": "cycle",
857
+ "model": "hestia",
866
858
  "value": "excretaKgN",
867
859
  "runStrategy": "always",
868
860
  "mergeStrategy": "list",
@@ -870,7 +862,7 @@
870
862
  },
871
863
  {
872
864
  "key": "products",
873
- "model": "cycle",
865
+ "model": "hestia",
874
866
  "value": "excretaKgVs",
875
867
  "runStrategy": "always",
876
868
  "mergeStrategy": "list",
@@ -932,6 +924,28 @@
932
924
  "mergeStrategy": "list",
933
925
  "stage": 2
934
926
  },
927
+ {
928
+ "key": "emissions",
929
+ "model": "linkedImpactAssessment",
930
+ "value": "emissions",
931
+ "runStrategy": "always",
932
+ "mergeStrategy": "list",
933
+ "mergeArgs": {
934
+ "replaceThreshold": ["value", 0.01]
935
+ },
936
+ "stage": 2
937
+ },
938
+ {
939
+ "key": "emissions",
940
+ "model": "ecoalimV9",
941
+ "value": "cycle",
942
+ "runStrategy": "always",
943
+ "mergeStrategy": "list",
944
+ "mergeArgs": {
945
+ "replaceThreshold": ["value", 0.01]
946
+ },
947
+ "stage": 2
948
+ },
935
949
  {
936
950
  "key": "emissions",
937
951
  "model": "ecoinventV3AndEmberClimate",
@@ -2078,17 +2092,6 @@
2078
2092
  "stage": 2
2079
2093
  }
2080
2094
  ],
2081
- {
2082
- "key": "emissions",
2083
- "model": "linkedImpactAssessment",
2084
- "value": "emissions",
2085
- "runStrategy": "always",
2086
- "mergeStrategy": "list",
2087
- "mergeArgs": {
2088
- "replaceThreshold": ["value", 0.01]
2089
- },
2090
- "stage": 2
2091
- },
2092
2095
  {
2093
2096
  "key": "emissions",
2094
2097
  "model": "emissionNotRelevant",
@@ -2175,21 +2178,6 @@
2175
2178
  "replaceThreshold": ["value", 0.01]
2176
2179
  },
2177
2180
  "stage": 2
2178
- },
2179
- {
2180
- "key": "emissions",
2181
- "model": "hestia",
2182
- "value": "nh3ToSurfaceWaterAquacultureSystems",
2183
- "runStrategy": "add_blank_node_if_missing",
2184
- "runArgs": {
2185
- "runNonMeasured": true,
2186
- "runNonAddedTerm": true
2187
- },
2188
- "mergeStrategy": "list",
2189
- "mergeArgs": {
2190
- "replaceThreshold": ["value", 0.01]
2191
- },
2192
- "stage": 2
2193
2181
  }
2194
2182
  ],
2195
2183
  {
@@ -45,6 +45,17 @@
45
45
  },
46
46
  "stage": 1
47
47
  },
48
+ {
49
+ "key": "emissionsResourceUse",
50
+ "model": "ecoalimV9",
51
+ "value": "impact_assessment",
52
+ "runStrategy": "always",
53
+ "mergeStrategy": "list",
54
+ "mergeArgs": {
55
+ "replaceThreshold": ["value", 0.01]
56
+ },
57
+ "stage": 1
58
+ },
48
59
  {
49
60
  "key": "emissionsResourceUse",
50
61
  "model": "pooreNemecek2018",
@@ -872,10 +883,7 @@
872
883
  "runStrategy": "always",
873
884
  "mergeStrategy": "list",
874
885
  "mergeArgs": {
875
- "replaceThreshold": [
876
- "value",
877
- 0.01
878
- ]
886
+ "replaceThreshold": ["value", 0.01]
879
887
  },
880
888
  "stage": 1
881
889
  },
@@ -3,7 +3,7 @@
3
3
  [
4
4
  {
5
5
  "key": "measurements",
6
- "model": "site",
6
+ "model": "hestia",
7
7
  "value": "organicCarbonPerKgSoil",
8
8
  "runStrategy": "add_blank_node_if_missing",
9
9
  "mergeStrategy": "list",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "key": "measurements",
14
- "model": "site",
14
+ "model": "hestia",
15
15
  "value": "organicCarbonPerM3Soil",
16
16
  "runStrategy": "add_blank_node_if_missing",
17
17
  "mergeStrategy": "list",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "key": "measurements",
22
- "model": "site",
22
+ "model": "hestia",
23
23
  "value": "organicMatterPerKgSoil",
24
24
  "runStrategy": "add_blank_node_if_missing",
25
25
  "mergeStrategy": "list",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  {
29
29
  "key": "measurements",
30
- "model": "site",
30
+ "model": "hestia",
31
31
  "value": "organicMatterPerM3Soil",
32
32
  "runStrategy": "add_blank_node_if_missing",
33
33
  "mergeStrategy": "list",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  {
37
37
  "key": "measurements",
38
- "model": "site",
38
+ "model": "hestia",
39
39
  "value": "potentialEvapotranspirationMonthly",
40
40
  "runStrategy": "add_blank_node_if_missing",
41
41
  "mergeStrategy": "list",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  {
45
45
  "key": "measurements",
46
- "model": "site",
46
+ "model": "hestia",
47
47
  "value": "precipitationMonthly",
48
48
  "runStrategy": "add_blank_node_if_missing",
49
49
  "mergeStrategy": "list",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  {
53
53
  "key": "measurements",
54
- "model": "site",
54
+ "model": "hestia",
55
55
  "value": "rainfallMonthly",
56
56
  "runStrategy": "add_blank_node_if_missing",
57
57
  "mergeStrategy": "list",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  {
61
61
  "key": "measurements",
62
- "model": "site",
62
+ "model": "hestia",
63
63
  "value": "temperatureMonthly",
64
64
  "runStrategy": "add_blank_node_if_missing",
65
65
  "mergeStrategy": "list",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  {
69
69
  "key": "measurements",
70
- "model": "site",
70
+ "model": "hestia",
71
71
  "value": "brackishWater",
72
72
  "runStrategy": "add_blank_node_if_missing",
73
73
  "mergeStrategy": "list",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  {
77
77
  "key": "measurements",
78
- "model": "site",
78
+ "model": "hestia",
79
79
  "value": "freshWater",
80
80
  "runStrategy": "add_blank_node_if_missing",
81
81
  "mergeStrategy": "list",
@@ -83,7 +83,7 @@
83
83
  },
84
84
  {
85
85
  "key": "measurements",
86
- "model": "site",
86
+ "model": "hestia",
87
87
  "value": "salineWater",
88
88
  "runStrategy": "add_blank_node_if_missing",
89
89
  "mergeStrategy": "list",
@@ -93,7 +93,7 @@
93
93
  [
94
94
  {
95
95
  "key": "measurements",
96
- "model": "site",
96
+ "model": "hestia",
97
97
  "value": "potentialEvapotranspirationAnnual",
98
98
  "runStrategy": "add_blank_node_if_missing",
99
99
  "mergeStrategy": "list",
@@ -101,7 +101,7 @@
101
101
  },
102
102
  {
103
103
  "key": "measurements",
104
- "model": "site",
104
+ "model": "hestia",
105
105
  "value": "precipitationAnnual",
106
106
  "runStrategy": "add_blank_node_if_missing",
107
107
  "mergeStrategy": "list",
@@ -109,7 +109,7 @@
109
109
  },
110
110
  {
111
111
  "key": "measurements",
112
- "model": "site",
112
+ "model": "hestia",
113
113
  "value": "rainfallAnnual",
114
114
  "runStrategy": "add_blank_node_if_missing",
115
115
  "mergeStrategy": "list",
@@ -117,7 +117,7 @@
117
117
  },
118
118
  {
119
119
  "key": "measurements",
120
- "model": "site",
120
+ "model": "hestia",
121
121
  "value": "temperatureAnnual",
122
122
  "runStrategy": "add_blank_node_if_missing",
123
123
  "mergeStrategy": "list",
@@ -361,7 +361,7 @@
361
361
  },
362
362
  {
363
363
  "key": "measurements",
364
- "model": "site",
364
+ "model": "hestia",
365
365
  "value": "totalNitrogenPerKgSoil",
366
366
  "runStrategy": "add_blank_node_if_missing",
367
367
  "mergeStrategy": "list",
@@ -369,7 +369,7 @@
369
369
  },
370
370
  {
371
371
  "key": "measurements",
372
- "model": "site",
372
+ "model": "hestia",
373
373
  "value": "netPrimaryProduction",
374
374
  "runStrategy": "add_blank_node_if_missing",
375
375
  "mergeStrategy": "list",
@@ -377,7 +377,7 @@
377
377
  },
378
378
  {
379
379
  "key": "measurements",
380
- "model": "site",
380
+ "model": "hestia",
381
381
  "value": "waterDepth",
382
382
  "runStrategy": "add_blank_node_if_missing",
383
383
  "mergeStrategy": "list",
@@ -385,7 +385,7 @@
385
385
  },
386
386
  {
387
387
  "key": "measurements",
388
- "model": "site",
388
+ "model": "hestia",
389
389
  "value": "cationExchangeCapacityPerKgSoil",
390
390
  "runStrategy": "add_blank_node_if_missing",
391
391
  "mergeStrategy": "list",
@@ -402,7 +402,7 @@
402
402
  },
403
403
  {
404
404
  "key": "measurements",
405
- "model": "site",
405
+ "model": "hestia",
406
406
  "value": "soilMeasurement",
407
407
  "runStrategy": "always",
408
408
  "mergeStrategy": "list",
@@ -410,7 +410,7 @@
410
410
  },
411
411
  {
412
412
  "key": "management",
413
- "model": "site",
413
+ "model": "hestia",
414
414
  "value": "management",
415
415
  "runStrategy": "always",
416
416
  "mergeStrategy": "list",
@@ -422,7 +422,18 @@
422
422
  [
423
423
  {
424
424
  "key": "measurements",
425
- "model": "site",
425
+ "model": "hestia",
426
+ "value": "waterSalinity",
427
+ "runStrategy": "always",
428
+ "mergeStrategy": "list",
429
+ "mergeArgs": {
430
+ "replaceThreshold": ["value", 0.01]
431
+ },
432
+ "stage": 2
433
+ },
434
+ {
435
+ "key": "measurements",
436
+ "model": "hestia",
426
437
  "value": "organicCarbonPerHa",
427
438
  "runStrategy": "always",
428
439
  "mergeStrategy": "list",
@@ -25,7 +25,7 @@ def _run_emission(cycle: dict, transformation: dict):
25
25
  def exec(emission: dict):
26
26
  term_id = emission.get('term', {}).get('@id')
27
27
  logShouldRun(cycle, MODEL_LOG, term_id, True, key=MODEL_KEY)
28
- return {**emission, MODEL_KEY: transformation.get('term', {})}
28
+ return emission | {MODEL_KEY: transformation.get('term', {})}
29
29
  return exec
30
30
 
31
31
 
@@ -1,15 +1,9 @@
1
1
  from hestia_earth.utils.tools import list_average
2
2
 
3
3
  from hestia_earth.models.log import logShouldRun
4
- from hestia_earth.models.utils.term import get_lookup_value
5
4
  from . import MODEL
6
5
 
7
6
 
8
- def get_liveAnimal_term_id(product: dict, **log_ars):
9
- term_id = get_lookup_value(product.get('term', {}), 'liveAnimalTermId', model=MODEL, **log_ars)
10
- return term_id.split(';')[0] if term_id else None
11
-
12
-
13
7
  def _should_run_property_by_min_max(property: dict):
14
8
  return all([
15
9
  property.get('min') is not None,