Spatiotemporal variability of water transit time distributions along an alpine stream network
收藏资源简介:
This repository hosts the data and the codes to reproduce the analysis and the results presented in the manuscript:"Spatiotemporal variability of water transit time distributions along an alpine stream network"by Giulia Grandi et al. File "analyze_results.m": run the code to reproduce results of the manuscript and some useful Figures. Folder "input" contains the input structures to run the analyze_results.m script:- "Results.m" contains the results obtained from the MCMC sampling performed via the DREAM_ZS sampler.- "Variables.m" embeds the input variables as detailed in the script "analyze_results.m". Folder "auxiliary_func" contains the auxiliary functions to perform the posterior calculation and produce some plots:- "ComputeGaussianLogL.m" : performs the calculation of the gaussian log-Likelihood.- "ComputeLogPrior.m" : performs the calculation of the log-Prior for each parameter of the model based on the setting embedded in V.SP.- "subaxis.m" and "parseArgs.m" : functions to obtain nice subplot proposed by Aslak Grinsted (2026). "Subaxis - Subplot (https://ch.mathworks.com/matlabcentral/fileexchange/3696-subaxis-subplot), MATLAB Central File Exchange. Retrieved March 9, 2026."- "PlotPrior.m" : fuction to plot nicely the prior distribution (also in case of pooling). To use the model for a different case study, prepare the "V" data structure as detailed in the description of the analyze_results.m file and use the function "modelSASfunction", which return the log of the posterior density, with any sampler of choice. To use the DREAM_ZS sampler (as in the present study), please refer to "https://github.com/Zaijab/DREAM" for download. Language: MatLab (tested on Version R2024b)
本仓库存储了用于复现Giulia Grandi等人发表的论文《阿尔卑斯河网水流停留时间分布的时空变异性》(Spatiotemporal variability of water transit time distributions along an alpine stream network)中所述分析过程与实验结果的代码与数据集。 文件`analyze_results.m`可用于运行代码,复现论文结果并生成实用图表。 文件夹`input`包含运行`analyze_results.m`脚本所需的输入结构体: - `Results.m`:存储了通过DREAM_ZS采样器(DREAM_ZS sampler)执行马尔可夫链蒙特卡洛(Markov Chain Monte Carlo, MCMC)采样得到的结果。 - `Variables.m`:嵌入了`analyze_results.m`脚本中详述的输入变量。 文件夹`auxiliary_func`包含用于执行后验计算与生成绘图的辅助函数: - `ComputeGaussianLogL.m`:用于计算高斯对数似然值。 - `ComputeLogPrior.m`:基于V.SP中嵌入的配置,为模型各参数计算对数先验值。 - `subaxis.m`与`parseArgs.m`:由Aslak Grinsted于2026年提出的优化子图绘制函数,相关资源引用:*Subaxis - Subplot* (https://ch.mathworks.com/matlabcentral/fileexchange/3696-subaxis-subplot), MATLAB Central 文件交换中心,2026年3月9日获取。 - `PlotPrior.m`:用于美观绘制先验分布的函数(支持多分布合并场景)。 若需将本模型应用于其他案例研究,请按照`analyze_results.m`文件的说明准备`V`数据结构体,再选用任意采样器调用`modelSASfunction`函数——该函数将返回后验密度的对数值。若需使用本研究采用的DREAM_ZS采样器,请访问`https://github.com/Zaijab/DREAM`下载获取。 本代码基于MatLab语言开发,已在R2024b版本中完成测试。



