hestia-earth-models 0.74.10__py3-none-any.whl → 0.74.12__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/agribalyse2016/fuelElectricity.py +1 -2
- hestia_earth/models/agribalyse2016/machineryInfrastructureDepreciatedAmountPerCycle.py +1 -7
- hestia_earth/models/akagiEtAl2011/utils.py +2 -6
- hestia_earth/models/aware/scarcityWeightedWaterUse.py +1 -4
- hestia_earth/models/aware2_0/scarcityWeightedWaterUse.py +1 -4
- hestia_earth/models/chaudharyBrooks2018/damageToTerrestrialEcosystemsLandOccupation.py +1 -4
- hestia_earth/models/chaudharyBrooks2018/damageToTerrestrialEcosystemsLandTransformation.py +1 -4
- hestia_earth/models/chaudharyBrooks2018/damageToTerrestrialEcosystemsTotalLandUseEffects.py +1 -4
- hestia_earth/models/cml2001Baseline/abioticResourceDepletionFossilFuels.py +1 -4
- hestia_earth/models/cml2001Baseline/abioticResourceDepletionMineralsAndMetals.py +1 -4
- hestia_earth/models/cml2001Baseline/eutrophicationPotentialExcludingFate.py +1 -4
- hestia_earth/models/cml2001Baseline/resourceUseEnergyDepletionDuringCycle.py +12 -10
- hestia_earth/models/cml2001Baseline/resourceUseMineralsAndMetalsDuringCycle.py +5 -5
- hestia_earth/models/cml2001Baseline/terrestrialAcidificationPotentialIncludingFateAverageEurope.py +1 -7
- hestia_earth/models/cml2001NonBaseline/eutrophicationPotentialIncludingFateAverageEurope.py +1 -7
- hestia_earth/models/cml2001NonBaseline/terrestrialAcidificationPotentialExcludingFate.py +1 -7
- hestia_earth/models/config/ImpactAssessment.json +12 -6
- hestia_earth/models/config/Site.json +16 -0
- hestia_earth/models/cycle/aboveGroundCropResidueTotal.py +1 -6
- hestia_earth/models/cycle/practice/landCover.py +9 -9
- hestia_earth/models/dammgen2009/noxToAirExcreta.py +1 -2
- hestia_earth/models/deRuijterEtAl2010/nh3ToAirCropResidueDecomposition.py +1 -2
- hestia_earth/models/ecoalimV9/cycle.py +1 -2
- hestia_earth/models/ecoalimV9/impact_assessment.py +10 -3
- hestia_earth/models/ecoinventV3/cycle.py +1 -2
- hestia_earth/models/ecoinventV3AndEmberClimate/cycle.py +1 -2
- hestia_earth/models/edip2003/ozoneDepletionPotential.py +1 -7
- hestia_earth/models/emepEea2019/utils.py +1 -2
- hestia_earth/models/emissionNotRelevant/__init__.py +2 -2
- hestia_earth/models/environmentalFootprintV3_1/environmentalFootprintSingleOverallScore.py +1 -4
- hestia_earth/models/environmentalFootprintV3_1/freshwaterEcotoxicityPotentialCtue.py +1 -7
- hestia_earth/models/environmentalFootprintV3_1/marineEutrophicationPotential.py +1 -7
- hestia_earth/models/environmentalFootprintV3_1/photochemicalOzoneCreationPotentialHumanHealthNmvocEq.py +1 -7
- hestia_earth/models/environmentalFootprintV3_1/scarcityWeightedWaterUse.py +1 -7
- hestia_earth/models/environmentalFootprintV3_1/soilQualityIndexLandOccupation.py +2 -7
- hestia_earth/models/environmentalFootprintV3_1/soilQualityIndexLandTransformation.py +2 -7
- hestia_earth/models/environmentalFootprintV3_1/soilQualityIndexTotalLandUseEffects.py +2 -7
- hestia_earth/models/epa2014/no3ToGroundwaterExcreta.py +1 -2
- hestia_earth/models/fantkeEtAl2016/damageToHumanHealthParticulateMatterFormation.py +2 -11
- hestia_earth/models/faostat2018/liveweightPerHead.py +11 -7
- hestia_earth/models/faostat2018/product/price.py +9 -5
- hestia_earth/models/faostat2018/seed.py +5 -12
- hestia_earth/models/faostat2018/utils.py +14 -6
- hestia_earth/models/frischknechtEtAl2000/ionisingRadiationKbqU235Eq.py +4 -8
- hestia_earth/models/geospatialDatabase/altitude.py +1 -2
- hestia_earth/models/geospatialDatabase/clayContent.py +1 -2
- hestia_earth/models/geospatialDatabase/croppingIntensity.py +1 -3
- hestia_earth/models/geospatialDatabase/drainageClass.py +1 -2
- hestia_earth/models/geospatialDatabase/ecoClimateZone.py +1 -2
- hestia_earth/models/geospatialDatabase/erodibility.py +1 -2
- hestia_earth/models/geospatialDatabase/heavyWinterPrecipitation.py +1 -2
- hestia_earth/models/geospatialDatabase/histosol.py +1 -2
- hestia_earth/models/geospatialDatabase/longFallowRatio.py +1 -3
- hestia_earth/models/geospatialDatabase/nutrientLossToAquaticEnvironment.py +1 -2
- hestia_earth/models/geospatialDatabase/organicCarbonPerKgSoil.py +1 -2
- hestia_earth/models/geospatialDatabase/potentialEvapotranspirationAnnual.py +1 -2
- hestia_earth/models/geospatialDatabase/potentialEvapotranspirationLongTermAnnualMean.py +1 -2
- hestia_earth/models/geospatialDatabase/potentialEvapotranspirationMonthly.py +1 -2
- hestia_earth/models/geospatialDatabase/precipitationAnnual.py +1 -2
- hestia_earth/models/geospatialDatabase/precipitationLongTermAnnualMean.py +1 -2
- hestia_earth/models/geospatialDatabase/precipitationMonthly.py +1 -2
- hestia_earth/models/geospatialDatabase/sandContent.py +1 -2
- hestia_earth/models/geospatialDatabase/siltContent.py +1 -2
- hestia_earth/models/geospatialDatabase/slope.py +1 -2
- hestia_earth/models/geospatialDatabase/slopeLength.py +1 -2
- hestia_earth/models/geospatialDatabase/soilPh.py +1 -2
- hestia_earth/models/geospatialDatabase/temperatureAnnual.py +1 -2
- hestia_earth/models/geospatialDatabase/temperatureLongTermAnnualMean.py +1 -2
- hestia_earth/models/geospatialDatabase/temperatureMonthly.py +1 -2
- hestia_earth/models/geospatialDatabase/totalNitrogenPerKgSoil.py +1 -2
- hestia_earth/models/geospatialDatabase/totalPhosphorusPerKgSoil.py +1 -2
- hestia_earth/models/geospatialDatabase/waterDepth.py +1 -2
- hestia_earth/models/hestia/aboveGroundCropResidue.py +1 -2
- hestia_earth/models/hestia/aboveGroundCropResidueTotal.py +1 -6
- hestia_earth/models/hestia/brackishWater.py +1 -2
- hestia_earth/models/hestia/cationExchangeCapacityPerKgSoil.py +1 -2
- hestia_earth/models/hestia/cropResidueManagement.py +1 -2
- hestia_earth/models/hestia/croppingIntensity.py +1 -7
- hestia_earth/models/hestia/default_emissions.py +3 -5
- hestia_earth/models/hestia/default_resourceUse.py +4 -11
- hestia_earth/models/hestia/excretaKgMass.py +9 -6
- hestia_earth/models/hestia/excretaKgN.py +8 -7
- hestia_earth/models/hestia/excretaKgVs.py +8 -7
- hestia_earth/models/hestia/feedConversionRatio/__init__.py +5 -7
- hestia_earth/models/hestia/flowingWater.py +1 -2
- hestia_earth/models/hestia/freshWater.py +1 -2
- hestia_earth/models/hestia/histosol.py +1 -2
- hestia_earth/models/hestia/inorganicFertiliser.py +2 -14
- hestia_earth/models/hestia/irrigatedTypeUnspecified.py +1 -7
- hestia_earth/models/hestia/landCover.py +192 -911
- hestia_earth/models/hestia/landCover_utils.py +769 -0
- hestia_earth/models/hestia/landOccupationDuringCycle.py +1 -2
- hestia_earth/models/hestia/liveAnimal.py +1 -3
- hestia_earth/models/hestia/longFallowRatio.py +1 -7
- hestia_earth/models/hestia/management.py +14 -8
- hestia_earth/models/hestia/materialAndSubstrate.py +1 -2
- hestia_earth/models/hestia/milkYield.py +2 -12
- hestia_earth/models/hestia/netPrimaryProduction.py +1 -2
- hestia_earth/models/hestia/organicCarbonPerHa.py +1 -2
- hestia_earth/models/hestia/pToSurfaceWaterAquacultureSystems.py +2 -4
- hestia_earth/models/hestia/pastureGrass.py +3 -4
- hestia_earth/models/hestia/pastureSystem.py +1 -7
- hestia_earth/models/hestia/potentialEvapotranspirationAnnual.py +1 -2
- hestia_earth/models/hestia/potentialEvapotranspirationMonthly.py +1 -2
- hestia_earth/models/hestia/precipitationAnnual.py +1 -2
- hestia_earth/models/hestia/precipitationMonthly.py +1 -2
- hestia_earth/models/hestia/rainfallAnnual.py +1 -2
- hestia_earth/models/hestia/rainfallMonthly.py +1 -2
- hestia_earth/models/hestia/residueBurnt.py +1 -7
- hestia_earth/models/hestia/residueIncorporated.py +1 -7
- hestia_earth/models/hestia/residueLeftOnField.py +1 -7
- hestia_earth/models/hestia/residueRemoved.py +3 -8
- hestia_earth/models/hestia/resourceUse_utils.py +4 -20
- hestia_earth/models/hestia/salineWater.py +1 -2
- hestia_earth/models/hestia/seed_emissions.py +5 -6
- hestia_earth/models/hestia/slope.py +44 -0
- hestia_earth/models/hestia/slopeLength.py +44 -0
- hestia_earth/models/hestia/soilMeasurement.py +1 -2
- hestia_earth/models/hestia/stockingDensityAnimalHousingAverage.py +1 -7
- hestia_earth/models/hestia/temperatureAnnual.py +1 -2
- hestia_earth/models/hestia/temperatureMonthly.py +1 -2
- hestia_earth/models/hestia/totalNitrogenPerKgSoil.py +1 -2
- hestia_earth/models/hestia/unknownPreSeasonWaterRegime.py +1 -7
- hestia_earth/models/hestia/utils.py +5 -5
- hestia_earth/models/hestia/waterDepth.py +1 -2
- hestia_earth/models/hestia/waterSalinity.py +1 -2
- hestia_earth/models/impact_assessment/emissions.py +8 -9
- hestia_earth/models/impact_assessment/post_checks/cycle.py +1 -1
- hestia_earth/models/impact_assessment/pre_checks/cycle.py +1 -1
- hestia_earth/models/ipcc2006/aboveGroundCropResidueRemoved.py +1 -3
- hestia_earth/models/ipcc2006/aboveGroundCropResidueTotal.py +1 -3
- hestia_earth/models/ipcc2006/belowGroundCropResidue.py +1 -3
- hestia_earth/models/ipcc2006/n2OToAirCropResidueDecompositionDirect.py +2 -6
- hestia_earth/models/ipcc2006/n2OToAirCropResidueDecompositionIndirect.py +1 -2
- hestia_earth/models/ipcc2006/n2OToAirExcretaDirect.py +1 -2
- hestia_earth/models/ipcc2006/n2OToAirExcretaIndirect.py +1 -2
- hestia_earth/models/ipcc2006/n2OToAirInorganicFertiliserDirect.py +1 -2
- hestia_earth/models/ipcc2006/n2OToAirInorganicFertiliserIndirect.py +1 -2
- hestia_earth/models/ipcc2006/n2OToAirOrganicFertiliserDirect.py +1 -2
- hestia_earth/models/ipcc2006/n2OToAirOrganicFertiliserIndirect.py +1 -2
- hestia_earth/models/ipcc2013ExcludingFeedbacks/gwp100.py +1 -7
- hestia_earth/models/ipcc2013IncludingFeedbacks/gwp100.py +1 -7
- hestia_earth/models/ipcc2019/aboveGroundBiomass.py +1 -1
- hestia_earth/models/ipcc2019/aboveGroundCropResidueTotal.py +1 -3
- hestia_earth/models/ipcc2019/animal/milkYieldPerAnimal.py +3 -7
- hestia_earth/models/ipcc2019/animal/pastureGrass.py +1 -2
- hestia_earth/models/ipcc2019/belowGroundBiomass.py +1 -1
- hestia_earth/models/ipcc2019/belowGroundCropResidue.py +1 -3
- hestia_earth/models/ipcc2019/biocharOrganicCarbonPerHa.py +1 -1
- hestia_earth/models/ipcc2019/ch4ToAirAquacultureSystems.py +2 -6
- hestia_earth/models/ipcc2019/ch4ToAirEntericFermentation.py +2 -12
- hestia_earth/models/ipcc2019/ch4ToAirExcreta.py +1 -2
- hestia_earth/models/ipcc2019/ch4ToAirFloodedRice.py +2 -10
- hestia_earth/models/ipcc2019/ch4ToAirOrganicSoilCultivation.py +1 -1
- hestia_earth/models/ipcc2019/co2ToAirAboveGroundBiomassStockChange.py +1 -1
- hestia_earth/models/ipcc2019/co2ToAirBelowGroundBiomassStockChange.py +1 -1
- hestia_earth/models/ipcc2019/co2ToAirBiocharStockChange.py +1 -1
- hestia_earth/models/ipcc2019/co2ToAirLimeHydrolysis.py +1 -2
- hestia_earth/models/ipcc2019/co2ToAirOrganicSoilCultivation.py +1 -1
- hestia_earth/models/ipcc2019/co2ToAirSoilOrganicCarbonStockChange.py +1 -1
- hestia_earth/models/ipcc2019/co2ToAirUreaHydrolysis.py +1 -2
- hestia_earth/models/ipcc2019/croppingDuration.py +1 -2
- hestia_earth/models/ipcc2019/n2OToAirCropResidueBurningDirect.py +1 -2
- hestia_earth/models/ipcc2019/n2OToAirCropResidueDecompositionDirect.py +2 -7
- hestia_earth/models/ipcc2019/n2OToAirExcretaDirect.py +1 -2
- hestia_earth/models/ipcc2019/n2OToAirInorganicFertiliserDirect.py +2 -7
- hestia_earth/models/ipcc2019/n2OToAirOrganicFertiliserDirect.py +2 -7
- hestia_earth/models/ipcc2019/n2OToAirOrganicSoilCultivationDirect.py +2 -7
- hestia_earth/models/ipcc2019/n2OToAir_indirect_emissions_utils.py +3 -9
- hestia_earth/models/ipcc2019/nh3ToAirInorganicFertiliser.py +2 -6
- hestia_earth/models/ipcc2019/nh3ToAirOrganicFertiliser.py +2 -6
- hestia_earth/models/ipcc2019/no3ToGroundwaterCropResidueDecomposition.py +2 -7
- hestia_earth/models/ipcc2019/no3ToGroundwaterExcreta.py +2 -8
- hestia_earth/models/ipcc2019/no3ToGroundwaterInorganicFertiliser.py +2 -7
- hestia_earth/models/ipcc2019/no3ToGroundwaterOrganicFertiliser.py +2 -7
- hestia_earth/models/ipcc2019/nonCo2EmissionsToAirNaturalVegetationBurning.py +1 -1
- hestia_earth/models/ipcc2019/noxToAirInorganicFertiliser.py +2 -6
- hestia_earth/models/ipcc2019/noxToAirOrganicFertiliser.py +2 -6
- hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_1.py +1 -1
- hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_2.py +1 -1
- hestia_earth/models/ipcc2019/pastureGrass.py +1 -2
- hestia_earth/models/ipcc2021/gwp100.py +2 -11
- hestia_earth/models/jarvisAndPain1994/n2ToAirExcreta.py +1 -2
- hestia_earth/models/koble2014/utils.py +1 -3
- hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsClimateChange.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsWaterStress.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealth.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthClimateChange.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthHumanToxicityCancerogenic.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthParticulateMatterFormation.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthPhotochemicalOzoneFormation.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthStratosphericOzoneDepletion.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthWaterStress.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToMarineEcosystemsMarineEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToMarineEcosystemsMarineEutrophication.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToMarineEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsClimateChange.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsTerrestrialAcidification.py +1 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsClimateChange.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsWaterStress.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealth.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthClimateChange.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthHumanToxicityCancerogenic.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthParticulateMatterFormation.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthPhotochemicalOzoneFormation.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthStratosphericOzoneDepletion.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthWaterStress.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToMarineEcosystemsMarineEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToMarineEcosystemsMarineEutrophication.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToMarineEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsClimateChange.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialAcidification.py +1 -7
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsWaterStress.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealth.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthClimateChange.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthHumanToxicityCancerogenic.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthParticulateMatterFormation.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthPhotochemicalOzoneFormation.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthStratosphericOzoneDepletion.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthWaterStress.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToMarineEcosystemsMarineEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToMarineEcosystemsMarineEutrophication.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToMarineEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsClimateChange.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsTerrestrialAcidification.py +1 -7
- hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsWaterStress.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealth.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthClimateChange.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthHumanToxicityCancerogenic.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthParticulateMatterFormation.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthPhotochemicalOzoneFormation.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthStratosphericOzoneDepletion.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthWaterStress.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToMarineEcosystemsMarineEcotoxicity.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToMarineEcosystemsMarineEutrophication.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToMarineEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsClimateChange.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsPdfYear.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialAcidification.py +1 -7
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -7
- hestia_earth/models/linkedImpactAssessment/emissions.py +4 -6
- hestia_earth/models/linkedImpactAssessment/utils.py +4 -6
- hestia_earth/models/mocking/search-results.json +1 -1
- hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py +1 -3
- hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py +1 -3
- hestia_earth/models/pooreNemecek2018/ch4ToAirAquacultureSystems.py +1 -2
- hestia_earth/models/pooreNemecek2018/excretaKgN.py +3 -4
- hestia_earth/models/pooreNemecek2018/excretaKgVs.py +4 -4
- hestia_earth/models/pooreNemecek2018/freshwaterWithdrawalsDuringCycle.py +3 -9
- hestia_earth/models/pooreNemecek2018/landOccupationDuringCycle.py +3 -7
- hestia_earth/models/pooreNemecek2018/longFallowDuration.py +1 -7
- hestia_earth/models/pooreNemecek2018/n2OToAirAquacultureSystemsDirect.py +1 -2
- hestia_earth/models/pooreNemecek2018/n2ToAirAquacultureSystems.py +1 -2
- hestia_earth/models/pooreNemecek2018/nh3ToAirAquacultureSystems.py +1 -2
- hestia_earth/models/pooreNemecek2018/no3ToGroundwaterCropResidueDecomposition.py +1 -2
- hestia_earth/models/pooreNemecek2018/no3ToGroundwaterExcreta.py +1 -2
- hestia_earth/models/pooreNemecek2018/no3ToGroundwaterInorganicFertiliser.py +1 -2
- hestia_earth/models/pooreNemecek2018/no3ToGroundwaterOrganicFertiliser.py +1 -2
- hestia_earth/models/pooreNemecek2018/no3ToGroundwaterSoilFlux_utils.py +1 -2
- hestia_earth/models/pooreNemecek2018/noxToAirAquacultureSystems.py +1 -2
- hestia_earth/models/pooreNemecek2018/nurseryDensity.py +1 -7
- hestia_earth/models/pooreNemecek2018/nurseryDuration.py +1 -7
- hestia_earth/models/pooreNemecek2018/plantationDensity.py +1 -7
- hestia_earth/models/pooreNemecek2018/plantationLifespan.py +1 -7
- hestia_earth/models/pooreNemecek2018/plantationProductiveLifespan.py +1 -7
- hestia_earth/models/pooreNemecek2018/rotationDuration.py +1 -7
- hestia_earth/models/pooreNemecek2018/saplingsDepreciatedAmountPerCycle.py +1 -7
- hestia_earth/models/poschEtAl2008/terrestrialAcidificationPotentialAccumulatedExceedance.py +1 -7
- hestia_earth/models/poschEtAl2008/terrestrialEutrophicationPotentialAccumulatedExceedance.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/damageToFreshwaterEcosystemsSpeciesYear.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/damageToHumanHealth.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/damageToMarineEcosystemsSpeciesYear.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/damageToResourceAvailability.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/damageToTerrestrialEcosystemsSpeciesYear.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/ecosystemDamageOzoneFormation.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/fossilResourceScarcity.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/freshwaterAquaticEcotoxicityPotential14Dcbeq.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/freshwaterEutrophicationPotential.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/humanCarcinogenicToxicity.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/humanDamageOzoneFormation.py +2 -10
- hestia_earth/models/recipe2016Egalitarian/humanNonCarcinogenicToxicity.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/marineAquaticEcotoxicityPotential14Dcbeq.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/marineEutrophicationPotential.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/ozoneDepletionPotential.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/terrestrialAcidificationPotential.py +1 -7
- hestia_earth/models/recipe2016Egalitarian/terrestrialEcotoxicityPotential14Dcbeq.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/damageToFreshwaterEcosystemsSpeciesYear.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/damageToHumanHealth.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/damageToMarineEcosystemsSpeciesYear.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/damageToResourceAvailability.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/damageToTerrestrialEcosystemsSpeciesYear.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/ecosystemDamageOzoneFormation.py +2 -10
- hestia_earth/models/recipe2016Hierarchist/fossilResourceScarcity.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/freshwaterAquaticEcotoxicityPotential14Dcbeq.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/freshwaterEutrophicationPotential.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/humanCarcinogenicToxicity.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/humanDamageOzoneFormation.py +2 -10
- hestia_earth/models/recipe2016Hierarchist/humanNonCarcinogenicToxicity.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/marineAquaticEcotoxicityPotential14Dcbeq.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/marineEutrophicationPotential.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/ozoneDepletionPotential.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/terrestrialAcidificationPotential.py +1 -7
- hestia_earth/models/recipe2016Hierarchist/terrestrialEcotoxicityPotential14Dcbeq.py +1 -7
- hestia_earth/models/recipe2016Individualist/damageToFreshwaterEcosystemsSpeciesYear.py +1 -7
- hestia_earth/models/recipe2016Individualist/damageToHumanHealth.py +1 -7
- hestia_earth/models/recipe2016Individualist/damageToMarineEcosystemsSpeciesYear.py +1 -7
- hestia_earth/models/recipe2016Individualist/damageToResourceAvailability.py +1 -7
- hestia_earth/models/recipe2016Individualist/damageToTerrestrialEcosystemsSpeciesYear.py +1 -7
- hestia_earth/models/recipe2016Individualist/ecosystemDamageOzoneFormation.py +2 -10
- hestia_earth/models/recipe2016Individualist/fossilResourceScarcity.py +1 -7
- hestia_earth/models/recipe2016Individualist/freshwaterAquaticEcotoxicityPotential14Dcbeq.py +1 -7
- hestia_earth/models/recipe2016Individualist/freshwaterEutrophicationPotential.py +1 -7
- hestia_earth/models/recipe2016Individualist/humanCarcinogenicToxicity.py +1 -7
- hestia_earth/models/recipe2016Individualist/humanDamageOzoneFormation.py +2 -10
- hestia_earth/models/recipe2016Individualist/humanNonCarcinogenicToxicity.py +1 -7
- hestia_earth/models/recipe2016Individualist/marineAquaticEcotoxicityPotential14Dcbeq.py +1 -7
- hestia_earth/models/recipe2016Individualist/marineEutrophicationPotential.py +1 -7
- hestia_earth/models/recipe2016Individualist/ozoneDepletionPotential.py +1 -7
- hestia_earth/models/recipe2016Individualist/terrestrialAcidificationPotential.py +1 -7
- hestia_earth/models/recipe2016Individualist/terrestrialEcotoxicityPotential14Dcbeq.py +1 -7
- hestia_earth/models/resourceUseNotRelevant/__init__.py +2 -8
- hestia_earth/models/schererPfister2015/nErosionSoilFlux.py +1 -2
- hestia_earth/models/schererPfister2015/pErosionSoilFlux.py +1 -2
- hestia_earth/models/schererPfister2015/pToDrainageWaterSoilFlux.py +1 -2
- hestia_earth/models/schererPfister2015/pToGroundwaterSoilFlux.py +1 -2
- hestia_earth/models/schererPfister2015/pToSurfaceWaterSoilFlux.py +1 -2
- hestia_earth/models/schmidt2007/ch4ToAirWasteTreatment.py +1 -2
- hestia_earth/models/schmidt2007/h2SToAirWasteTreatment.py +1 -2
- hestia_earth/models/schmidt2007/n2OToAirWasteTreatmentDirect.py +1 -2
- hestia_earth/models/schmidt2007/nh3ToAirWasteTreatment.py +1 -2
- hestia_earth/models/site/grouped_measurement.py +2 -3
- hestia_earth/models/stehfestBouwman2006/n2OToAirCropResidueDecompositionDirect.py +1 -2
- hestia_earth/models/stehfestBouwman2006/n2OToAirExcretaDirect.py +1 -2
- hestia_earth/models/stehfestBouwman2006/n2OToAirInorganicFertiliserDirect.py +1 -2
- hestia_earth/models/stehfestBouwman2006/n2OToAirOrganicFertiliserDirect.py +1 -2
- hestia_earth/models/stehfestBouwman2006/n2OToAirSoilFlux_utils.py +1 -2
- hestia_earth/models/stehfestBouwman2006/noxToAirCropResidueDecomposition.py +1 -2
- hestia_earth/models/stehfestBouwman2006/noxToAirExcreta.py +1 -2
- hestia_earth/models/stehfestBouwman2006/noxToAirInorganicFertiliser.py +1 -2
- hestia_earth/models/stehfestBouwman2006/noxToAirOrganicFertiliser.py +1 -2
- hestia_earth/models/stehfestBouwman2006/noxToAirSoilFlux_utils.py +1 -2
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirCropResidueDecomposition.py +1 -2
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirExcreta.py +1 -2
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirInorganicFertiliser.py +1 -2
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirOrganicFertiliser.py +1 -2
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirSoilFlux_utils.py +1 -2
- hestia_earth/models/transformation/input/excreta.py +7 -5
- hestia_earth/models/transformation/product/excreta.py +4 -4
- hestia_earth/models/usetoxV2/freshwaterEcotoxicityPotentialCtue.py +1 -7
- hestia_earth/models/utils/__init__.py +26 -7
- hestia_earth/models/utils/background_emissions.py +3 -3
- hestia_earth/models/utils/blank_node.py +31 -12
- hestia_earth/models/utils/emission.py +24 -10
- hestia_earth/models/utils/indicator.py +28 -13
- hestia_earth/models/utils/input.py +22 -5
- hestia_earth/models/utils/management.py +18 -4
- hestia_earth/models/utils/measurement.py +14 -6
- hestia_earth/models/utils/practice.py +24 -4
- hestia_earth/models/utils/product.py +32 -14
- hestia_earth/models/version.py +1 -1
- hestia_earth/models/webbEtAl2012AndSintermannEtAl2012/nh3ToAirOrganicFertiliser.py +1 -2
- hestia_earth/orchestrator/models/__init__.py +22 -11
- {hestia_earth_models-0.74.10.dist-info → hestia_earth_models-0.74.12.dist-info}/METADATA +2 -2
- {hestia_earth_models-0.74.10.dist-info → hestia_earth_models-0.74.12.dist-info}/RECORD +410 -404
- tests/models/cml2001Baseline/test_abioticResourceDepletionFossilFuels.py +4 -9
- tests/models/cml2001Baseline/test_abioticResourceDepletionMineralsAndMetals.py +4 -9
- tests/models/environmentalFootprintV3_1/test_environmentalFootprintSingleOverallScore.py +4 -9
- tests/models/environmentalFootprintV3_1/test_marineEutrophicationPotential.py +1 -7
- tests/models/environmentalFootprintV3_1/test_scarcityWeightedWaterUse.py +2 -8
- tests/models/environmentalFootprintV3_1/test_soilQualityIndexLandTransformation.py +3 -13
- tests/models/hestia/test_default_emissions.py +2 -2
- tests/models/hestia/test_default_resourceUse.py +3 -3
- tests/models/hestia/test_landCover.py +42 -295
- tests/models/hestia/test_landCover_utils.py +233 -0
- tests/models/hestia/test_slope.py +23 -0
- tests/models/hestia/test_slopeLength.py +23 -0
- tests/models/ipcc2019/test_no3ToGroundwaterExcreta.py +1 -0
- tests/models/poschEtAl2008/test_terrestrialAcidificationPotentialAccumulatedExceedance.py +4 -9
- tests/models/poschEtAl2008/test_terrestrialEutrophicationPotentialAccumulatedExceedance.py +4 -9
- tests/models/utils/test_indicator.py +6 -4
- tests/models/utils/test_measurement.py +7 -5
- {hestia_earth_models-0.74.10.dist-info → hestia_earth_models-0.74.12.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.74.10.dist-info → hestia_earth_models-0.74.12.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.74.10.dist-info → hestia_earth_models-0.74.12.dist-info}/top_level.txt +0 -0
|
@@ -30,8 +30,7 @@ BIBLIO_TITLE = 'Contribution of Organic Matter and Clay to Soil Cation-Exchange
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def _measurement(site: dict, value: float, depthUpper: int = None, depthLower: int = None):
|
|
33
|
-
data = _new_measurement(TERM_ID, MODEL)
|
|
34
|
-
data['value'] = [value]
|
|
33
|
+
data = _new_measurement(term=TERM_ID, model=MODEL, value=value)
|
|
35
34
|
if depthUpper is not None:
|
|
36
35
|
data['depthUpper'] = depthUpper
|
|
37
36
|
if depthLower is not None:
|
|
@@ -23,15 +23,9 @@ LOOKUPS = {
|
|
|
23
23
|
TERM_ID = 'croppingIntensity'
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
def _practice(value: float):
|
|
27
|
-
practice = _new_practice(TERM_ID, MODEL)
|
|
28
|
-
practice['value'] = [round(value, 7)]
|
|
29
|
-
return practice
|
|
30
|
-
|
|
31
|
-
|
|
32
26
|
def _run(cycle: dict):
|
|
33
27
|
cycleDuration = cycle.get('cycleDuration')
|
|
34
|
-
return [
|
|
28
|
+
return [_new_practice(term=TERM_ID, model=MODEL, value=cycleDuration / 365)]
|
|
35
29
|
|
|
36
30
|
|
|
37
31
|
def _should_run(cycle: dict):
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
from hestia_earth.schema import EmissionMethodTier
|
|
2
|
-
from hestia_earth.utils.tools import flatten, safe_parse_float
|
|
2
|
+
from hestia_earth.utils.tools import flatten, safe_parse_float, omit
|
|
3
3
|
|
|
4
4
|
from hestia_earth.models.log import logRequirements, logShouldRun, debugValues
|
|
5
|
-
from hestia_earth.models.utils import _omit
|
|
6
5
|
from hestia_earth.models.utils.emission import _new_emission, background_emissions_in_system_boundary
|
|
7
6
|
from hestia_earth.models.utils.background_emissions import no_gap_filled_background_emissions
|
|
8
7
|
from hestia_earth.models.utils.term import get_lookup_value
|
|
@@ -38,8 +37,7 @@ TIER = EmissionMethodTier.BACKGROUND.value
|
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
def _emission(term_id: str, value: float, input: dict):
|
|
41
|
-
emission = _new_emission(term_id, MODEL)
|
|
42
|
-
emission['value'] = [value]
|
|
40
|
+
emission = _new_emission(term=term_id, model=MODEL, value=value)
|
|
43
41
|
emission['inputs'] = [input]
|
|
44
42
|
emission['methodTier'] = TIER
|
|
45
43
|
return emission
|
|
@@ -95,7 +93,7 @@ def _should_run(cycle: dict):
|
|
|
95
93
|
term_id = input.get('input').get('term', {}).get('@id')
|
|
96
94
|
|
|
97
95
|
logRequirements(cycle, model=MODEL, term=term_id, model_key=MODEL_KEY,
|
|
98
|
-
**
|
|
96
|
+
**omit(input, ['input', 'input-value']))
|
|
99
97
|
logShouldRun(cycle, MODEL, term_id, should_run, methodTier=TIER, model_key=MODEL_KEY)
|
|
100
98
|
|
|
101
99
|
return should_run, valid_inputs
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
from hestia_earth.schema import TermTermType
|
|
2
|
-
from hestia_earth.utils.tools import flatten, safe_parse_float
|
|
2
|
+
from hestia_earth.utils.tools import flatten, safe_parse_float, omit
|
|
3
3
|
|
|
4
4
|
from hestia_earth.models.log import logRequirements, logShouldRun, debugValues
|
|
5
|
-
from hestia_earth.models.utils import _omit
|
|
6
5
|
from hestia_earth.models.utils.emission import background_emissions_in_system_boundary
|
|
7
6
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
8
7
|
from hestia_earth.models.utils.background_emissions import no_gap_filled_background_emissions
|
|
@@ -41,13 +40,6 @@ LOOKUPS = {
|
|
|
41
40
|
MODEL_KEY = 'default_resourceUse'
|
|
42
41
|
|
|
43
42
|
|
|
44
|
-
def _indicator(term_id: str, value: float, input: dict, land_cover_id: str):
|
|
45
|
-
indicator = _new_indicator(term_id, MODEL, land_cover_id)
|
|
46
|
-
indicator['value'] = value
|
|
47
|
-
indicator['inputs'] = [input]
|
|
48
|
-
return indicator
|
|
49
|
-
|
|
50
|
-
|
|
51
43
|
def _default_value(input: dict):
|
|
52
44
|
return safe_parse_float(get_lookup_value(input.get('term', {}), LOOKUPS['organicFertiliser']), default=None)
|
|
53
45
|
|
|
@@ -72,7 +64,8 @@ def _run_input(impact: dict, land_cover_id: str):
|
|
|
72
64
|
input=term_id)
|
|
73
65
|
|
|
74
66
|
return [
|
|
75
|
-
|
|
67
|
+
_new_indicator(term=term_id, model=MODEL, value=value, land_cover_id=land_cover_id, inputs=[input_term])
|
|
68
|
+
for term_id in required_resourceUse_term_ids
|
|
76
69
|
]
|
|
77
70
|
|
|
78
71
|
return run
|
|
@@ -106,7 +99,7 @@ def _should_run(impact: dict):
|
|
|
106
99
|
term_id = input.get('input').get('term', {}).get('@id')
|
|
107
100
|
|
|
108
101
|
logRequirements(impact, model=MODEL, term=term_id, model_key=MODEL_KEY,
|
|
109
|
-
**
|
|
102
|
+
**omit(input, ['input', 'input-value']),
|
|
110
103
|
landCover_term_id=landCover_term_id)
|
|
111
104
|
logShouldRun(impact, MODEL, term_id, should_run, model_key=MODEL_KEY)
|
|
112
105
|
|
|
@@ -36,17 +36,20 @@ UNITS = [
|
|
|
36
36
|
]
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
def _product(term_id: str, value: float = None):
|
|
40
|
-
product = _new_product(term_id, value, MODEL)
|
|
41
|
-
return product
|
|
39
|
+
def _product(term_id: str, value: float = None): return _new_product(term=term_id, model=MODEL, value=value)
|
|
42
40
|
|
|
43
41
|
|
|
44
42
|
def _convert_by_product(cycle: dict, product: dict, term_id: str):
|
|
45
43
|
existing_product = find_term_match(cycle.get('products', []), term_id)
|
|
46
44
|
existing_product_value = list_sum(existing_product.get('value', []), default=None)
|
|
47
45
|
|
|
48
|
-
conversion_to_kg_ratio =
|
|
49
|
-
|
|
46
|
+
conversion_to_kg_ratio = (
|
|
47
|
+
convert_product_to_unit(
|
|
48
|
+
product=product,
|
|
49
|
+
dest_unit=existing_product.get('term', {}).get('units'),
|
|
50
|
+
log_node=cycle, model=MODEL, term=term_id, model_key=MODEL_KEY
|
|
51
|
+
) if existing_product else None
|
|
52
|
+
)
|
|
50
53
|
value = existing_product_value / conversion_to_kg_ratio if all([
|
|
51
54
|
existing_product_value is not None,
|
|
52
55
|
conversion_to_kg_ratio
|
|
@@ -55,7 +58,7 @@ def _convert_by_product(cycle: dict, product: dict, term_id: str):
|
|
|
55
58
|
debugValues(cycle, model=MODEL, term=term_id, model_key=MODEL_KEY,
|
|
56
59
|
using_excreta_product=existing_product.get('term', {}).get('@id'),
|
|
57
60
|
conversion_to_kg_ratio=conversion_to_kg_ratio,
|
|
58
|
-
|
|
61
|
+
convert_value=existing_product_value)
|
|
59
62
|
|
|
60
63
|
return value
|
|
61
64
|
|
|
@@ -29,23 +29,24 @@ RETURNS = {
|
|
|
29
29
|
MODEL_KEY = 'excretaKgN'
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
def _product(value: float
|
|
33
|
-
product = _new_product(term_id, value, MODEL)
|
|
34
|
-
return product
|
|
32
|
+
def _product(term_id: str, value: float = None): return _new_product(term=term_id, model=MODEL, value=value)
|
|
35
33
|
|
|
36
34
|
|
|
37
35
|
def _run_product(cycle: dict, term_id: str):
|
|
38
36
|
existing_kg_product = find_term_match(cycle.get('products', []), get_kg_term_id(term_id))
|
|
39
|
-
value = convert_product_to_unit(
|
|
37
|
+
value = convert_product_to_unit(
|
|
38
|
+
product=existing_kg_product,
|
|
39
|
+
dest_unit=Units.KG_N,
|
|
40
|
+
log_node=cycle, model=MODEL, term=term_id, model_key=MODEL_KEY
|
|
41
|
+
)
|
|
40
42
|
|
|
41
43
|
debugValues(cycle, model=MODEL, term=term_id, model_key=MODEL_KEY,
|
|
42
|
-
using_excreta_product=existing_kg_product.get('term', {}).get('@id')
|
|
43
|
-
value=value)
|
|
44
|
+
using_excreta_product=existing_kg_product.get('term', {}).get('@id'))
|
|
44
45
|
|
|
45
46
|
# use existing product if exist, else create new one
|
|
46
47
|
existing_product = find_term_match(cycle.get('products', []), term_id)
|
|
47
48
|
|
|
48
|
-
return (existing_product | _product(
|
|
49
|
+
return (existing_product | _product(term_id, value)) if value else None
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
def _should_run(cycle: dict):
|
|
@@ -29,23 +29,24 @@ RETURNS = {
|
|
|
29
29
|
MODEL_KEY = 'excretaKgVs'
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
def _product(value: float
|
|
33
|
-
product = _new_product(term_id, value, MODEL)
|
|
34
|
-
return product
|
|
32
|
+
def _product(term_id: str, value: float = None): return _new_product(term=term_id, model=MODEL, value=value)
|
|
35
33
|
|
|
36
34
|
|
|
37
35
|
def _run_product(cycle: dict, term_id: str):
|
|
38
36
|
existing_kg_product = find_term_match(cycle.get('products', []), get_kg_term_id(term_id))
|
|
39
|
-
value = convert_product_to_unit(
|
|
37
|
+
value = convert_product_to_unit(
|
|
38
|
+
product=existing_kg_product,
|
|
39
|
+
dest_unit=Units.KG_VS,
|
|
40
|
+
log_node=cycle, model=MODEL, term=term_id, model_key=MODEL_KEY
|
|
41
|
+
)
|
|
40
42
|
|
|
41
43
|
debugValues(cycle, model=MODEL, term=term_id, model_key=MODEL_KEY,
|
|
42
|
-
using_excreta_product=existing_kg_product.get('term', {}).get('@id')
|
|
43
|
-
value=value)
|
|
44
|
+
using_excreta_product=existing_kg_product.get('term', {}).get('@id'))
|
|
44
45
|
|
|
45
46
|
# use existing product if exist, else create new one
|
|
46
47
|
existing_product = find_term_match(cycle.get('products', []), term_id)
|
|
47
48
|
|
|
48
|
-
return (existing_product | _product(
|
|
49
|
+
return (existing_product | _product(term_id, value)) if value else None
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
def _should_run(cycle: dict):
|
|
@@ -23,12 +23,6 @@ MODELS = [
|
|
|
23
23
|
]
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
def _practice(term_id: str, value: float):
|
|
27
|
-
practice = _new_practice(term_id, MODEL)
|
|
28
|
-
practice['value'] = [value]
|
|
29
|
-
return practice
|
|
30
|
-
|
|
31
|
-
|
|
32
26
|
def _has_no_practice(term_id: str, cycle: dict):
|
|
33
27
|
return find_term_match(cycle.get('practices', []), term_id, None) is None
|
|
34
28
|
|
|
@@ -36,7 +30,11 @@ def _has_no_practice(term_id: str, cycle: dict):
|
|
|
36
30
|
def _run_model(cycle: dict, kg_liveweight: float, feed: float):
|
|
37
31
|
def exec(model: dict):
|
|
38
32
|
should_run = _has_no_practice(model.TERM_ID, cycle)
|
|
39
|
-
return
|
|
33
|
+
return _new_practice(
|
|
34
|
+
term=model.TERM_ID,
|
|
35
|
+
model=MODEL,
|
|
36
|
+
value=model.run(cycle, feed) / kg_liveweight
|
|
37
|
+
) if should_run else None
|
|
40
38
|
return exec
|
|
41
39
|
|
|
42
40
|
|
|
@@ -25,8 +25,7 @@ SITE_TYPE_TO_TERM_ID = {
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def _measurement(site: dict, term_id: str):
|
|
28
|
-
data = _new_measurement(term_id, MODEL)
|
|
29
|
-
data['value'] = [True]
|
|
28
|
+
data = _new_measurement(term=term_id, model=MODEL, value=True)
|
|
30
29
|
data['methodClassification'] = MeasurementMethodClassification.MODELLED_USING_OTHER_MEASUREMENTS.value
|
|
31
30
|
return data | get_source(site, BIBLIO_TITLE)
|
|
32
31
|
|
|
@@ -22,8 +22,7 @@ TERM_ID = 'freshWater'
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def _measurement():
|
|
25
|
-
data = _new_measurement(TERM_ID, MODEL)
|
|
26
|
-
data['value'] = [True]
|
|
25
|
+
data = _new_measurement(term=TERM_ID, model=MODEL, value=True)
|
|
27
26
|
data['methodClassification'] = MeasurementMethodClassification.MODELLED_USING_OTHER_MEASUREMENTS.value
|
|
28
27
|
return data
|
|
29
28
|
|
|
@@ -30,8 +30,7 @@ TERM_ID = 'histosol'
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def _measurement():
|
|
33
|
-
measurement = _new_measurement(TERM_ID)
|
|
34
|
-
measurement['value'] = [0]
|
|
33
|
+
measurement = _new_measurement(term=TERM_ID, value=0)
|
|
35
34
|
measurement['depthUpper'] = 0
|
|
36
35
|
measurement['depthLower'] = 30
|
|
37
36
|
measurement['methodClassification'] = MeasurementMethodClassification.MODELLED_USING_OTHER_MEASUREMENTS.value
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from hestia_earth.schema import
|
|
1
|
+
from hestia_earth.schema import TermTermType
|
|
2
2
|
from hestia_earth.utils.model import filter_list_term_type, find_term_match
|
|
3
3
|
from hestia_earth.utils.tools import flatten, non_empty_list, safe_parse_float, list_sum
|
|
4
4
|
|
|
@@ -69,18 +69,6 @@ VALUE_BY_UNIT = {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
def _input(term_id: str, value: float, min: float = None, max: float = None):
|
|
73
|
-
input = _new_input(term_id, MODEL)
|
|
74
|
-
input['value'] = [value]
|
|
75
|
-
if min is not None:
|
|
76
|
-
input['min'] = [min]
|
|
77
|
-
input['statsDefinition'] = InputStatsDefinition.MODELLED.value
|
|
78
|
-
if max is not None:
|
|
79
|
-
input['max'] = [max]
|
|
80
|
-
input['statsDefinition'] = InputStatsDefinition.MODELLED.value
|
|
81
|
-
return input
|
|
82
|
-
|
|
83
|
-
|
|
84
72
|
def _include_term_ids(term_id: str):
|
|
85
73
|
return non_empty_list((get_term_lookup(term_id, LOOKUPS['inorganicFertiliser'][0]) or '').split(';'))
|
|
86
74
|
|
|
@@ -158,7 +146,7 @@ def _run_input(cycle: dict, input: dict):
|
|
|
158
146
|
}
|
|
159
147
|
) if len(max_values) >= 2 else None
|
|
160
148
|
|
|
161
|
-
return
|
|
149
|
+
return _new_input(term=input_term_id, model=MODEL, value=value, min=min, max=max) if value is not None else None
|
|
162
150
|
|
|
163
151
|
return list(map(include_input, input_term_ids))
|
|
164
152
|
|
|
@@ -29,12 +29,6 @@ TERM_ID = 'irrigatedTypeUnspecified'
|
|
|
29
29
|
MIN_IRRIGATION_M3 = 250
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
def _practice():
|
|
33
|
-
practice = _new_practice(TERM_ID, MODEL)
|
|
34
|
-
practice['value'] = [100]
|
|
35
|
-
return practice
|
|
36
|
-
|
|
37
|
-
|
|
38
32
|
def _should_run(cycle: dict):
|
|
39
33
|
functional_unit = cycle.get('functionalUnit')
|
|
40
34
|
irrigation_value_m3 = get_total_irrigation_m3(cycle)
|
|
@@ -60,4 +54,4 @@ def _should_run(cycle: dict):
|
|
|
60
54
|
|
|
61
55
|
def run(cycle: dict):
|
|
62
56
|
should_run = _should_run(cycle)
|
|
63
|
-
return [
|
|
57
|
+
return [_new_practice(term=TERM_ID, model=MODEL, value=100)] if should_run else []
|