Skip to content

Commit

Permalink
More cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
danscales committed Jan 16, 2025
1 parent 16e13ad commit 7ccb37b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object GHGCommand extends SummaryCommand with LazyLogging {
val backupYieldOpt: Opts[NonEmptyList[String]] = Opts
.options[String](
"backup_yield_url",
help = "URI of GADM features in TSV format"
help = "URI of backup yield-by-gadm2 area file, in CSV format"
)

val ghgCommand: Opts[Unit] = Opts.subcommand(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object GHGRDD extends ErrorSummaryRDD {
windowLayout,
kwargs
)
}.left.map { ex => logger.error("Error in ErrorGHGRDD.getSources", ex); ex}
}.left.map { ex => logger.error("Error in GHGRDD.getSources", ex); ex}
}

def readWindow(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ object GHGSummary {
}
println(s"No yield found for $commodity in $gadmId")
throw new NoYieldException(s"No yield found for $commodity in $gadmId")
//0.toFloat
}

val featureId = kwargs("featureId").asInstanceOf[GfwProFeatureExtId]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ case class GHGTile(
lazy val grossEmissionsCo2eNonCo2 = sources.grossEmissionsCo2eNonCo2.fetchWindow(windowKey, windowLayout)
lazy val grossEmissionsCo2eCo2Only = sources.grossEmissionsCo2eCo2Only.fetchWindow(windowKey, windowLayout)
// It is important that the fetches for the individual yield files and the gadm
// admin areas are lazy, since we will only need access to one commodity file for
// any particular location. And we only need to access the gadm area values if we
// can't get a yield value from the relevant commodity file.
// admin areas are lazy, since we will only need access to at most one commodity
// file for any particular location. And we only need to access the gadm area
// values if we can't get a yield value from the relevant commodity file.
lazy val cocoYield = sources.mapspamCOCOYield.fetchWindow(windowKey, windowLayout)
lazy val coffYield = sources.mapspamCOFFYield.fetchWindow(windowKey, windowLayout)
lazy val oilpYield = sources.mapspamOILPYield.fetchWindow(windowKey, windowLayout)
Expand Down

0 comments on commit 7ccb37b

Please sign in to comment.