Florian Humpenöder & Jan Philipp Dietrich
R software package
Open Source
LGPL3 license
Facilitate reproducibility through sharing of data processing workflows
reusable through standardization
Improve robustness through integrated testing
more transparent through automatic metadata generation and handling
Builds on MADRaT
Sharing the data of a study is important
Sharing the code which produced the data is even more important
# Stylized representation of data retrieval
install.packages("mrdownscale")
library(mrdownscale)
downscaleRunESM(outputdir = "/my/path/to/the/data")
Build on existing code instead of existing data
Use existing pieces in new workflows
Testing helps to identify problems in an early stage
Are the values within the expected range?
Is the data in the expected format?
Does the data contain NAs?
mrdownscale:::calcLandInput
[✓] Dimensions are named correctly
[✓] Land input categories match the corresponding mapping
[✓] All values are >= 0
[✓] Total area is constant over time (maxdiff = 3e-08, threshold = 1e-04)
[✓] primforest is never expanding
toolResolutionMapping
[!] 4.7% of input cells missing in target, these are discarded
[!] 0.59% of target cells missing in mapping, adding those to mapping (nearest neighbor)
[!] nearest neighbor distances: max = 737.7km, 90% quantile = 43.9km, mean = 41km
powered by madrat » github.com/pik-piam/madrat
retrieveData: bundle data sets
readSource: download and read source data
calcOutput: perform calculations on the data (filtering, merging,...)
data processing split into distinct steps
wrapper provide controlled environment for user-written code
wrapper
user code
powered by madrat » github.com/pik-piam/madrat
use building blocks to create data processing workflows
remix existing workflows
reuse snippets from other workflows
Historic land use
Future land use
c3ann c3nfx
c3per c4ann
c4per pastr
primf primn
range secdf
secdn urban
secma secmb
crpbf_c3ann crpbf_c3nfx
crpbf_c3per crpbf_c4ann
crpbf_c4per crpbf2_c3per
crpbf2_c4per irrig_c3ann
irrig_c3nfx irrig_c3per
irrig_c4ann irrig_c4per
manaf fulwd
rndwd fertl_c3ann
fertl_c3nfx fertl_c3per
fertl_c4ann fertl_c4per
combf flood
fharv_c3perfharv_c4per
transitions between all states
crpbf2_c3per crpbf2_c4per
2nd gen biofuel as share of c3per/c4per
manaf
managed forest as
share of secdf
This presentation - slides.com/jandietrich/mrdownscale
MADRaT repository - https://github.com/pik-piam/madrat
mrdownscale repository - https://github.com/pik-piam/mrdownscale
MADRaT tutorial | pik-piam.r-universe.dev/articles/madrat/madrat.html
other MADRaT-based packages | github.com/pik-piam?q=mr
contact | Florian Humpenöder humpenoeder@pik-potsdam.de
Jan Dietrich dietrich@pik-potsdam.de