This directory contains simple test inputs to test cprnc.

All comparisons can be run by running the run_tests script in the
parent directory. Suggestion: run this once from the baseline
directory, then once from the new directory; compare against baselines
by doing a directory diff of the two directories, or with, e.g.:

    baseline_out=/PATH/TO/BASELINE/OUTPUT
    new_out=/PATH/TO/NEW/OUTPUT
    for fl in $baseline_out/*; do echo $fl; diff -a $fl $new_out/`basename $fl`; done > diff_report

The files here are:

--- FILES COMPARED AGAINST control.nc ---

- copy.nc: copy of control file (i.e., no diffs)

- diffs_in_vals.nc: one variable has differences in values

- diffs_in_vals_and_extra_and_missing.nc: one variable has differences in
  values; also, one variable is missing and there is an extra variable. Purpose
  of this test is to make sure that this case is reported as a DIFFERENCE rather
  than just a warning due to the missing fields.

- diffs_in_fill.nc: one variable has differences in fill pattern

- diffs_in_vals_and_diffs_in_fill.nc: one variable has differences in
  values, another has differences in fill pattern

- diffs_in_vals_and_fill.nc: a single variable has differences in both
  values and fill pattern

- extra_variables.nc: has two extra variables beyond those in control.nc

- lon_differs.nc: number of longitude points differs

- missing_variables.nc: missing two variables that are present in control.nc

- vals_differ_by_1.1.nc: testvar has values equal to 1.1 times those
  in the control file. This is useful for testing the relative
  difference calculation.

  True values are the following (note that relative difference is
  defined using a denominator of max(v1,v2)):

  - RMS diff: 0.6204837 (printed as 6.2e-1)
  - avg rel diff: 0.0909091 (printed as 9.1e-2)
  - avg decimal digits: 1.041393 (printed as 1.0)
  - worst decimal digits: 1.041393 (printed as 1.0)

- vals_differ_by_1.1_somewhere.nc: similar to vals_differ_by_1.1.nc,
  but now only a single value differs by a factor of 1.1

  True values are the following (note that relative difference is
  defined using a denominator of max(v1,v2)):

  - RMS diff: 0.3162278 (printed as 3.2e-1)
  - avg rel diff: 0.009090909 (printed as 9.1e-3)
  - avg decimal digits: 1.041393 (printed as 1.0) [note that the
    average here ignores the indices with no difference]
  - worst decimal digits: 1.041393 (printed as 1.0)

- vals_differ_by_varying_amounts.nc: testvar has values equal to 1,
  1.01, 1.02, ..., 1.09 times those in the control file. This is
  useful for testing the relative difference calculation using more
  complex differences.

  True values are the following (note that relative difference is
  defined using a denominator of max(v1,v2)):

  - RMS diff: 0.4434862 (printed as 4.4e-1)
  - avg rel diff: 0.04233828 (printed as 4.2e-2)
  - avg decimal digits: 1.403306 (printed as 1.4) [note that the
    average here normalizes by 9 rather than 10, since the first index
    has a relative difference of 0]
  - worst decimal digits: 1.083184 (printed as 1.1)

- vals_differ_by_varying_amounts2.nc: First 8 values of testvar are
  identical to control; 9th is control * (1-1e-3), 10th is control *
  (1-1e-5). This is the same as the example given in ../README.

  True values are the following:

  - RMS diff: 0.002846226 (printed as 2.8e-3)
  - avg rel diff: 0.000101 (printed as 1.0e-4)
  - avg decimal digits: 4.0
  - worst decimal digits: 3.0

--- FILES COMPARED AGAINST control_int.nc ---

Note: This file is the same as control.nc, but stores the main variables
as integers rather than reals.

- int_missing.nc: A variable is missing. The point of this test is to
  cover code that resulted in https://github.com/ESMCI/cime/issues/3661.

--- FILES COMPARED AGAINST control_multipleTimes_someTimeless.nc ---

Note: This file has some variables with a time dimension, some
without. The time dimension has multiple times, in order to make sure
that the variables with vs. without the time dimension really are
treated differently. Also, a variable without time appears first, in
order to make sure that cprnc doesn't rely on there being a variable
with time first.

- multipleTimes_someTimeless_diffs_in_vals_and_fill.nc: one variable
  with a time dimension has differences in both values and fill
  pattern (in time 2); and one variable without a time dimension has
  differences in both values and fill pattern. The differences are the
  same for both variables (e.g., RMS errors should be the same for
  both).

- multipleTimes_someTimeless_extra_and_missing.nc: two timeless
  variables are missing and there is one extra timeless
  variable. Purpose of this test is to make sure that the results are
  reported as IDENTICAL when the only diffs in field lists are variables
  without an unlimited dimension (in a file that has an unlimited
  dimension).

--- FILES COMPARED AGAINST control_noTime.nc ---

Note: This file has no time (unlimited) dimension.

- noTime_diffs_in_vals_and_fill.nc: a single variable has differences
  in both values and fill pattern

- noTime_extra_and_missing.nc: two variables are missing and there is
  one extra variable. Purpose of this test is to make sure that even
  missing fields without an unlimited dimension trigger a DIFFER result
  if the file doesn't have an unlimited dimension to begin with.

--- FILES COMPARED AGAINST control_0d.nc ---

Note: This file has two 0-d variables

- diffs_0d.nc: diffs in both 0-d variables (int & real)


--- FILES COMPARED AGAINST cpl.hi.subset.control.nc ---

Note: This file is a subset of a standard cpl hist file (as of May, 2013).

- cpl.hi.subset.test.nc: some variables are the same, some differ


--- FILES COMPARED AGAINST clm2.h0.subset.control.nc ---

Note: This file is a subset of a standard clm hist file (as of May, 2013).

- clm2.h0.subset.test.nc: some variables are the same, some differ


--- FILES COMPARED AGAINST clm2.h1.subset.control.nc ---

Note: This file is a subset of a standard clm 1-d hist file
(dov2xy=false) (as of May, 2013). Note that it also includes two
times.

- clm2.h1.subset.test.nc: some variables are the same, some
  differ. Note that this includes identical & different integer
  variables, identical & different real-valued variables, and
  variables with different spatial dimensions (e.g., landunit, pft,
  and lat x lon).

--- FILES COMPARED AGAINST control_attributes.nc ---

Note: This file is like control.nc, but contains some global attributes

- diffs_in_attribute.nc: one global attribute is the same, one differs; in
  addition, one global attribute is missing, and there is a new one on this file
  that is not present on the control.nc file

--- FILES COMPARED AGAINST control_char.nc ---

Note: This file just has a character variable, in order to test what is output
for character variables (which cannot be analyzed).

- copy_char.nc: identical to control_char.nc
