Published February 3, 2023 | Version v1.0.0
Dataset Open

Global OCpetro Oxidation: data, code and environments

  • 1. University of Oxford
  • 2. EDYTEM-CNRS-University Savoie Mont Blanc (USMB)
  • 3. Durham University

Description

A repository of data files, code and python/R environments for the manuscript "Rock organic carbon oxidation CO2 release offsets silicate weathering sink" by Jesse R. Zondervan, Robert G. Hilton, Mathieu Dellinger, Fiona J. Clubb, Tobias Roylands, Mateja Ogrič.

This repository contains an Excel file and several zip files.

Zip files containing code, data and python environment to run a simulation of the Global OCpetro Oxidation model:

  • River rhenium (Re) and OCpetro oxidation data: Supplementary Tables.xlsx
  • Code only: Global_OCpetro_Oxidation-v1.1.0.zip (uploaded Github repository)
  • Geospatial data files only: input_global_(data files only).zip
  • Python environment only: ocpetro_oxidation_env.zip
  • Code, data and environment: ocpetro_oxidation_code_data_env.zip

Outputs of the model presented in the manuscript:

  • Geospatial raster files of Fig 1:
    • Re sample locations shapefile (panel A): Re_sample_locations.zip
    • Re sample catchment shapefile (panel A): Re_sample_catchments.zip
    • Median OCpetro stocks model (panel B): Output_OCpetro_stock_median.zip
    • Median denudation model (panel C): Output_denudation_median.zip
    • Best-fit OCpetro oxidation extrapolation (panel D): Output_OC_petro_oxidation.zip

Denudation and OCpetro stock subroutines (for transparency only, not needed to run OCpetro oxidation simulation):

  • Code, data and R environment (python environment from ocpetro_oxidation_env.zip, see above): Submodels_code_data_Renv.zip

The easiest way to run the code is by downloading the zip file containing code, data and environment, and then unpacking using packages provided by the OS, or by running the 'anaconda-project unarchive' command. Instructions for this can be found by searching for anaconda-project online, or directly via https://anaconda-project.readthedocs.io/en/latest/user-guide/tasks/create-project-archive.html?highlight=unarchive#extracting-the-archive-file [last accessed 26/01/2023]

The code was developed in a python environment detailed in anaconda-project.yml, with every recursive dependency down to the individual build in anaconda-project-locked.yml. The code file is "Glob_newmethod_parr_globalresidual.py" in this repository.

This code should be reproducible indefinitely, without depending on online package repositories. Both the commands and the environment have been captured into a fully locked anaconda project with all conda packages unpacked and included using anaconda-project --pack-envs. Note that only packages for running the code on Linux can be unpacked in this way; building on other platforms (Windows, Mac) will still require access to repositories. 

 

Notes:

This code was run on an HPC environment with a job submitter called SLURM. As such, the code will run according to a slurm job array with numbers from 1-100 (10,000 monte carlo simulations). The command to run the Monte Carlo simulation as 10,000 seperate jobs is done like this: "sbatch --array=1-10000:1 job_script_file_name.sh". Note that the version of code uploaded here is set to run 100 simulations ("sbatch --array=1-100:1 job_script_file_name.sh"). When running 10,000 simulations, please change line 46 to "quantile = float(os.getenv('SLURM_ARRAY_TASK_ID'))/10000."

Whilst it is possible to run this code on a single machine such as a personal computer, the user is warned that it takes 24 core hours per simulation to run. For example, a typical 4-core laptop would need 6 hours to run one simulation. Now calculate how many 10,000 would take...

To run one simulation, line 46 ("quantile = float(os.getenv('SLURM_ARRAY_TASK_ID'))/100.") can be replaced with ("quantile = float(number between 0 and 1)"). Outputs will be saved for each simulation, which can rack up a lot of space, unless you specifically put in lines to delete these from the disk, or, in the case of the example job script for HPC usage, exclude the files when moving data from the node that ran the job.

 

Example:

sbatch --array=1-100:1 run_Glob_OCpetro_model.sh #note that this runs 100 simulations.

An example of a job script file has been appended. Please note that the details of this job script depend on your machine or HPC system. Please consult your HPC support or platform's (Linux, Mac, Windows) command prompt instructions.

Files

Global_OCpetro_Oxidation-v1.1.0.zip

Files (7.2 GB)

Name Size Download all
md5:ec1880ccf0cfb5e8a61b2055f7982162
24.1 kB Preview Download
md5:03ed6c72e7228d145ae91d4f5652fc33
2.6 GB Preview Download
md5:c91e1adf9e7ff9766ef162b0b3546b7e
13.1 kB Preview Download
md5:918f4a33baeec4a9dd3f416b8146a55c
3.3 GB Preview Download
md5:4f278e02fa9a8882beebd0d0b36057cb
640.1 MB Preview Download
md5:c91ddae366ed03ec8968d8936cb129bc
104.6 MB Preview Download
md5:cdc1314d4e48c37845295b80da23f754
207.7 MB Preview Download
md5:5b92ff78acccc98113407508167bd803
74.3 MB Preview Download
md5:d1641e4cdb5846cfcf4ca258e3a5111b
5.5 MB Preview Download
md5:f450af9a4deeca0f8c930af70c46b9bb
13.0 kB Preview Download
md5:32e1bb792d2cf6b99d2384bf31d07a6e
297.4 MB Preview Download
md5:45bb69bae76b3c89e6ed339c141b62ac
89.8 kB Download

Additional details

Funding

European Commission
ROC-CO2 - Carbon dioxide (CO2) emissions by rock-derived organic carbon oxidation 678779