wri / gfw_forest_loss_geotrellis

Global Tree Cover Loss Analysis using Geotrellis and SPARK
MIT License
10 stars 8 forks source link

Feature/arc py client lazy load carbon expansion #196

Closed dagibbs22 closed 12 months ago

dagibbs22 commented 1 year ago

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Please check the type of change your PR introduces:

What is the current behavior?

  1. Contextual layers are always loaded to treecoverloss package even if they're not being used.
  2. Contextual layers only included primary forest and plantations (SDPT v1.0)
  3. Carbon stocks in 2000 are always calculated but only output if the user requests them
  4. Simple annual emissions from aboveground biomass loss is always calculated and output.
  5. Annual gross emissions timeseries only for all gases combined.

What is the new behavior?

  1. All contextual layers lazy load now, to save memory and expedite analyses.
  2. Contextual layers of global peat extent and tree cover loss drivers added (peat needed for GCSC sLUC emissions).
  3. Carbon stocks in 2000 lazy load and are only calculated and output if the user requests them. Reduces output clutter.
  4. Annual emissions from aboveground biomass loss is only output if the user requests it.
  5. Annual gross emissions timeseries can now be optionally output for CO2 and non-CO2 gases separately (needed for GCSC sLUC emissions).

Does this introduce a breaking change?

Other information

I will separately make changes to the ArcPy client so that the new user options can be accessed from there.

dagibbs22 commented 1 year ago

Yes, I tested locally with various configurations, ranging from all flags on to no flags on. The right fields were output each time and the totals matched values from a run on the same shape before I made these changes.

This looks good for the most part, just had one question on why we need to change so many layer URIs.

Also, did you test locally it created the new output correctly? It looks like the tests are failing, possibly because of your layer changes.

codecov-commenter commented 12 months ago

Codecov Report

Attention: 322 lines in your changes are missing coverage. Please review.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
.../globalforestwatch/layers/FIAregionsUSextent.scala 0.00% <ø> (ø)
...atch/layers/GrossCumulAbovegroundRemovalsCo2.scala 0.00% <ø> (ø)
...atch/layers/GrossCumulBelowgroundRemovalsCo2.scala 0.00% <ø> (ø)
...forestwatch/layers/GrossEmissionsCo2OnlyCo2e.scala 0.00% <ø> (ø)
...lforestwatch/layers/GrossEmissionsNonCo2Co2e.scala 0.00% <ø> (ø)
...h/layers/GrossEmissionsNonCo2Co2eBiomassSoil.scala 0.00% <ø> (ø)
...globalforestwatch/layers/IntactPrimaryForest.scala 0.00% <ø> (ø)
...yers/JplTropicsAbovegroundBiomassDensity2000.scala 0.00% <ø> (ø)
...ayers/JplTropicsAbovegroundBiomassExtent2000.scala 0.00% <ø> (ø)
...ain/scala/org/globalforestwatch/layers/Layer.scala 38.98% <ø> (ø)
... and 45 more

:loudspeaker: Thoughts on this report? Let us know!.