This repository contains code for the examples in https://arxiv.org/abs/2006.04917, v3
R/handle_packages.RHelper function for checking whether needed packages are installedR/S2C.RHelper functions for using FFT to convert between spectral densities and covariancesR/covariance_computation.RCompute covariances. Can be run assource("R/covariance_computation.R")R/covariance_plots.RMake covariance plots, from data saved by the computation code. Can be run assource("R/covariance_plots.R")R/example_computation.RCompute prediction example data. Can be run assource("R/example_computation.R")R/example_plots.RMake prediction plot, from data saved by the example computation code. Can be run assource("R/example_plots.R")R/globaltavgFolder with multiple files for the global temperature example. SeeR/globaltavg/README.txtMakefileMakefile for the global temperature example, covariance plots, and simulation example. The full temperature analysis can be run in a terminal by the following sequence:
# Download, check and prepare the data:
make data
# Create the analysis mesh:
make mesh
# Plot the data and mesh (runs plot_data and plot_mesh):
make plot_pre
# Fit the models (runs model_fit and model_predict):
make model_fitting
# Produce tables and plots:
make results
For the covariance and example plots (automatically runs the
covariance_computation and example_computation targets first unless
the result files already exist:
make covariance_plots
make example_plots
Main location https://github.com/finnlindgren/spacetime-paper-code