Open cmbarton opened 4 years ago
Or maybe phytoliths are OK and it's charcoal that is a problem.
The thing is phytoliths come into accumulation as g/cell and charcoal comes in as g/cm2
What does the accumulation loop need, g/cm2 or g/cell?
It seems like it is assuming the data come in as g/cell and is converting to g/cm2. Is that right?
But do we really want to accumulate rates? Don't we want to accumulate totals (g/cell) and then convert to concentration = g/cm3 depending on the depth of each accumulation? Maybe I'm making this too complicated.
It seems like it is assuming the data come in as g/cell and is converting to g/cm2. Is that right?
Yes, that's right. I think this intermediate step converting to g/cm2 was a holdover from a previous version that required those units for some other calculations, but now its redundant and just adds confusion to the unit conversions. Going forward perhaps we should stick to g/cell for all proxies, convert to g/cm3 only at the end of the accumulation as you suggest, then leave other conversions (like grams to pieces) as a postprocessing step for the user?
Yes. It will be better if we output everything in a standard set of units. Given how we accumulate the proxies, g/cm3 seems like the most consistent.
Here are the mapcalc calculations for grass and woody phytoliths
grass.mapcalc("${phytomap} = eval(a=nsres()ewres()2, b=graph(${lcovmap}, 0,0.1, 5,1, 50,0.4), a*b)", overwrite = True, quiet = True, phytomap = gphyto, lcovmap = lc) # modify yearly phytolith deposition for pure grassland by the actual landcover mixture (perecntage of grass in succession stage), and then scale to size of raster cel. This map is then g/cell of grass phytos.
grass.mapcalc("${phytomap} = eval(a=nsres()ewres()0.02, b=graph(${lcovmap}, 0,0, 7,0.05, 18,0.33, 35,0.37, 50,1), a*b)", overwrite = True, quiet = True, phytomap = wphyto, lcovmap = lc) # ditto for woody phytoliths
It seems like these already calculate phytoliths in g/cell -> nsres() ewres() (2.0 or 0.02)*veg proportion from graph
If so, we need to either get rid of nsres()*ewres() here or do the accumulation differently here:
l.append({'Year': i, 'Elevation': float(elev), 'Soildepth': float(sdepth), 'Delta': float(delta), 'InSitu Grass Phytoliths': float(gphyto) / cm2percell, 'InSitu Wood Phytoliths': float(wphyto) / cm2percell, "Scaled Basin-Average Grass Phytoliths": float(avgphytos[i]) / cm2percell, "Scaled Basin-Average Wood Phytoliths": float(avwphytos[i]) / cm2percell, "InSitu Charcoal": float(charcoal) / cm2percell, "Scaled Basin-Average Charcoal":float(averagecharc[i]) / cm2percell})
Did I miss something?