Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WAMORE Reproducibility

Companion repository for the numerical experiments and empirical analyses presented in the paper "Towards Open Science: Monitoring Crustal Deformations in North America".

The repository contains R scripts, C++ helper functions, launch scripts, and saved outputs used to reproduce the simulation studies and case-study results. Most computations are organized as standalone R scripts, with computationally intensive routines implemented in C++ and called from R through Rcpp.

Repository structure

.
├── case_study/           # Scripts, data, results, and plots for the empirical case study
├── simulation_studies/   # Simulation experiments and post-processing scripts
├── src/                  # `C++` routines used by the `R` scripts through `Rcpp`
└── README.md

Requirements

The analyses are written in R and use C++ code compiled through Rcpp. The main R dependencies used across the scripts include:

  • Rcpp
  • RcppArmadillo
  • wv

Some scripts were designed to run on a SLURM cluster and include calls to sbatch, srun, and environment variables such as SLURM_ARRAY_TASK_ID. Running the full set of simulations therefore requires access to a compatible cluster environment, or local adaptation of the launch scripts.

How to run

The repository is organized around experiment-specific folders. In general, a simulation folder contains:

  • one or more R scripts that define and run the experiment;
  • shell scripts that submit jobs to SLURM;
  • optional recombine.R scripts that merge array-job outputs;
  • post-processing scripts that check results and generate plots;
  • saved .rda outputs used for the figures and tables in the paper.

For cluster execution, enter the relevant experiment directory and run the corresponding launch script. For example:

cd simulation_studies/new_simu_wn_pl_with_missing
sh launch_all_new_simu_wn_pl_with_missing.sh

For local development, the main R scripts include commented sourceCpp("src/...") lines that can be used instead of the cluster-specific paths. In that case, load the required R packages, source the relevant C++ files from src/, and run the R script directly.

After jobs finish, use the corresponding recombine.R and checking or plotting scripts in the same folder to aggregate outputs and reproduce the reported summaries.

Simulation studies

The simulation_studies/ folder contains the scripts, launch files, saved outputs, and plotting code used for the simulation results in the paper. Each subfolder corresponds to a specific simulation setting:

  • simulation_studies/new_simu_wn_flicker_w_missing/ contains the files needed to reproduce the simulations with a white noise plus flicker noise model under missing observations, together with the scripts used to plot the results. It also contains the code used to produce Figures 6, 7, and 8 of the paper.
  • simulation_studies/new_simu_wn_matern_rw_w_missing/ contains the files needed to reproduce the simulations with a white noise, Matern, and random walk noise model under missing observations, together with the scripts used to plot the results. It also contains the code used to produce Figures 2, 3, and 5 of the paper.
  • simulation_studies/new_simu_wn_pl_with_missing/ contains the files needed to reproduce the simulations with a white noise plus stationary power-law noise model under missing observations, together with the scripts used to plot the results. It also contains the code used to produce Figures 9, 10, and 11 of the paper.
  • simulation_studies/model_selection_simulation_wn_fl_rw/ contains the model selection simulation comparing the white noise plus flicker noise model with the white noise, flicker noise, and random walk model. It also contains the code used to produce Figure 12 of the paper.
  • simulation_studies/emulation_study/ contains the emulation studies used to investigate the coverage of the confidence intervals produced by the method, both with and without the model-selection step. It also contains the code used to produce Figures 15 and 16 of the paper.

Case study

The case_study/ folder contains scripts and plotting code for the empirical application in the paper. This case study analyzes tectonic velocities and crustal uplift in North America using the WAMORE estimator together with the proposed model-selection procedure.

The folder is organized as follows:

  • case_study/new_case_study_feb_26/ contains the main workflow used in the paper. It analyzes the North American network using only the WAMORE estimator and the proposed model-selection procedure. It includes scripts to select the stations, analyze the selected time series, recombine the outputs, check the results, and prepare the final case-study figures. It also provides the script and GIMP project used to produce Figure 4 of the paper.
  • case_study/plot_for_paper_feb_26/ contains scripts and the GIMP project used to reproduce Figure 1 of the paper.
  • case_study/case_study_extended/ contains an extended version of the case study. It includes a comparison with MLE on a subset of 300 stations, as well as a larger WAMORE-only network analysis covering 6,313 stations worldwide. It also contains the code used to produce Figures 13 and 14 of the paper.

Source code

The src/ folder contains the C++ routines used by the R files to run the simulations and case study.

License

This repository is released under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages