hestia-earth-models 0.62.0__py3-none-any.whl → 0.62.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/blonkConsultants2016/utils.py +3 -2
- hestia_earth/models/cycle/post_checks/__init__.py +3 -2
- hestia_earth/models/cycle/post_checks/otherSites.py +40 -0
- hestia_earth/models/cycle/pre_checks/__init__.py +2 -1
- hestia_earth/models/cycle/pre_checks/otherSites.py +42 -0
- hestia_earth/models/cycle/pre_checks/site.py +1 -1
- hestia_earth/models/ecoinventV3AndEmberClimate/utils.py +1 -1
- hestia_earth/models/emepEea2019/utils.py +4 -3
- hestia_earth/models/geospatialDatabase/heavyWinterPrecipitation.py +1 -1
- hestia_earth/models/ipcc2019/animal/pastureGrass.py +6 -6
- hestia_earth/models/ipcc2019/co2ToAirSoilOrganicCarbonStockChangeManagementChange.py +30 -4
- hestia_earth/models/ipcc2019/n2OToAirExcretaDirect.py +6 -2
- hestia_earth/models/ipcc2019/n2OToAirExcretaIndirect.py +1 -1
- hestia_earth/models/ipcc2019/n2OToAirInorganicFertiliserDirect.py +1 -1
- hestia_earth/models/ipcc2019/n2OToAirInorganicFertiliserIndirect.py +1 -1
- hestia_earth/models/ipcc2019/n2OToAirOrganicFertiliserIndirect.py +1 -1
- hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_1_utils.py +4 -2
- hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_2_utils.py +2 -1
- hestia_earth/models/ipcc2019/pastureGrass.py +3 -3
- hestia_earth/models/ipcc2019/pastureGrass_utils.py +41 -41
- hestia_earth/models/mocking/search-results.json +89 -89
- hestia_earth/models/schererPfister2015/utils.py +2 -2
- hestia_earth/models/site/brackishWater.py +1 -1
- hestia_earth/models/site/flowingWater.py +1 -1
- hestia_earth/models/site/freshWater.py +1 -1
- hestia_earth/models/site/management.py +29 -11
- hestia_earth/models/site/pre_checks/cache_sources.py +9 -13
- hestia_earth/models/site/salineWater.py +1 -1
- hestia_earth/models/stehfestBouwman2006/n2OToAirCropResidueDecompositionDirect.py +12 -2
- hestia_earth/models/stehfestBouwman2006/n2OToAirExcretaDirect.py +12 -2
- hestia_earth/models/stehfestBouwman2006/n2OToAirInorganicFertiliserDirect.py +11 -1
- hestia_earth/models/stehfestBouwman2006/n2OToAirOrganicFertiliserDirect.py +11 -1
- hestia_earth/models/stehfestBouwman2006/noxToAirCropResidueDecomposition.py +12 -2
- hestia_earth/models/stehfestBouwman2006/noxToAirExcreta.py +12 -2
- hestia_earth/models/stehfestBouwman2006/noxToAirInorganicFertiliser.py +11 -1
- hestia_earth/models/stehfestBouwman2006/noxToAirOrganicFertiliser.py +11 -1
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirCropResidueDecomposition.py +12 -2
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirExcreta.py +12 -2
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirInorganicFertiliser.py +11 -1
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirOrganicFertiliser.py +11 -1
- hestia_earth/models/utils/blank_node.py +106 -110
- hestia_earth/models/utils/constant.py +2 -0
- hestia_earth/models/utils/lookup.py +19 -6
- hestia_earth/models/utils/source.py +1 -1
- hestia_earth/models/version.py +1 -1
- {hestia_earth_models-0.62.0.dist-info → hestia_earth_models-0.62.1.dist-info}/METADATA +2 -2
- {hestia_earth_models-0.62.0.dist-info → hestia_earth_models-0.62.1.dist-info}/RECORD +58 -53
- tests/models/cycle/post_checks/test_otherSites.py +15 -0
- tests/models/cycle/pre_checks/test_otherSites.py +21 -0
- tests/models/ipcc2019/test_co2ToAirSoilOrganicCarbonStockChangeManagementChange.py +5 -3
- tests/models/ipcc2019/test_organicCarbonPerHa.py +1 -0
- tests/models/site/pre_checks/test_cache_sources.py +6 -10
- tests/models/site/test_management.py +162 -2
- tests/models/utils/test_blank_node.py +0 -281
- tests/models/utils/test_lookup.py +10 -0
- {hestia_earth_models-0.62.0.dist-info → hestia_earth_models-0.62.1.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.62.0.dist-info → hestia_earth_models-0.62.1.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.62.0.dist-info → hestia_earth_models-0.62.1.dist-info}/top_level.txt +0 -0
|
@@ -131,227 +131,227 @@
|
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
"@type": "Term",
|
|
134
|
-
"@id": "
|
|
134
|
+
"@id": "n2OToAirNaturalVegetationBurningDirect"
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
"@type": "Term",
|
|
138
|
-
"@id": "
|
|
138
|
+
"@id": "hexaneToAirInputsProduction"
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
"@type": "Term",
|
|
142
|
-
"@id": "
|
|
142
|
+
"@id": "1112TetrafluoroethaneToAirIndustrialProcesses"
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
"@type": "Term",
|
|
146
|
-
"@id": "
|
|
146
|
+
"@id": "pToDrainageWaterIndustrialProcesses"
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
149
|
"@type": "Term",
|
|
150
|
-
"@id": "
|
|
150
|
+
"@id": "nmvocToAirWasteTreatment"
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
"@type": "Term",
|
|
154
|
-
"@id": "
|
|
154
|
+
"@id": "pErosionSoilFlux"
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
"@type": "Term",
|
|
158
|
-
"@id": "
|
|
158
|
+
"@id": "co2ToAirBelowGroundBiomassStockChangeLandUseChange"
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
"@type": "Term",
|
|
162
|
-
"@id": "
|
|
162
|
+
"@id": "po43ToSurfaceWaterIndustrialProcesses"
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
165
|
"@type": "Term",
|
|
166
|
-
"@id": "
|
|
166
|
+
"@id": "po43ToSurfaceWaterAquacultureSystems"
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
"@type": "Term",
|
|
170
|
-
"@id": "
|
|
170
|
+
"@id": "blackCarbonToAirFuelCombustion"
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
"@type": "Term",
|
|
174
|
-
"@id": "
|
|
174
|
+
"@id": "pesticideToSoilInputsProduction"
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
"@type": "Term",
|
|
178
|
-
"@id": "
|
|
178
|
+
"@id": "soxToAirInputsProduction"
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
"@type": "Term",
|
|
182
|
-
"@id": "
|
|
182
|
+
"@id": "noxToAirInputsProduction"
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
"@type": "Term",
|
|
186
|
-
"@id": "
|
|
186
|
+
"@id": "nmvocToAirSilageFeeding"
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
"@type": "Term",
|
|
190
|
-
"@id": "
|
|
190
|
+
"@id": "nf3ToAirInputsProduction"
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
"@type": "Term",
|
|
194
|
-
"@id": "
|
|
194
|
+
"@id": "tspToAirFuelCombustion"
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
"@type": "Term",
|
|
198
|
-
"@id": "
|
|
198
|
+
"@id": "noxToAirOrganicSoilBurning"
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
"@type": "Term",
|
|
202
|
-
"@id": "
|
|
202
|
+
"@id": "no3ToGroundwaterInputsProduction"
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
"@type": "Term",
|
|
206
|
-
"@id": "
|
|
206
|
+
"@id": "pToGroundwaterInputsProduction"
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
209
|
"@type": "Term",
|
|
210
|
-
"@id": "
|
|
210
|
+
"@id": "nToSurfaceWaterExcreta"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
"@type": "Term",
|
|
214
|
-
"@id": "
|
|
214
|
+
"@id": "ch4ToAirInputsProductionNonFossil"
|
|
215
215
|
},
|
|
216
216
|
{
|
|
217
217
|
"@type": "Term",
|
|
218
|
-
"@id": "
|
|
218
|
+
"@id": "tspToAirIndustrialProcesses"
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
221
|
"@type": "Term",
|
|
222
|
-
"@id": "
|
|
222
|
+
"@id": "n2OToAirOrganicFertiliserDirect"
|
|
223
223
|
},
|
|
224
224
|
{
|
|
225
225
|
"@type": "Term",
|
|
226
|
-
"@id": "
|
|
226
|
+
"@id": "pm25ToAirCropResidueBurning"
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
"@type": "Term",
|
|
230
|
-
"@id": "
|
|
230
|
+
"@id": "ch4ToAirCropResidueDecomposition"
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
233
|
"@type": "Term",
|
|
234
|
-
"@id": "
|
|
234
|
+
"@id": "no3ToGroundwaterOrganicFertiliser"
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
237
|
"@type": "Term",
|
|
238
|
-
"@id": "
|
|
238
|
+
"@id": "n2OToAirNaturalVegetationBurningIndirect"
|
|
239
239
|
},
|
|
240
240
|
{
|
|
241
241
|
"@type": "Term",
|
|
242
|
-
"@id": "
|
|
242
|
+
"@id": "pm10ToAirInputsProduction"
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
"@type": "Term",
|
|
246
|
-
"@id": "
|
|
246
|
+
"@id": "ch4ToAirEntericFermentation"
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
249
|
"@type": "Term",
|
|
250
|
-
"@id": "
|
|
250
|
+
"@id": "nh3ToAirWasteTreatment"
|
|
251
251
|
},
|
|
252
252
|
{
|
|
253
253
|
"@type": "Term",
|
|
254
|
-
"@id": "
|
|
254
|
+
"@id": "n2ToAirInorganicFertiliser"
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
257
|
"@type": "Term",
|
|
258
|
-
"@id": "
|
|
258
|
+
"@id": "n2OToAirInorganicFertiliserDirect"
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
261
|
"@type": "Term",
|
|
262
|
-
"@id": "
|
|
262
|
+
"@id": "nh3ToAirSoilFlux"
|
|
263
263
|
},
|
|
264
264
|
{
|
|
265
265
|
"@type": "Term",
|
|
266
|
-
"@id": "
|
|
266
|
+
"@id": "pesticideToHarvestedCropPesticideApplication"
|
|
267
267
|
},
|
|
268
268
|
{
|
|
269
269
|
"@type": "Term",
|
|
270
|
-
"@id": "
|
|
270
|
+
"@id": "112TrichlorotrifluoroethaneToAirInputsProduction"
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
"@type": "Term",
|
|
274
|
-
"@id": "
|
|
274
|
+
"@id": "nh3ToAirOrganicFertiliser"
|
|
275
275
|
},
|
|
276
276
|
{
|
|
277
277
|
"@type": "Term",
|
|
278
|
-
"@id": "
|
|
278
|
+
"@id": "n2ToAirCropResidueDecomposition"
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
"@type": "Term",
|
|
282
|
-
"@id": "
|
|
282
|
+
"@id": "co2ToAirAboveGroundBiomassStockChangeManagementChange"
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
285
|
"@type": "Term",
|
|
286
|
-
"@id": "
|
|
286
|
+
"@id": "h2SToAirInputsProduction"
|
|
287
287
|
},
|
|
288
288
|
{
|
|
289
289
|
"@type": "Term",
|
|
290
|
-
"@id": "
|
|
290
|
+
"@id": "co2ToAirOrganicSoilCultivation"
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
293
|
"@type": "Term",
|
|
294
|
-
"@id": "
|
|
294
|
+
"@id": "co2ToAirCropResidueDecomposition"
|
|
295
295
|
},
|
|
296
296
|
{
|
|
297
297
|
"@type": "Term",
|
|
298
|
-
"@id": "
|
|
298
|
+
"@id": "n2OToAirExcretaIndirect"
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
301
|
"@type": "Term",
|
|
302
|
-
"@id": "
|
|
302
|
+
"@id": "ch4ToAirInputsProductionFossil"
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
305
|
"@type": "Term",
|
|
306
|
-
"@id": "
|
|
306
|
+
"@id": "ch4ToAirFloodedRice"
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
309
|
"@type": "Term",
|
|
310
|
-
"@id": "
|
|
310
|
+
"@id": "nh4ToGroundwaterSoilFlux"
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
313
|
"@type": "Term",
|
|
314
|
-
"@id": "
|
|
314
|
+
"@id": "co2ToAirFuelCombustion"
|
|
315
315
|
},
|
|
316
316
|
{
|
|
317
317
|
"@type": "Term",
|
|
318
|
-
"@id": "
|
|
318
|
+
"@id": "co2ToAirWasteTreatment"
|
|
319
319
|
},
|
|
320
320
|
{
|
|
321
321
|
"@type": "Term",
|
|
322
|
-
"@id": "
|
|
322
|
+
"@id": "ch4ToAirReservoirs"
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
"@type": "Term",
|
|
326
|
-
"@id": "
|
|
326
|
+
"@id": "blackCarbonToAirIndustrialProcesses"
|
|
327
327
|
},
|
|
328
328
|
{
|
|
329
329
|
"@type": "Term",
|
|
330
|
-
"@id": "
|
|
330
|
+
"@id": "tspToAirInputsProduction"
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
333
|
"@type": "Term",
|
|
334
|
-
"@id": "
|
|
334
|
+
"@id": "noxToAirExcreta"
|
|
335
335
|
},
|
|
336
336
|
{
|
|
337
337
|
"@type": "Term",
|
|
338
|
-
"@id": "
|
|
338
|
+
"@id": "pm10ToAirAnimalHousing"
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
"@type": "Term",
|
|
342
|
-
"@id": "
|
|
342
|
+
"@id": "pToSurfaceWaterAquacultureSystems"
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
"@type": "Term",
|
|
346
|
-
"@id": "
|
|
346
|
+
"@id": "nh4ToSurfaceWaterInputsProduction"
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
349
|
"@type": "Term",
|
|
350
|
-
"@id": "
|
|
350
|
+
"@id": "no3ToSurfaceWaterInputsProduction"
|
|
351
351
|
},
|
|
352
352
|
{
|
|
353
353
|
"@type": "Term",
|
|
354
|
-
"@id": "
|
|
354
|
+
"@id": "po43ToGroundwaterInputsProduction"
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
"@type": "Term",
|
|
@@ -1223,7 +1223,7 @@
|
|
|
1223
1223
|
"termType": "electricity",
|
|
1224
1224
|
"@id": "electricityGridMarketMix",
|
|
1225
1225
|
"units": "kWh",
|
|
1226
|
-
"_score": 27.
|
|
1226
|
+
"_score": 27.80577
|
|
1227
1227
|
},
|
|
1228
1228
|
{
|
|
1229
1229
|
"@type": "Term",
|
|
@@ -1231,7 +1231,7 @@
|
|
|
1231
1231
|
"termType": "electricity",
|
|
1232
1232
|
"@id": "electricityGridRenewableMix",
|
|
1233
1233
|
"units": "kWh",
|
|
1234
|
-
"_score": 27.
|
|
1234
|
+
"_score": 27.80577
|
|
1235
1235
|
}
|
|
1236
1236
|
]
|
|
1237
1237
|
},
|
|
@@ -1306,83 +1306,83 @@
|
|
|
1306
1306
|
},
|
|
1307
1307
|
{
|
|
1308
1308
|
"@type": "Term",
|
|
1309
|
-
"@id": "
|
|
1309
|
+
"@id": "excretaDeerKgN"
|
|
1310
1310
|
},
|
|
1311
1311
|
{
|
|
1312
1312
|
"@type": "Term",
|
|
1313
|
-
"@id": "
|
|
1313
|
+
"@id": "excretaGoatsKgN"
|
|
1314
1314
|
},
|
|
1315
1315
|
{
|
|
1316
1316
|
"@type": "Term",
|
|
1317
|
-
"@id": "
|
|
1317
|
+
"@id": "excretaBeefCattleExceptFeedlotFedKgN"
|
|
1318
1318
|
},
|
|
1319
1319
|
{
|
|
1320
1320
|
"@type": "Term",
|
|
1321
|
-
"@id": "
|
|
1321
|
+
"@id": "excretaDucksKgN"
|
|
1322
1322
|
},
|
|
1323
1323
|
{
|
|
1324
1324
|
"@type": "Term",
|
|
1325
|
-
"@id": "
|
|
1325
|
+
"@id": "excretaSolidFishCrustaceansKgN"
|
|
1326
1326
|
},
|
|
1327
1327
|
{
|
|
1328
1328
|
"@type": "Term",
|
|
1329
|
-
"@id": "
|
|
1329
|
+
"@id": "excretaPoultryKgN"
|
|
1330
1330
|
},
|
|
1331
1331
|
{
|
|
1332
1332
|
"@type": "Term",
|
|
1333
|
-
"@id": "
|
|
1333
|
+
"@id": "excretaRabbitsKgN"
|
|
1334
1334
|
},
|
|
1335
1335
|
{
|
|
1336
1336
|
"@type": "Term",
|
|
1337
|
-
"@id": "
|
|
1337
|
+
"@id": "excretaTurkeysKgN"
|
|
1338
1338
|
},
|
|
1339
1339
|
{
|
|
1340
1340
|
"@type": "Term",
|
|
1341
|
-
"@id": "
|
|
1341
|
+
"@id": "excretaLiquidFishCrustaceansKgN"
|
|
1342
1342
|
},
|
|
1343
1343
|
{
|
|
1344
1344
|
"@type": "Term",
|
|
1345
|
-
"@id": "
|
|
1345
|
+
"@id": "processedExcretaKgN"
|
|
1346
1346
|
},
|
|
1347
1347
|
{
|
|
1348
1348
|
"@type": "Term",
|
|
1349
|
-
"@id": "
|
|
1349
|
+
"@id": "excretaMixturesKgN"
|
|
1350
1350
|
},
|
|
1351
1351
|
{
|
|
1352
1352
|
"@type": "Term",
|
|
1353
|
-
"@id": "
|
|
1353
|
+
"@id": "excretaDairyCattleKgN"
|
|
1354
1354
|
},
|
|
1355
1355
|
{
|
|
1356
1356
|
"@type": "Term",
|
|
1357
|
-
"@id": "
|
|
1357
|
+
"@id": "excretaPigsKgN"
|
|
1358
1358
|
},
|
|
1359
1359
|
{
|
|
1360
1360
|
"@type": "Term",
|
|
1361
|
-
"@id": "
|
|
1361
|
+
"@id": "excretaSheepKgN"
|
|
1362
1362
|
},
|
|
1363
1363
|
{
|
|
1364
1364
|
"@type": "Term",
|
|
1365
|
-
"@id": "
|
|
1365
|
+
"@id": "excretaHorsesMulesAndAssesKgN"
|
|
1366
1366
|
},
|
|
1367
1367
|
{
|
|
1368
1368
|
"@type": "Term",
|
|
1369
|
-
"@id": "
|
|
1369
|
+
"@id": "excretaCamelsKgN"
|
|
1370
1370
|
},
|
|
1371
1371
|
{
|
|
1372
1372
|
"@type": "Term",
|
|
1373
|
-
"@id": "
|
|
1373
|
+
"@id": "excretaInsectsKgN"
|
|
1374
1374
|
},
|
|
1375
1375
|
{
|
|
1376
1376
|
"@type": "Term",
|
|
1377
|
-
"@id": "
|
|
1377
|
+
"@id": "excretaBeefCattleFeedlotFedKgN"
|
|
1378
1378
|
},
|
|
1379
1379
|
{
|
|
1380
1380
|
"@type": "Term",
|
|
1381
|
-
"@id": "
|
|
1381
|
+
"@id": "excretaKgN"
|
|
1382
1382
|
},
|
|
1383
1383
|
{
|
|
1384
1384
|
"@type": "Term",
|
|
1385
|
-
"@id": "
|
|
1385
|
+
"@id": "excretaGeeseKgN"
|
|
1386
1386
|
}
|
|
1387
1387
|
]
|
|
1388
1388
|
},
|
|
@@ -1494,7 +1494,7 @@
|
|
|
1494
1494
|
"@type": "Term",
|
|
1495
1495
|
"name": "Generic crop, seed",
|
|
1496
1496
|
"@id": "genericCropSeed",
|
|
1497
|
-
"_score":
|
|
1497
|
+
"_score": 24.974434
|
|
1498
1498
|
}
|
|
1499
1499
|
]
|
|
1500
1500
|
},
|
|
@@ -1683,15 +1683,15 @@
|
|
|
1683
1683
|
"results": [
|
|
1684
1684
|
{
|
|
1685
1685
|
"@type": "Term",
|
|
1686
|
-
"@id": "
|
|
1686
|
+
"@id": "diesel1D"
|
|
1687
1687
|
},
|
|
1688
1688
|
{
|
|
1689
1689
|
"@type": "Term",
|
|
1690
|
-
"@id": "
|
|
1690
|
+
"@id": "petrolBurntIn2StrokeEngine"
|
|
1691
1691
|
},
|
|
1692
1692
|
{
|
|
1693
1693
|
"@type": "Term",
|
|
1694
|
-
"@id": "
|
|
1694
|
+
"@id": "marineDieselOil"
|
|
1695
1695
|
},
|
|
1696
1696
|
{
|
|
1697
1697
|
"@type": "Term",
|
|
@@ -1715,15 +1715,15 @@
|
|
|
1715
1715
|
},
|
|
1716
1716
|
{
|
|
1717
1717
|
"@type": "Term",
|
|
1718
|
-
"@id": "
|
|
1718
|
+
"@id": "diesel4D"
|
|
1719
1719
|
},
|
|
1720
1720
|
{
|
|
1721
1721
|
"@type": "Term",
|
|
1722
|
-
"@id": "
|
|
1722
|
+
"@id": "en590Diesel"
|
|
1723
1723
|
},
|
|
1724
1724
|
{
|
|
1725
1725
|
"@type": "Term",
|
|
1726
|
-
"@id": "
|
|
1726
|
+
"@id": "diesel2D"
|
|
1727
1727
|
}
|
|
1728
1728
|
]
|
|
1729
1729
|
},
|
|
@@ -1765,19 +1765,19 @@
|
|
|
1765
1765
|
},
|
|
1766
1766
|
{
|
|
1767
1767
|
"@type": "Term",
|
|
1768
|
-
"@id": "
|
|
1768
|
+
"@id": "milkYieldPerSheepFpcm"
|
|
1769
1769
|
},
|
|
1770
1770
|
{
|
|
1771
1771
|
"@type": "Term",
|
|
1772
|
-
"@id": "
|
|
1772
|
+
"@id": "milkYieldPerCowFpcm"
|
|
1773
1773
|
},
|
|
1774
1774
|
{
|
|
1775
1775
|
"@type": "Term",
|
|
1776
|
-
"@id": "
|
|
1776
|
+
"@id": "milkYieldPerBuffaloRaw"
|
|
1777
1777
|
},
|
|
1778
1778
|
{
|
|
1779
1779
|
"@type": "Term",
|
|
1780
|
-
"@id": "
|
|
1780
|
+
"@id": "milkYieldPerCamelRaw"
|
|
1781
1781
|
},
|
|
1782
1782
|
{
|
|
1783
1783
|
"@type": "Term",
|
|
@@ -68,8 +68,8 @@ def get_water(cycle: dict, precipitation: float):
|
|
|
68
68
|
return list_sum([irrigation/10, precipitation or 0])
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
def calculate_R(heavy_winter_precipitation:
|
|
72
|
-
winter_precipitation = 1 if heavy_winter_precipitation
|
|
71
|
+
def calculate_R(heavy_winter_precipitation: bool, water: float):
|
|
72
|
+
winter_precipitation = 1 if heavy_winter_precipitation else 0.1
|
|
73
73
|
water_coeff = (587.8 - 1.219 * water) + (0.004105 * water ** 2) if water > 850 else (0.0483 * water ** 1.61)
|
|
74
74
|
return water_coeff * winter_precipitation
|
|
75
75
|
|
|
@@ -23,7 +23,7 @@ TERM_ID = 'brackishWater'
|
|
|
23
23
|
|
|
24
24
|
def _measurement():
|
|
25
25
|
data = _new_measurement(TERM_ID)
|
|
26
|
-
data['value'] = [
|
|
26
|
+
data['value'] = [True]
|
|
27
27
|
data['methodClassification'] = MeasurementMethodClassification.MODELLED_USING_OTHER_MEASUREMENTS.value
|
|
28
28
|
return data
|
|
29
29
|
|
|
@@ -31,7 +31,7 @@ SITE_TYPE_TO_TERM_ID = {
|
|
|
31
31
|
|
|
32
32
|
def _measurement(site: dict, term_id: str):
|
|
33
33
|
data = _new_measurement(term_id)
|
|
34
|
-
data['value'] = [
|
|
34
|
+
data['value'] = [True]
|
|
35
35
|
data['methodClassification'] = MeasurementMethodClassification.MODELLED_USING_OTHER_MEASUREMENTS.value
|
|
36
36
|
return data | get_source(site, BIBLIO_TITLE)
|
|
37
37
|
|
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Management node
|
|
2
|
+
Management node
|
|
3
|
+
|
|
4
|
+
This model provides data gap-filled data from cycles in the form of a list of management nodes
|
|
5
|
+
(https://www.hestia.earth/schema/Management).
|
|
6
|
+
|
|
7
|
+
It includes products of type crop, forage, landCover (gap-filled with a value of 100) and practices of type waterRegime,
|
|
8
|
+
tillage, cropResidueManagement and landUseManagement.
|
|
9
|
+
|
|
10
|
+
All values are copied from the source node, except for crop and forage terms in which case the dates are copied from the
|
|
11
|
+
cycle.
|
|
12
|
+
|
|
13
|
+
When nodes are chronologically consecutive with "% area" or "boolean" units and the same term and value, they are
|
|
14
|
+
condensed into a single node to aid readability.
|
|
3
15
|
"""
|
|
4
|
-
from typing import List, Any, Callable
|
|
5
16
|
from functools import reduce
|
|
17
|
+
|
|
6
18
|
from hestia_earth.schema import SchemaType, TermTermType
|
|
7
19
|
from hestia_earth.utils.api import download_hestia
|
|
8
20
|
from hestia_earth.utils.model import filter_list_term_type, linked_node
|
|
9
21
|
from hestia_earth.utils.tools import flatten, safe_parse_float
|
|
22
|
+
from hestia_earth.utils.blank_node import get_node_value
|
|
10
23
|
|
|
11
24
|
from hestia_earth.models.log import logRequirements, logShouldRun, log_blank_nodes_id
|
|
12
25
|
from hestia_earth.models.utils.term import get_lookup_value
|
|
13
|
-
from hestia_earth.models.utils.blank_node import
|
|
26
|
+
from hestia_earth.models.utils.blank_node import condense_nodes
|
|
14
27
|
from hestia_earth.models.utils.site import related_cycles
|
|
15
28
|
from . import MODEL
|
|
16
29
|
|
|
@@ -24,7 +37,8 @@ REQUIREMENTS = {
|
|
|
24
37
|
"products": [
|
|
25
38
|
{
|
|
26
39
|
"@type": "Product",
|
|
27
|
-
"term.termType": ["crop", "forage", "landCover"]
|
|
40
|
+
"term.termType": ["crop", "forage", "landCover"],
|
|
41
|
+
"units": ["% area", "boolean"]
|
|
28
42
|
}
|
|
29
43
|
],
|
|
30
44
|
"practices": [
|
|
@@ -35,6 +49,7 @@ REQUIREMENTS = {
|
|
|
35
49
|
"cropResidueManagement",
|
|
36
50
|
"landUseManagement"
|
|
37
51
|
],
|
|
52
|
+
"units": ["% area", "boolean"],
|
|
38
53
|
"value": ""
|
|
39
54
|
}
|
|
40
55
|
],
|
|
@@ -126,7 +141,7 @@ def _overwrite_dates(cycle: dict, values: list) -> list:
|
|
|
126
141
|
return [v | _include(cycle, ["startDate", "endDate"]) for v in values]
|
|
127
142
|
|
|
128
143
|
|
|
129
|
-
def _copy_item_if_exists(source: dict, keys:
|
|
144
|
+
def _copy_item_if_exists(source: dict, keys: list[str] = None, dest: dict = None) -> dict:
|
|
130
145
|
keys = keys or []
|
|
131
146
|
dest = dest or {}
|
|
132
147
|
return reduce(lambda p, c: p | ({c: source[c]} if c in source else {}), keys, dest)
|
|
@@ -139,7 +154,7 @@ def _get_landCover_term_id(product: dict) -> str:
|
|
|
139
154
|
|
|
140
155
|
|
|
141
156
|
def _get_items_with_relevant_term_type(
|
|
142
|
-
cycles:
|
|
157
|
+
cycles: list[dict], item_name: str, relevant_values: list, date_fill: callable = _default_dates
|
|
143
158
|
):
|
|
144
159
|
"""Get items from the list of cycles with any of the relevant values. Also adds dates if missing."""
|
|
145
160
|
return flatten(
|
|
@@ -152,7 +167,7 @@ def _get_items_with_relevant_term_type(
|
|
|
152
167
|
)
|
|
153
168
|
|
|
154
169
|
|
|
155
|
-
def _get_lookup_with_debug(term: dict, column: str) ->
|
|
170
|
+
def _get_lookup_with_debug(term: dict, column: str) -> any:
|
|
156
171
|
get_lookup_value(term, column, model_key=MODEL_KEY, land_cover_key=LAND_COVER_KEY)
|
|
157
172
|
|
|
158
173
|
|
|
@@ -169,7 +184,7 @@ def _data_from_input(cycle: dict, term_id: str) -> dict:
|
|
|
169
184
|
}
|
|
170
185
|
|
|
171
186
|
|
|
172
|
-
def _process_rule(cycle, term, term_type) ->
|
|
187
|
+
def _process_rule(cycle, term, term_type) -> list:
|
|
173
188
|
relevant_terms = []
|
|
174
189
|
for column, condition, new_term in INPUT_RULES[term_type]:
|
|
175
190
|
lookup_result = _get_lookup_with_debug(term, LOOKUPS[column])
|
|
@@ -180,7 +195,7 @@ def _process_rule(cycle, term, term_type) -> List:
|
|
|
180
195
|
return relevant_terms
|
|
181
196
|
|
|
182
197
|
|
|
183
|
-
def _get_relevant_inputs(cycles:
|
|
198
|
+
def _get_relevant_inputs(cycles: list[dict]) -> list:
|
|
184
199
|
relevant_inputs = []
|
|
185
200
|
for cycle in [c for c in cycles if "inputs" in c]:
|
|
186
201
|
for i in cycle["inputs"]:
|
|
@@ -230,6 +245,8 @@ def _should_run(site: dict):
|
|
|
230
245
|
)
|
|
231
246
|
for product in list(filter(_get_landCover_term_id, products_crop_forage))
|
|
232
247
|
]
|
|
248
|
+
all_products = products_land_cover + products_crop_forage
|
|
249
|
+
all_products = condense_nodes(all_products)
|
|
233
250
|
|
|
234
251
|
practices = [
|
|
235
252
|
_extract_node_value(
|
|
@@ -248,6 +265,7 @@ def _should_run(site: dict):
|
|
|
248
265
|
]
|
|
249
266
|
)
|
|
250
267
|
]
|
|
268
|
+
practices = condense_nodes(practices)
|
|
251
269
|
|
|
252
270
|
relevant_inputs = _get_relevant_inputs(cycles)
|
|
253
271
|
logRequirements(
|
|
@@ -260,9 +278,9 @@ def _should_run(site: dict):
|
|
|
260
278
|
practice_ids=log_blank_nodes_id(practices),
|
|
261
279
|
inputs=log_blank_nodes_id(relevant_inputs)
|
|
262
280
|
)
|
|
263
|
-
should_run = any(
|
|
281
|
+
should_run = any(all_products + practices + relevant_inputs)
|
|
264
282
|
logShouldRun(site, MODEL, None, should_run=should_run, model_key=MODEL_KEY)
|
|
265
|
-
return should_run,
|
|
283
|
+
return should_run, all_products, practices, relevant_inputs
|
|
266
284
|
|
|
267
285
|
|
|
268
286
|
def run(site: dict):
|