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
|
@@ -41,15 +41,10 @@ LOOKUP = f"{list(LOOKUPS.keys())[1]}.csv"
|
|
|
41
41
|
authorised_indicators = ["landOccupationInputsProduction", "landOccupationDuringCycle"]
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
def _indicator(value: float):
|
|
45
|
-
indicator = _new_indicator(TERM_ID, MODEL)
|
|
46
|
-
indicator['value'] = value
|
|
47
|
-
return indicator
|
|
48
|
-
|
|
49
|
-
|
|
50
44
|
def _run(land_occupation_indicators: list):
|
|
51
45
|
values = [indicator['coefficient'] * indicator['area-by-year'] for indicator in land_occupation_indicators]
|
|
52
|
-
|
|
46
|
+
value = list_sum(values)
|
|
47
|
+
return _new_indicator(term=TERM_ID, model=MODEL, value=value)
|
|
53
48
|
|
|
54
49
|
|
|
55
50
|
def _should_run(impact_assessment: dict) -> Tuple[bool, list]:
|
|
@@ -64,19 +64,14 @@ RETURNS = {
|
|
|
64
64
|
TERM_ID = 'soilQualityIndexLandTransformation'
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
def _indicator(value: float):
|
|
68
|
-
indicator = _new_indicator(TERM_ID, MODEL)
|
|
69
|
-
indicator['value'] = value
|
|
70
|
-
return indicator
|
|
71
|
-
|
|
72
|
-
|
|
73
67
|
def _run(transformations: List[dict]):
|
|
74
68
|
values = [
|
|
75
69
|
(transformation.get("factor-from", 0) + transformation.get("factor-to", 0)
|
|
76
70
|
) * transformation.get("value", 0) * 20
|
|
77
71
|
for transformation in transformations
|
|
78
72
|
]
|
|
79
|
-
|
|
73
|
+
value = list_sum(values)
|
|
74
|
+
return _new_indicator(term=TERM_ID, model=MODEL, value=value)
|
|
80
75
|
|
|
81
76
|
|
|
82
77
|
def _is_valid_indicator(indicator: dict) -> bool:
|
|
@@ -25,15 +25,10 @@ RETURNS = {
|
|
|
25
25
|
TERM_ID = 'soilQualityIndexTotalLandUseEffects'
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
def _indicator(value: float):
|
|
29
|
-
indicator = _new_indicator(TERM_ID, MODEL)
|
|
30
|
-
indicator["value"] = value
|
|
31
|
-
return indicator
|
|
32
|
-
|
|
33
|
-
|
|
34
28
|
def _run(indicators: list):
|
|
35
29
|
values = [indicator["value"] for indicator in indicators]
|
|
36
|
-
|
|
30
|
+
value = list_sum(values)
|
|
31
|
+
return _new_indicator(term=TERM_ID, model=MODEL, value=value)
|
|
37
32
|
|
|
38
33
|
|
|
39
34
|
def _should_run(impactassessment: dict) -> tuple[bool, list]:
|
|
@@ -28,8 +28,7 @@ TIER = EmissionMethodTier.TIER_1.value
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def _emission(value: float):
|
|
31
|
-
emission = _new_emission(TERM_ID, MODEL)
|
|
32
|
-
emission['value'] = [value]
|
|
31
|
+
emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
|
|
33
32
|
emission['methodTier'] = TIER
|
|
34
33
|
return emission
|
|
35
34
|
|
|
@@ -20,20 +20,11 @@ RETURNS = {
|
|
|
20
20
|
TERM_ID = 'damageToHumanHealthParticulateMatterFormation'
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
def _indicator(value: float):
|
|
24
|
-
indicator = _new_indicator(TERM_ID, MODEL)
|
|
25
|
-
indicator['value'] = value
|
|
26
|
-
return indicator
|
|
27
|
-
|
|
28
|
-
|
|
29
23
|
def run(impact_assessment: dict):
|
|
30
24
|
value = impact_emission_lookup_value(
|
|
31
25
|
model=MODEL, term_id=TERM_ID, impact=impact_assessment, lookup_col=LOOKUPS['emission'], group_key='default'
|
|
32
26
|
)
|
|
33
27
|
logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
|
|
34
28
|
value=value)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
logShouldRun(impact_assessment, MODEL, TERM_ID, should_run)
|
|
38
|
-
|
|
39
|
-
return _indicator(value) if should_run else None
|
|
29
|
+
logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
|
|
30
|
+
return _new_indicator(term=TERM_ID, model=MODEL, value=value)
|
|
@@ -50,7 +50,7 @@ def _property(value: float):
|
|
|
50
50
|
return prop
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
def _product_value(product: dict, year: int, country_id: str):
|
|
53
|
+
def _product_value(cycle: dict, product: dict, year: int, country_id: str):
|
|
54
54
|
product_id = product.get('term', {}).get('@id')
|
|
55
55
|
groupingFAO = get_animalProduct_lookup_value(MODEL, product_id, FAO_LOOKUP_COLUMN)
|
|
56
56
|
|
|
@@ -59,10 +59,14 @@ def _product_value(product: dict, year: int, country_id: str):
|
|
|
59
59
|
# average_carcass_weight is in hg, divide by 10 to go back to kg
|
|
60
60
|
kg_carcass_weight = average_carcass_weight / 10 if average_carcass_weight else None
|
|
61
61
|
|
|
62
|
-
kg_liveweight = convert_product_to_unit(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
kg_liveweight = convert_product_to_unit(
|
|
63
|
+
product={
|
|
64
|
+
**product,
|
|
65
|
+
'value': [kg_carcass_weight]
|
|
66
|
+
},
|
|
67
|
+
dest_unit=Units.KG_LIVEWEIGHT,
|
|
68
|
+
log_node=cycle, model=MODEL, term=product_id, property=TERM_ID
|
|
69
|
+
) if kg_carcass_weight else None
|
|
66
70
|
|
|
67
71
|
return kg_liveweight, groupingFAO
|
|
68
72
|
|
|
@@ -77,7 +81,7 @@ def _run_liveAnimal(cycle: dict, product: dict, year: int, country_id: str):
|
|
|
77
81
|
animal_product_id = get_liveAnimal_to_animalProduct_id(product_id, LOOKUPS['liveAnimal'][0], term=TERM_ID)
|
|
78
82
|
|
|
79
83
|
animal_product_term = download_term(animal_product_id, TermTermType.ANIMALPRODUCT) if animal_product_id else {}
|
|
80
|
-
kg_liveweight, groupingFAO = _product_value({**product, 'term': animal_product_term}, year, country_id)
|
|
84
|
+
kg_liveweight, groupingFAO = _product_value(cycle, {**product, 'term': animal_product_term}, year, country_id)
|
|
81
85
|
|
|
82
86
|
logRequirements(cycle, model=MODEL, term=product_id, property=TERM_ID,
|
|
83
87
|
animal_product_id=animal_product_id,
|
|
@@ -94,7 +98,7 @@ def _run_liveAnimal(cycle: dict, product: dict, year: int, country_id: str):
|
|
|
94
98
|
|
|
95
99
|
def _run_animalProduct(cycle: dict, product: dict, year: int, country_id: str):
|
|
96
100
|
product_id = product.get('term', {}).get('@id')
|
|
97
|
-
kg_liveweight, groupingFAO = _product_value(product, year, country_id)
|
|
101
|
+
kg_liveweight, groupingFAO = _product_value(cycle, product, year, country_id)
|
|
98
102
|
|
|
99
103
|
logRequirements(cycle, model=MODEL, term=product_id, property=TERM_ID,
|
|
100
104
|
country_id=country_id,
|
|
@@ -103,11 +103,15 @@ def _run_by_liveAnimal(cycle: dict, product: dict, country: dict, year: int = No
|
|
|
103
103
|
animal_product_id, price_per_kg_liveweight = _get_liveAnimal_lookup_values(cycle, product, country, year)
|
|
104
104
|
|
|
105
105
|
animal_product = download_term(animal_product_id, TermTermType.ANIMALPRODUCT)
|
|
106
|
-
price_per_head = convert_product_to_unit(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
price_per_head = convert_product_to_unit(
|
|
107
|
+
product={
|
|
108
|
+
**product,
|
|
109
|
+
'term': animal_product,
|
|
110
|
+
'value': [price_per_kg_liveweight]
|
|
111
|
+
},
|
|
112
|
+
dest_unit=Units.HEAD,
|
|
113
|
+
log_node=cycle, model=MODEL, term=term_id, key=MODEL_KEY
|
|
114
|
+
) if price_per_kg_liveweight else None
|
|
111
115
|
|
|
112
116
|
logRequirements(cycle, model=MODEL, term=term_id, key=MODEL_KEY, by='liveAnimal',
|
|
113
117
|
year=year,
|
|
@@ -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
|
|
3
3
|
from hestia_earth.utils.tools import list_sum, safe_parse_float
|
|
4
4
|
|
|
@@ -25,21 +25,12 @@ RETURNS = {
|
|
|
25
25
|
"Input": [{
|
|
26
26
|
"value": "",
|
|
27
27
|
"sd": "",
|
|
28
|
-
"statsDefinition": "
|
|
28
|
+
"statsDefinition": "modelled"
|
|
29
29
|
}]
|
|
30
30
|
}
|
|
31
31
|
TERM_ID = 'seed'
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
def _input(value: float, sd: float):
|
|
35
|
-
input = _new_input(TERM_ID, MODEL)
|
|
36
|
-
input['value'] = [value]
|
|
37
|
-
if sd > 0:
|
|
38
|
-
input['sd'] = [sd]
|
|
39
|
-
input['statsDefinition'] = InputStatsDefinition.REGIONS.value
|
|
40
|
-
return input
|
|
41
|
-
|
|
42
|
-
|
|
43
34
|
def _run_product(product: dict):
|
|
44
35
|
term = product.get('term', {})
|
|
45
36
|
product_value = list_sum(product.get('value', []))
|
|
@@ -54,7 +45,9 @@ def _run(products: list):
|
|
|
54
45
|
total_value = list_sum([value for value, _ in values])
|
|
55
46
|
# TODO: we only fill-in sd for single values as the total value is complicated to calculate
|
|
56
47
|
total_sd = values[0][1] if len(values) == 1 else 0
|
|
57
|
-
return [
|
|
48
|
+
return [
|
|
49
|
+
_new_input(term=TERM_ID, model=MODEL, value=total_value, sd=total_sd)
|
|
50
|
+
] if total_value > 0 else []
|
|
58
51
|
|
|
59
52
|
|
|
60
53
|
def _should_run_product(product: dict):
|
|
@@ -177,12 +177,20 @@ def run_landTransformationFromCropland(term_id: str, impact: dict, indicators: l
|
|
|
177
177
|
|
|
178
178
|
return flatten([
|
|
179
179
|
[
|
|
180
|
-
_new_indicator(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
_new_indicator(
|
|
181
|
+
term=term_id,
|
|
182
|
+
value=value.get('value') * value.get('diff-temporary-area') / value.get('diff-total-area'),
|
|
183
|
+
model=MODEL,
|
|
184
|
+
land_cover_id=value.get('landCover-id'),
|
|
185
|
+
previous_land_cover_id='annualCropland'
|
|
186
|
+
),
|
|
187
|
+
_new_indicator(
|
|
188
|
+
term=term_id,
|
|
189
|
+
value=value.get('value') * value.get('diff-permanent-area') / value.get('diff-total-area'),
|
|
190
|
+
model=MODEL,
|
|
191
|
+
land_cover_id=value.get('landCover-id'),
|
|
192
|
+
previous_land_cover_id='permanentCropland'
|
|
193
|
+
)
|
|
186
194
|
]
|
|
187
195
|
for value in values
|
|
188
196
|
])
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
from hestia_earth.schema import TermTermType
|
|
2
2
|
from hestia_earth.utils.lookup import get_table_value, download_lookup, column_name
|
|
3
3
|
from hestia_earth.utils.model import filter_list_term_type
|
|
4
|
-
from hestia_earth.utils.tools import flatten, list_sum
|
|
4
|
+
from hestia_earth.utils.tools import flatten, list_sum, omit, pick, unique_values
|
|
5
5
|
from hestia_earth.utils.blank_node import group_by_keys
|
|
6
6
|
|
|
7
7
|
from hestia_earth.models.log import logRequirements, logShouldRun, log_as_table
|
|
8
|
-
from hestia_earth.models.utils import unique_values, _omit, _include
|
|
9
8
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
10
9
|
from hestia_earth.models.utils.lookup import _node_value
|
|
11
10
|
from . import MODEL
|
|
@@ -43,11 +42,8 @@ TERM_ID = 'ionisingRadiationKbqU235Eq'
|
|
|
43
42
|
|
|
44
43
|
|
|
45
44
|
def _indicator(value: float, key: dict, inputs: list) -> dict:
|
|
46
|
-
indicator = _new_indicator(TERM_ID, MODEL)
|
|
45
|
+
indicator = _new_indicator(term=TERM_ID, model=MODEL, value=value, inputs=inputs)
|
|
47
46
|
indicator['key'] = key
|
|
48
|
-
indicator['value'] = value
|
|
49
|
-
if inputs:
|
|
50
|
-
indicator['inputs'] = inputs
|
|
51
47
|
return indicator
|
|
52
48
|
|
|
53
49
|
|
|
@@ -90,7 +86,7 @@ def _should_run(impact_assessment: dict) -> tuple[bool, list]:
|
|
|
90
86
|
col_match_with=emission['key'].get('@id'),
|
|
91
87
|
col_val=column_name(emission['term']['@id'])
|
|
92
88
|
)
|
|
93
|
-
} |
|
|
89
|
+
} | pick(emission, ['key', 'inputs'])
|
|
94
90
|
for emission in emissions
|
|
95
91
|
if emission.get('key')
|
|
96
92
|
]
|
|
@@ -117,7 +113,7 @@ def _should_run(impact_assessment: dict) -> tuple[bool, list]:
|
|
|
117
113
|
has_emissions=has_emissions,
|
|
118
114
|
valid_key_requirements=valid_key_requirements,
|
|
119
115
|
all_emissions_have_known_CF=all_emissions_have_known_cf,
|
|
120
|
-
emissions=log_as_table([
|
|
116
|
+
emissions=log_as_table([omit(v, ['key', 'inputs']) for v in emissions_unpacked])
|
|
121
117
|
)
|
|
122
118
|
|
|
123
119
|
should_run = all([emissions_unpacked, valid_key_requirements])
|
|
@@ -34,8 +34,7 @@ BIBLIO_TITLE = 'An Enhanced Global Elevation Model Generalized From Multiple Hig
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def _measurement(site: dict, value: float):
|
|
37
|
-
measurement = _new_measurement(TERM_ID)
|
|
38
|
-
measurement['value'] = [value]
|
|
37
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
39
38
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
40
39
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
41
40
|
|
|
@@ -70,8 +70,7 @@ BIBLIO_TITLE = 'Harmonized World Soil Database Version 2.0.'
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
def _measurement(site: dict, value: int, depthUpper: int, depthLower: int):
|
|
73
|
-
measurement = _new_measurement(TERM_ID)
|
|
74
|
-
measurement['value'] = [value]
|
|
73
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
75
74
|
measurement['depthUpper'] = depthUpper
|
|
76
75
|
measurement['depthLower'] = depthLower
|
|
77
76
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
@@ -45,10 +45,8 @@ TERM_ID = 'croppingIntensity'
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
def _practice(site: dict, value: float):
|
|
48
|
-
practice = _new_practice(TERM_ID)
|
|
48
|
+
practice = _new_practice(term=TERM_ID, value=value)
|
|
49
49
|
practice['site'] = linked_node(site)
|
|
50
|
-
# force conversion to float from numpy, avoiding errors when reading it in other models
|
|
51
|
-
practice['value'] = [float(round(value, 7))]
|
|
52
50
|
return practice
|
|
53
51
|
|
|
54
52
|
|
|
@@ -32,8 +32,7 @@ BIBLIO_TITLE = 'Harmonized World Soil Database Version 2.0.'
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
def _measurement(site: dict, value: float):
|
|
35
|
-
measurement = _new_measurement(TERM_ID)
|
|
36
|
-
measurement['value'] = [value]
|
|
35
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
37
36
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
38
37
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
39
38
|
|
|
@@ -36,9 +36,8 @@ BIBLIO_TITLE = 'Biofuels: a new methodology to estimate GHG emissions from globa
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def _measurement(site: dict, value: int):
|
|
39
|
-
measurement = _new_measurement(TERM_ID)
|
|
39
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
40
40
|
measurement['description'] = _name(value)
|
|
41
|
-
measurement['value'] = [value]
|
|
42
41
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
43
42
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
44
43
|
|
|
@@ -31,8 +31,7 @@ BIBLIO_TITLE = 'Modelling spatially explicit impacts from phosphorus emissions i
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def _measurement(site: dict, value: float):
|
|
34
|
-
measurement = _new_measurement(TERM_ID)
|
|
35
|
-
measurement['value'] = [value]
|
|
34
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
36
35
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
37
36
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
38
37
|
|
|
@@ -31,8 +31,7 @@ BIBLIO_TITLE = 'Modelling spatially explicit impacts from phosphorus emissions i
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def _measurement(site: dict, value: float):
|
|
34
|
-
measurement = _new_measurement(TERM_ID)
|
|
35
|
-
measurement['value'] = [value]
|
|
34
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
36
35
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
37
36
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
38
37
|
|
|
@@ -42,8 +42,7 @@ BIBLIO_TITLE = 'Harmonized World Soil Database Version 1.2. Food and Agriculture
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
def _measurement(site: dict, value: float):
|
|
45
|
-
measurement = _new_measurement(TERM_ID)
|
|
46
|
-
measurement['value'] = [round(value, 7)]
|
|
45
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
47
46
|
measurement['depthUpper'] = 0
|
|
48
47
|
measurement['depthLower'] = 30
|
|
49
48
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
@@ -45,10 +45,8 @@ TERM_ID = 'longFallowRatio'
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
def _practice(site: dict, value: float):
|
|
48
|
-
practice = _new_practice(TERM_ID)
|
|
48
|
+
practice = _new_practice(term=TERM_ID, value=value)
|
|
49
49
|
practice['site'] = linked_node(site)
|
|
50
|
-
# force conversion to float from numpy, avoiding errors when reading it in other models
|
|
51
|
-
practice['value'] = [float(round(value, 7))]
|
|
52
50
|
return practice
|
|
53
51
|
|
|
54
52
|
|
|
@@ -31,8 +31,7 @@ BIBLIO_TITLE = 'Modelling spatially explicit impacts from phosphorus emissions i
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def _measurement(site: dict, value: float):
|
|
34
|
-
measurement = _new_measurement(TERM_ID)
|
|
35
|
-
measurement['value'] = [value]
|
|
34
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
36
35
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
37
36
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
38
37
|
|
|
@@ -59,8 +59,7 @@ BIBLIO_TITLE = 'Harmonized World Soil Database Version 2.0.'
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
def _measurement(site: dict, value: int, depthUpper: int, depthLower: int):
|
|
62
|
-
measurement = _new_measurement(TERM_ID)
|
|
63
|
-
measurement['value'] = [value]
|
|
62
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
64
63
|
measurement['depthUpper'] = depthUpper
|
|
65
64
|
measurement['depthLower'] = depthLower
|
|
66
65
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
@@ -36,8 +36,7 @@ EE_PARAMS = {
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def _measurement(value: float, year: int):
|
|
39
|
-
measurement = _new_measurement(TERM_ID)
|
|
40
|
-
measurement['value'] = [value]
|
|
39
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
41
40
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
42
41
|
measurement['startDate'] = f"{year}-01-01"
|
|
43
42
|
measurement['endDate'] = max_date(f"{year}-12-31")
|
|
@@ -38,8 +38,7 @@ EE_PARAMS = {
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
def _measurement(value: float):
|
|
41
|
-
measurement = _new_measurement(TERM_ID)
|
|
42
|
-
measurement['value'] = [value]
|
|
41
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
43
42
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
44
43
|
measurement['startDate'] = START_DATE
|
|
45
44
|
measurement['endDate'] = END_DATE
|
|
@@ -37,8 +37,7 @@ BIBLIO_TITLE = 'ERA5: Fifth generation of ECMWF atmospheric reanalyses of the gl
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
def _measurement(site: dict, value: list, dates: list):
|
|
40
|
-
measurement = _new_measurement(TERM_ID)
|
|
41
|
-
measurement['value'] = value
|
|
40
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
42
41
|
measurement['dates'] = dates
|
|
43
42
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
44
43
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
@@ -38,8 +38,7 @@ BIBLIO_TITLE = 'ERA5: Fifth generation of ECMWF atmospheric reanalyses of the gl
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
def _measurement(site: dict, value: float, year: int):
|
|
41
|
-
measurement = _new_measurement(TERM_ID)
|
|
42
|
-
measurement['value'] = [value]
|
|
41
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
43
42
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
44
43
|
measurement['startDate'] = f"{year}-01-01"
|
|
45
44
|
measurement['endDate'] = max_date(f"{year}-12-31")
|
|
@@ -40,8 +40,7 @@ BIBLIO_TITLE = 'ERA5: Fifth generation of ECMWF atmospheric reanalyses of the gl
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
def _measurement(site: dict, value: float):
|
|
43
|
-
measurement = _new_measurement(TERM_ID)
|
|
44
|
-
measurement['value'] = [value]
|
|
43
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
45
44
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
46
45
|
measurement['startDate'] = START_DATE
|
|
47
46
|
measurement['endDate'] = END_DATE
|
|
@@ -37,8 +37,7 @@ BIBLIO_TITLE = 'ERA5: Fifth generation of ECMWF atmospheric reanalyses of the gl
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
def _measurement(site: dict, value: list, dates: list):
|
|
40
|
-
measurement = _new_measurement(TERM_ID)
|
|
41
|
-
measurement['value'] = value
|
|
40
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
42
41
|
measurement['dates'] = dates
|
|
43
42
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
44
43
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
@@ -70,8 +70,7 @@ BIBLIO_TITLE = 'Harmonized World Soil Database Version 2.0.'
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
def _measurement(site: dict, value: int, depthUpper: int, depthLower: int):
|
|
73
|
-
measurement = _new_measurement(TERM_ID)
|
|
74
|
-
measurement['value'] = [value]
|
|
73
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
75
74
|
measurement['depthUpper'] = depthUpper
|
|
76
75
|
measurement['depthLower'] = depthLower
|
|
77
76
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
@@ -49,8 +49,7 @@ BIBLIO_TITLE = 'Harmonized World Soil Database Version 2.0.'
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
def _measurement(site: dict, value: int, depthUpper: int, depthLower: int):
|
|
52
|
-
measurement = _new_measurement(TERM_ID)
|
|
53
|
-
measurement['value'] = [value]
|
|
52
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
54
53
|
measurement['depthUpper'] = depthUpper
|
|
55
54
|
measurement['depthLower'] = depthLower
|
|
56
55
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
@@ -31,8 +31,7 @@ BIBLIO_TITLE = 'An Enhanced Global Elevation Model Generalized From Multiple Hig
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def _measurement(site: dict, value: float):
|
|
34
|
-
measurement = _new_measurement(TERM_ID)
|
|
35
|
-
measurement['value'] = [round(value, 7)]
|
|
34
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
36
35
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
37
36
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
38
37
|
|
|
@@ -31,8 +31,7 @@ BIBLIO_TITLE = 'An Enhanced Global Elevation Model Generalized From Multiple Hig
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def _measurement(site: dict, value: float):
|
|
34
|
-
measurement = _new_measurement(TERM_ID)
|
|
35
|
-
measurement['value'] = [value]
|
|
34
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
36
35
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
37
36
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
38
37
|
|
|
@@ -59,8 +59,7 @@ BIBLIO_TITLE = 'Harmonized World Soil Database Version 2.0.'
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
def _measurement(site: dict, value: int, depthUpper: int, depthLower: int):
|
|
62
|
-
measurement = _new_measurement(TERM_ID)
|
|
63
|
-
measurement['value'] = [value]
|
|
62
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
64
63
|
measurement['depthUpper'] = depthUpper
|
|
65
64
|
measurement['depthLower'] = depthLower
|
|
66
65
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
@@ -38,8 +38,7 @@ BIBLIO_TITLE = 'ERA5: Fifth generation of ECMWF atmospheric reanalyses of the gl
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
def _measurement(site: dict, value: float, year: int):
|
|
41
|
-
measurement = _new_measurement(TERM_ID)
|
|
42
|
-
measurement['value'] = [value]
|
|
41
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
43
42
|
measurement['startDate'] = f"{year}-01-01"
|
|
44
43
|
measurement['endDate'] = max_date(f"{year}-12-31")
|
|
45
44
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
@@ -40,8 +40,7 @@ BIBLIO_TITLE = 'ERA5: Fifth generation of ECMWF atmospheric reanalyses of the gl
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
def _measurement(site: dict, value: float):
|
|
43
|
-
measurement = _new_measurement(TERM_ID)
|
|
44
|
-
measurement['value'] = [value]
|
|
43
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
45
44
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
46
45
|
measurement['startDate'] = START_DATE
|
|
47
46
|
measurement['endDate'] = END_DATE
|
|
@@ -37,8 +37,7 @@ BIBLIO_TITLE = 'ERA5: Fifth generation of ECMWF atmospheric reanalyses of the gl
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
def _measurement(site: dict, value: list, dates: list):
|
|
40
|
-
measurement = _new_measurement(TERM_ID)
|
|
41
|
-
measurement['value'] = value
|
|
40
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
42
41
|
measurement['dates'] = dates
|
|
43
42
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
44
43
|
return measurement | get_source(site, BIBLIO_TITLE)
|
|
@@ -59,8 +59,7 @@ BIBLIO_TITLE = 'Harmonized World Soil Database Version 2.0.'
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
def _measurement(site: dict, value: int, depthUpper: int, depthLower: int):
|
|
62
|
-
measurement = _new_measurement(TERM_ID)
|
|
63
|
-
measurement['value'] = [value]
|
|
62
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
64
63
|
measurement['depthUpper'] = depthUpper
|
|
65
64
|
measurement['depthLower'] = depthLower
|
|
66
65
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
@@ -34,8 +34,7 @@ BIBLIO_TITLE = 'Modelling spatially explicit impacts from phosphorus emissions i
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def _measurement(site: dict, value: float):
|
|
37
|
-
measurement = _new_measurement(TERM_ID)
|
|
38
|
-
measurement['value'] = [value]
|
|
37
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
39
38
|
measurement['depthUpper'] = 0
|
|
40
39
|
measurement['depthLower'] = 50
|
|
41
40
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
@@ -29,8 +29,7 @@ EE_PARAMS = {
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
def _measurement(value: float):
|
|
32
|
-
measurement = _new_measurement(TERM_ID)
|
|
33
|
-
measurement['value'] = [value]
|
|
32
|
+
measurement = _new_measurement(term=TERM_ID, value=value)
|
|
34
33
|
measurement['methodClassification'] = MeasurementMethodClassification.GEOSPATIAL_DATASET.value
|
|
35
34
|
return measurement
|
|
36
35
|
|
|
@@ -34,8 +34,7 @@ TOTAL_TERM_ID = 'aboveGroundCropResidueTotal'
|
|
|
34
34
|
REMAINING_MODEL = PRODUCT_ID_TO_PRACTICES_ID[-1]['product']
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
def _product(term_id: str, value: float):
|
|
38
|
-
return _new_product(term_id, round(value, 7), MODEL)
|
|
37
|
+
def _product(term_id: str, value: float): return _new_product(term=term_id, model=MODEL, value=value)
|
|
39
38
|
|
|
40
39
|
|
|
41
40
|
def _get_practices(term_id: str):
|
|
@@ -21,16 +21,11 @@ RETURNS = {
|
|
|
21
21
|
TERM_ID = 'aboveGroundCropResidueTotal'
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
def _product(value: float):
|
|
25
|
-
product = _new_product(TERM_ID, value, MODEL)
|
|
26
|
-
return product
|
|
27
|
-
|
|
28
|
-
|
|
29
24
|
def _run(practice: dict, product: dict):
|
|
30
25
|
practice_value = list_sum(practice.get('value', []))
|
|
31
26
|
product_value = list_sum(product.get('value', []))
|
|
32
27
|
value = product_value / (practice_value / 100)
|
|
33
|
-
return [
|
|
28
|
+
return [_new_product(term=TERM_ID, model=MODEL, value=value)]
|
|
34
29
|
|
|
35
30
|
|
|
36
31
|
def _matching_product_by_practice(term_id: str):
|
|
@@ -22,8 +22,7 @@ TERM_ID = 'brackishWater'
|
|
|
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
|
|