5/31/21: Notes specific to the table generation data and code:

This directory (tables/) contains the data and code necessary to generate the tables of MDG21. Including this readme, there are 12 files total:

1 Text (*.txt) file
7 MATLAB script/function (*.m) files
2 MATLAB data (*.mat) files
1 PDF (*.pdf) file
1 LaTeX (*.tex) file

Note that the MATLAB script workflow is ultimately supposed to generate a PDF output file. To do this, pdflatex needs to be available on the system and accessible to MATLAB via the command at line 331 of mars_T_U_statistical_tables_vA.m. Alternatively, the intermediate *.tex file that this script generates can be compiled separately by other means.

Let's describe the *.m files first:

toplevel_table_script.m: Invokes one or two of the other MATLAB scripts
     to generate the tables. The table generation script is
     mars_T_U_statistical_tables_vA.m, and it requires
     mars_T_U_statistical_analyses_A.mat as input. This *.mat file
     can be generated in one of two ways:
     1) Just copying mars_T_U_statistical_analyses_040421.mat
     2) Running mars_T_U_statistical_analyses_A.m
     The latter method is *much* more time-consuming (hours, rather
     than seconds). The former method is default, but this can be
     changed by revising line 6 of toplevel_table_script.m. The
     reason both options are offered is that option 1 is really
     just a formatting of the data in mars_T_U_statistical_analyses_
     040421.mat into human-readable and paper-insertable tables. In
     contrast, option 2 actually *performs* the statistical analyses
     and the reader can inspect mars_T_U_statistical_analyses_A.m to
     see how it is done.

mars_T_U_statistical_analyses_A.m: Performs the data analysis underlying
     the tables. The input file mars_T_U_RMS_errors_040421.mat
     contains information about root-mean-square differences between
     the various reanalysis and GCM three-dimensional monthly mean
     states. Results are written to mars_T_U_statistical_analyses_A.mat.

make_ineq_tables_091120.m
make_S_null_distrib_091120.m
make_Sobs_pvals_091220.m
make_conv_pvals_091220.m: These four MATLAB functions are needed by
     mars_T_U_statistical_analyses_A.m.

mars_T_U_statistical_tables_vA.m: Somehow the results of the statistical
     analyses need to be moved from mars_T_U_statistical_analyses_A.mat
     into the paper itself without introducing errors. mars_T_U_statistical_
     tables_vA.m facilitates this task by reading in the aforementioned
     *.mat file and then rewriting it to a (text) file as LaTeX-formatted
     tables which can then be directly copied and pasted to the paper.
     This output file is called mars_T_U_statistical_tables_vA.tex. It is
     itself a valid LaTeX file, so mars_T_U_statistical_tables_vA.m also
     attempts to compile it to a human-readable PDF (mars_T_U_statistical_
     tables_vA.pdf).

Now the *.mat files:

mars_T_U_RMS_errors_040421.mat: Input file to mars_T_U_statistical_analyses_
    A.m--not actually used if we run toplevel_table_script.m in its default
    form. See above for further description.

mars_T_U_statistical_analyses_040421.mat: File containing the data underlying
    the tables of the paper. Copied to mars_T_U_statistical_analyses_A.mat
    and then used by mars_T_U_statistical_tables_vA.m if toplevel_table_
    script.m is run in its default form, otherwise ignored.

And the *.tex, *.pdf, and *.txt files:

mars_T_U_statistical_tables_v1.tex: LaTeX file containing formatted tables of
    statistical results for the paper. (The relevant tables from this file
    were copied and pasted into the *.tex file used to generate the paper.)
    This file should match the output mars_T_U_statistical_tables_vA.tex
    almost exactly: the only difference should be in a single line stating
    the name of the script that generated the *.tex file.

mars_T_U_statistical_tables_v1.pdf: PDF compiled from mars_T_U_statistical_
    tables_v1.tex. Tables 1, 5, 3, and 7 of this PDF correspond to Tables
    1, C1, B1, and B2 of the paper. The other six tables (2, 4, 6, and 8-10)
    provide information about how the results change if "EMARS reanalysis"
    is defined as the 1-hour background forecasts instead of the actual
    analyses (Tables 2, 4, 6, and 8) or the number of random draws used to
    define the S null distribution is raised from 10^6 to 10^7 (Tables 9-10).

readme_tables.txt: This readme file. 
