International-Soil-Radiocarbon-Database / ISRaD

Repository for the development and release of ISRaD data and tools
https://international-soil-radiocarbon-database.github.io/ISRaD/
24 stars 15 forks source link

ISRaD.extra.Cstocks needs to filter out Inf and -Inf #179

Closed alkalifly closed 5 years ago

alkalifly commented 5 years ago

ISRaD.extra.Cstocks is getting messed up by layers that have a depth of Inf (for unknown bottom depth) or -Inf (for unknown top depth). See, for example, Dutta_2006, Sukharnaya, Sukharnaya, S_1, where the Inf layer depth ends up making the calculated lyr_soc also be infinite. Presumably, we want to have this procedure ignore any layers with infinite depths, but I wanted to check with @jb388 before implementing this change.

jb388 commented 5 years ago

@alkalifly Yes, definitely should fix this. We can add some code that simply looks for this exact issue (inf lyr_bot, -inf lyr_top, and inf lyr_top for lyr_all_org_neg profiles).

greymonroe commented 5 years ago

@alkalifly are you working on implementing this? I can if you havent started yet.

alkalifly commented 5 years ago

@greymonroe I've been totally swamped so I haven't started it yet. It would be great if you could. I imagine it should be pretty simple for someone who knows R well (unlike me)

greymonroe commented 5 years ago

fixed in recent updates