Computer program and input data set for performing comparative temporal analyses of heating infrastructure scenarios

Published: 28-06-2019| Version 2 | DOI: 10.17632/h7fcpytx3g.2
Saurajyoti Kar,
Pieter Billen,
Beth Katz,
Sheng Yang,
Timothy Volk,
Lars Björnebo,
Sabrina Spatari


The program developed for performing the comparative study of district heating and conventional heating infrastructures for the different feedstocks - heating oil, natural gas, forest residue and willow crop, is presented here. The program is developed in R programing language. The primary file is named as 'RF_temporalmodel_soildepth100.Rmd'. The 'rmarkdown' approach to the code is followed for distributing the code into different compartments. The 'myfunctions.R' contains function definitions for functions called in the primary 'rmarkdown' program code. To successfully run the 'RF_temporalmodel_soildepth100.Rmd' code file, the variables saving the directory file paths need to be updated. Comments are provided at the specific code lines needing update within the code file. Two cases of land use change for willow crop cultivation needs separate parameterization. Once the code chunk named ‘load_lib_func’ is run, analyst need to set the land use flag change variable ‘set_W_luc_case’ type of either ‘croplands_to_willow_soildepth_100cm_Mg_C_ha_yr’ or ‘pasture_hay_grasslands_to_willow_100cm_Mg_C_ha_yr’. Both lines of code are written, the needed code line be commented out to mark it not executable. In addition to setting the ‘set_W_luc_case’ variable, analyst need to enable the corresponding code line under the code chunk named ‘willow LUC cases’, and update the two variables ‘Wloc_DH_em_RF_2’ and ‘Wloc_DH_em_CRF_2’. Again, analyst can comment out the corresponding lines to reflect the land use change under study. Once these two variables are updated the analyst can run all the code chunks from ‘load_lib_func’ up to ‘set_W_luc_case’. Next, analyst can enable the alternative land use change case and re-run the code lines. To understand the algorithm of the executed code, the analyst is referred to the supplementary information A (SI-A) document. At this stage, all the data matrices needing to plot the analyses graph for radiative forcing and cumulative forcing are populated. The code chunks beyond ‘willow LUC cases’ facilitate plotting the graphs, some of which are presented in the journal manuscript. The analyst can follow the code, as the commands are self-explanatory. Please reach out for any question or clarification regarding the code and data.