This repositary contains python code and notebooks to accompany the manuscript "Ocean Heat Content responses to changing Anthropogenic Aerosol Forcing Strength: regional and multi-decadal variability" Boland et al 2023. The contents will allow for the reproduction of all tables and figures in the paper, as well the reproduction of the data files necessary for the figures. See below for more details.
Feel free to use or reproduce the code and figures but please attribute as outlined in the license.
For more details on the SMURPHS ensemble, see Dittus et al. 2020 (https://doi.org/10.1029/2019GL085806)
E Boland Jun 2023 [email protected]
To reproduce the paper's figures and tables:
- Cartopy==0.17.0
- cftime==1.0.3.4
- matplotlib==3.0.2
- numpy==1.15.4
- scikit_learn==1.1.3
- scipy==1.1.0
- xarray==0.11.0
To reproduce the data from model output:
- dask==1.0.0
- numpy==1.15.4
- pandas==0.23.4
- pyresample==1.16.0
- scipy==1.1.0
- statsmodels==0.9.0
- xarray==0.11.0
To reproduce the paper's figures and tables, follow these steps:
- Download the data required for the figures from the Figshare repository https://figshare.com/articles/dataset/data_in/19281761 and place in a directory named 'data_in'. Which data is required for which figures is listed below. Alternatively this data can be re-generated from the original model output using the python files in the code directory - see "Steps to reproduce the paper's analysis from model output".
- Install necessary libraries (see requirements above or figure_notebooks/requirements.txt).
- Clone the figure_notebooks directory into the same directory that contains 'data_in'.
- Run the notebooks.
To reproduce the figures, the notebooks will look for the following directories/files in a directory called 'data_in':
- Figure 1 & Table 2: ohc_tseries, pic_data, other_model_data
- Figure 2: ohc_tseries, pic_data, other_model_data
- Figure 3: ohc_trends
- Figures 4, S2, S3: ohc_xy
- Figures 5, S4-S7: ohc_yz
- Figure 6: ohc_xy
- Figure 7: ohc_yz, other_model_data
- Figure S1: pic_data
- Figure S8: amoc_tseries
- Figure S9: SIE_SH.nc
To reproduce the data files required to produce the figures, follow these steps:
- Access the model output: details coming
- Install necessary libraries (see requirements above or code/requirements,txt)
- Clone the code directory code which containts python code to create the data for the figures. Automatically writes to ../data_in/. See below for further details for which scripts write to which sub-directories.
- Run the python scripts.
The data files themselves are written to '../data_in' using the python scripts in code as follows, listed by sub-directory:
- ohc_tseries: ohc_by_basin_depth.py
- pic_data: ohc_by_basin_depth_pic.py, ohc_pic_drift.py, ohc_xy_pic_drift.py, ohc_yz_pic_drift.py, ohc_xy_pic.py, ohc_yz_pic.py
- ohc_trends: ohc_weightedtrends_obs.py, ohc_trends.py
- ohc_xy: ohc_xy.py, ohc_xy_trends.py
- ohc_yz: ohc_yz.py, ohc_yz_trends.py
- amoc_tseries: calculate_AMOC.py
- SIE_SH.nc : calc_SH_SIE.py