############################################################### ############################ WELCOME ########################## ############################################################### This readMe file accompanies a Zenodo repository associated to a submitted publication to Nature Communications entitled "A 1150-year-long AMV reconstruction suggests early warning for a North Atlantic climate tipping point", and is under review. Please cite this Zenodo repository if using any of the scripts or data for research purposes. It is advised to correctly follow the steps and recommendations from this readMe file. PART I is a file description, PART II gives the steps to follow to reproduce the study. Note that the reader can greatly simplify the reproducibility of this study by downloading the free open-source Rstudio software: https://rstudio.com The user need an UNIX environment to run these codes. These codes have been partly ran by the author using large computing capacities and therefore use the call of bash jobs submission commands, assuming that the user is able to do the same ############################################################### ############################# PART I ########################## ############################################################### - all_proxies2.csv: Annually-resolved proxy records from the PAGES2k database + 41 other records - all_proxies3.csv: Annually-resolved proxy records from the PAGES2k database + 41 other records Where the correlation with instrumental data is significant at least at the 95% cone level - AMV_???.csv: AMV indices as calculated for CESM1-LME members 002 to 013. - AMV_???.csv: Instrumental (since 1870 C.E.) AMV indices as calculated for CESM1-LME members 002 to 013. - calc_AMV_indices_E1.R: Calculates the three historical AMV indices of this study as well as the NASST index. This code also produce Extended Data Fig. 1. - ClimIndRec1.1_amv_???.r: Main scripts for PPE proxy-to-model analyzes for CESM1-LME members 002 to 013. - ClimIndRec1.1_amv_???i.r: Main scripts for PPE model-to-proxy analyzes for CESM1-LME members 002 to 013. - ClimIndRec1.1_amv.r: Main script for any reconstruction of historical indices - coords_pages_v2.csv: Coordinates and types of the PAGES 2k proxy records - coords.txt: Coordinates and types of the 41 additional proxy records - cor_AMV_xx_YY(Y).csv: Matrix of significant regression coefficients between the AMV and the variable xx for the temporal averages YY(Y). xx can be "pr" (precipitation) or "ts" (temperatures). YY(Y) can be DJF (winter), MAM (spring), JJA (summer), SON (autumn) or ye (annual). These files are obtained by running codes following PART II. - cruts_xx_YY(Y).nc: CRUTS4 data obtained from source data using cdo commands (yearmean, seasmen...). xx and YY(Y) denotes the same as the last point. xx, precipitation are however denote "pre" and temperatures are denoted "tmp". - db_proxies.txt: Database of all proxies from PAGES 2k 2013 - db_proxies2.txt: Database of all proxies from PAGES 2k 2017 - Fig_S2.r: Code to produce Extended Data Fig. 2 and subsequent analyzes. - Fig1_2_3_E3.r: Code to produce Fig. 1, 2, 3 and Extended Data Fig. 3 and subsequent analyzes. - Fig4.r: Code to produce Fig. 4 and subsequent analyzes. - Fig5.r: Code to produce Fig. 5 and subsequent analyzes. - Fig6_7_E4_E5.r: Code to produce Fig. 6, 7 and Extended Data Fig. 4 and 5 and subsequent analyzes. - Forcing_Millennium_LMCMP5_0850_1999.nc: Data file containing PMIP3 volcanic and TSI forcings. - globsst_actual.csv: Global mean SST between 0° and 60°N. - HadISST_sst_ye.nc: Annually-averaged HadISST data. - HadISST_sst.nc: HadISST data. - install_pkgs.r: Script to install the R packages needed. - make_mat_PPE_full.R: Script to calculate the pseudo-proxy matrices for the 12 CESM1-LME members - make_mat_PPE.R: Script to calculate the pseudo-proxy matrices for the 12 CESM1-LME members, but only over the instrumental period (since 1870 C.E.) - make_sst_ppe.r: Script to calculate the AMV within the 12 CESM1-LME members - mat_cor_proxy_hist.csv: Matrix giving the season and the climate variable targeted by each proxy record. - mat_PPE_???.csv: Matrix of the pseudo-proxies for CESM1-LME members 002 to 013. Over the historical period only. - mat_PPE_full_???.csv: Matrix of the pseudo-proxies for CESM1-LME members 002 to 013. Over the whole simulation period (since 850 C.E.). - nasst_F.csv: Indice AMV_F - nasst_had.csv: Indice NASST - nasst_T.csv: Indice AMV_T - nasst_TSM.csv: Indice AMV_TS - P2k+_complete.csv: All proxies from PAGES 2k 2017 (including low-resolution ones) and the 41 proxy records added. - params.txt: Input parameter file for the reconstruction code. - pc1.csv: 1st principal component of historical NASSTs simulated by 37 climate models. It is the signal-to-noise maximizing EOF. - PR_???_1x1_YY(Y).nc: 1x1 precipitation (PR) matrices of each CESM1-LME members 002 to 013. YY(Y) can be DJF (winter), MAM (spring), JJA (summer), SON (autumn) or ye (annual). Data have been obtained from source data using cdo commands (yearmean, seasmen...) from the source data. - readMe.txt: The present file. - rec_fin.csv: Final AMV reconstruction. - rec_NASST.txt: Final NASST reconstruction. - run_all_nr.sh: Script to run 84 initial NASST reconstructions to compare. - run_all.sh: Script to run the 312 inital AMV reconstructions to compare. - run_nest_???_inv.sh: Script to run the nested AMV reconstruction of the PPE model-to-proxy analyzes for CESM1-LME members 002 to 013. - run_nest_???.sh: Script to run the nested AMV reconstruction of the PPE proxy-to-model analyzes for CESM1-LME members 002 to 013. - run_nest_nr.sh: Script to run the nested NASST reconstruction. - run_nest.sh: Script to run the nested AMV reconstruction. - score_by_index.csv: Matrix of scores obtained for each AMV index. - score_by_meth.csv: Matrix of scores obtained for each regression method. - score_by_window.csv: Matrix of scores obtained for each time frame for learning. - seasons_proxies.R: Calculate the season related to each proxy record from CRUTS4 data. - set_root_directory.sh: Set the working directory for running codes - SST_???_1x1_YY(Y).nc: 1x1 sea surface temperature (SST) matrices of each CESM1-LME members 002 to 013. YY(Y) can be DJF (winter), MAM (spring), JJA (summer), SON (autumn) or ye (annual). Data have been obtained from source data using cdo commands (yearmean, seasmen...) from the source data. - study_index.r: Calculate scores by AMV index. - study_index.r: Calculate scores by regression method. - study_recs.r: Script to check which of the 312 initial AMV reconstructions has the higher score. - study_index.r: Calculate scores by time frame for learning. - TS_???_1x1_YY(Y).nc: 1x1 surface temperature (TS) matrices of each CESM1-LME members 002 to 013. YY(Y) can be DJF (winter), MAM (spring), JJA (summer), SON (autumn) or ye (annual). Data have been obtained from source data using cdo commands (yearmean, seasmen...) from the source data. ############################################################### ############################# PART I ########################## ############################################################### Please, strictly follow these steps. Since files needed for some will be created by former ones. 1 - Set the root directory i) Please put all files in the same directory /user/root/directory ii) Open terminal and run ./set_root_directory.sh /user/root/directory iii) This will set the user directory /user/root/directory in all the scripts so it can now be ran locally by the user. iv) From now to the end, always stay in the root directory from your terminal and Rstudio. 2 - Install all R packages i) From terminal, use the command 'Rscript install_pkgs.r'. 3 - Calculate AMV indices i) Open Rstudio ii) From Rstudio, open "calc_AMV_indices_E1.R" iii) From the script frame, press Cmd+A to select all the text and then Cmd+Enter to run the code. 4 - Submit jobs for the initial 312 reconstructions i) From terminal, use the command "./run_all.sh" 5 - Once the jobs from 4 are completed, verify the optimal reconstruction i) From terminal, use the command "Rscript study_recs.r" ii) The optimal setup will be printed in the terminal 7 - Submit jobs to perform the nested reconstruction 8 - Once the jobs from 7 are completed, prepare files for PPEs i) Open Rstudio ii) From Rstudio, open "make_sst_ppe.r" iii) From the script frame, press Cmd+A to select all the text and then Cmd+Enter to run the code. iv) From Rstudio, open "make_mat_PPE.r" v) From the script frame, press Cmd+A to select all the text and then Cmd+Enter to run the code. vi) From Rstudio, open "make_mat_PPE_full.r" vii) From the script frame, press Cmd+A to select all the text and then Cmd+Enter to run the code. 9 - Launch the proxy-to-model PPE i) Run ONE BY ONE the 12 scripts run_nest_002.r to run_nest_013.r, using the commands "./run_nest_002.sh" to "./run_nest_013.sh". Wait that all jobs from run_nest_002.r have been submitted (not completed) to submit those from run_nest_003.r, and so on. 10- Once the jobs from 9 are completed, proceed to the model-to-proxy PPE i) Run ONE BY ONE the 12 scripts run_nest_002_inv.r to run_nest_013_inv.r, using the commands "./run_nest_002_inv.sh" to ". run_nest_013_inv.sh". Wait that all jobs from run_nest_002_inv.r have been submitted (not completed) to submit those from run_nest_003_inv.r, and so on. 11 - Once the jobs from 10 are completed, make figures 1) Open Rstudio 2) From Studio, open "Fig_S2.r", "Fig1_2_3_E3.r", "Fig4.r", "Fig5.r", and "Fig6_7_E4_E5.r". They will be opened in different tabs in the Rstudio script frame. 3) Browse one by one the tabs in the same file order than in 2, and do Cmd+A and then Cmd+Enter for each of them (this will run them). It might take about 20 minutes to get all these scripts ran. 4) Repeat 3 (strange but needed).