Skip to content

Commit

Permalink
resolved crop bgbc issue by unmasking woody layers
Browse files Browse the repository at this point in the history
  • Loading branch information
sethspawn authored Feb 5, 2020
1 parent a7e8f33 commit cb4e0e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions synthesis/harmonizing_funcs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Author: Seth Spawn (spawn@wisc.edu)
Date: Jun 28, 2019 [last modified]
Date: Jan 15, 2020 [last modified]
Purpose: Defines woody_globalMosaic function which combines the GlobBiomass and Bouvet maps using the
guidance of the ESA CCI landcover map.
Also Defines globalMosaic() and its dependency addHerb() which combines all disparate biomass maps
Expand Down Expand Up @@ -90,7 +90,7 @@ var addHerb = function(woody, herb, percTree){
var globalMosaic = function(woody, grass, crop, tundra, percTree, landcover, woodyAGB, tundraAGB){

// trim significant digits to avoid uncertainty outliers (6/28/19)
woody = significantDigits(woody)
woody = significantDigits(woody.unmask()) // -- unmask critical for BGB (01/15/19)
grass = significantDigits(grass)
crop = significantDigits(crop)
tundra = significantDigits(tundra)
Expand Down Expand Up @@ -171,7 +171,7 @@ var globalMosaic = function(woody, grass, crop, tundra, percTree, landcover, woo

// --- Boreal South (S of 60 degrees)
var S_borealSparce = tundra.updateMask(sparce)
var S_borealOther = addHerb(woody, borealHerb_bio, percTree)// WHY IS TUNDRA BEING APPLIED TO TREE COVER?????
var S_borealOther = addHerb(woody, borealHerb_bio, percTree)
var S_borealMosaic = ee.ImageCollection([S_borealSparce, S_borealOther])
S_borealMosaic = S_borealMosaic.reduce(ee.Reducer.firstNonNull()).rename(bandNames)
S_borealMosaic = S_borealMosaic.updateMask(borealMask).multiply(S_weight)
Expand All @@ -195,4 +195,4 @@ var globalMosaic = function(woody, grass, crop, tundra, percTree, landcover, woo
return globalMosaic
}

exports.globalMosaic = globalMosaic
exports.globalMosaic = globalMosaic

0 comments on commit cb4e0e0

Please sign in to comment.