11/*
22 Author: Seth Spawn (spawn@wisc.edu)
3- Date: Jun 28, 2019 [last modified]
3+ Date: Jan 15, 2020 [last modified]
44 Purpose: Defines woody_globalMosaic function which combines the GlobBiomass and Bouvet maps using the
55 guidance of the ESA CCI landcover map.
66 Also Defines globalMosaic() and its dependency addHerb() which combines all disparate biomass maps
@@ -90,7 +90,7 @@ var addHerb = function(woody, herb, percTree){
9090var globalMosaic = function ( woody , grass , crop , tundra , percTree , landcover , woodyAGB , tundraAGB ) {
9191
9292 // trim significant digits to avoid uncertainty outliers (6/28/19)
93- woody = significantDigits ( woody )
93+ woody = significantDigits ( woody . unmask ( ) ) // -- unmask critical for BGB (01/15/19 )
9494 grass = significantDigits ( grass )
9595 crop = significantDigits ( crop )
9696 tundra = significantDigits ( tundra )
@@ -171,7 +171,7 @@ var globalMosaic = function(woody, grass, crop, tundra, percTree, landcover, woo
171171
172172 // --- Boreal South (S of 60 degrees)
173173 var S_borealSparce = tundra . updateMask ( sparce )
174- var S_borealOther = addHerb ( woody , borealHerb_bio , percTree ) // WHY IS TUNDRA BEING APPLIED TO TREE COVER?????
174+ var S_borealOther = addHerb ( woody , borealHerb_bio , percTree )
175175 var S_borealMosaic = ee . ImageCollection ( [ S_borealSparce , S_borealOther ] )
176176 S_borealMosaic = S_borealMosaic . reduce ( ee . Reducer . firstNonNull ( ) ) . rename ( bandNames )
177177 S_borealMosaic = S_borealMosaic . updateMask ( borealMask ) . multiply ( S_weight )
@@ -195,4 +195,4 @@ var globalMosaic = function(woody, grass, crop, tundra, percTree, landcover, woo
195195 return globalMosaic
196196}
197197
198- exports . globalMosaic = globalMosaic
198+ exports . globalMosaic = globalMosaic
0 commit comments