# Testing reference values and precisions
# Each test block of varr and parr should be followed by an append to refVals, refPrecs arrays.
# e.g.
#   refVals=[]
#   refPrecs=[]
#
#   varr = ..........
#   par  = ..........
#
#   append!(refVals ,[ varr ] )
#   append!(refPrecs,[ parr ] )
#
#   varr = ..........
#   par  = ..........
#
#   append!(refVals ,[ varr ] )
#   append!(refPrecs,[ parr ] )
#
#   varr = ..........
#   par  = ..........
#
#   append!(refVals ,[ varr ] )
#   append!(refPrecs,[ parr ] )
#
#   etc.....
#
#   Now for real!
#
#! format: off

    refVals=[]
    refPrecs=[]

# SC ========== Test number 1 reference values and precision match template. =======
# SC ========== /home/cnh/projects/cm/experiments/OceanBoxGCM/ocean_gyre.jl test reference values ======================================
# BEGIN SCPRINT
# varr - reference values (from reference run)
# parr - digits match precision (hand edit as needed)
#
# [
#  [ MPIStateArray Name, Field Name, Maximum, Minimum, Mean, Standard Deviation ],
#  [         :                :          :        :      :          :           ],
# ]
varr = [
 [       "Q",   "u[1]", -7.88803234115370288659e-02,  6.54328011157667283060e-02,  2.01451525264660777012e-03,  1.24588716783015467093e-02 ],
 [       "Q",   "u[2]", -8.71605274310934263760e-02,  1.47505267452495314462e-01,  5.63158201082454307890e-03,  1.28959719954838437916e-02 ],
 [       "Q",       :η, -4.73491408441974459542e-01,  4.02693687285993751068e-01, -6.49059970676089264836e-05,  2.21689928090662985438e-01 ],
 [       "Q",       :θ,  4.24292935192304451839e-04,  9.24539353455580759089e+00,  2.49938206627401893201e+00,  2.17986626392490689952e+00 ],
 [   "s_aux",       :y,  0.00000000000000000000e+00,  4.00000000000000046566e+06,  1.99999999999999976717e+06,  1.15573163901915703900e+06 ],
 [   "s_aux",       :w, -2.22086406767055965930e-04,  2.00575090959195941574e-04,  2.53168866096191178104e-07,  1.66257132341925427171e-05 ],
 [   "s_aux",    :pkin, -9.00869877619915215838e-01,  0.00000000000000000000e+00, -3.33171488779369640021e-01,  2.54740287894525019308e-01 ],
 [   "s_aux",     :wz0, -2.96608015794916532427e-05,  3.66759042312538147113e-05,  3.78116102589123325624e-10,  1.07073256826409470244e-05 ],
 [ "s_gflux", "ν∇u[1]", -1.98765276856145908790e-02,  1.92976912753076192131e-02,  9.31995586073550077850e-09,  2.84016926475062683050e-04 ],
 [ "s_gflux", "ν∇u[2]", -8.60188027210821715141e-03,  2.03898608650850965418e-02,  1.44279862042391183595e-05,  7.01831343135553482361e-04 ],
 [ "s_gflux", "ν∇u[3]", -2.36999031942582461820e-05,  3.39171933774427215489e-05,  1.79310417841609871239e-08,  3.03350466717279338539e-06 ],
 [ "s_gflux", "ν∇u[4]", -3.27811105688537093861e-02,  3.33776923250933485465e-02, -8.41954909635648634245e-06,  9.93067541524441646170e-04 ],
 [ "s_gflux", "ν∇u[5]", -3.19705003898926379269e-02,  3.94072309121676778859e-03, -2.09915474589233714674e-06,  4.56596518968874199012e-04 ],
 [ "s_gflux", "ν∇u[6]", -3.84552825296212839770e-05,  3.30579003830798668533e-05, -6.85753430789401392363e-08,  3.41712910764070301712e-06 ],
 [ "s_gflux", "κ∇θ[1]", -1.90663030661463762938e-03,  1.59419367775516821958e-03, -2.07346812692515548133e-05,  1.38241222633447261199e-04 ],
 [ "s_gflux", "κ∇θ[2]", -1.17846832845764997420e-03,  3.03333905110560143534e-03,  9.95380871168155762288e-04,  8.10649417649871592909e-04 ],
 [ "s_gflux", "κ∇θ[3]", -1.91676759182478058212e-05,  6.14879473708830387359e-05, -4.12675761035662034755e-07,  1.91038619046619808554e-06 ],
]
parr = [
 [       "Q",   "u[1]",    12,    12,    12,    12 ],
 [       "Q",   "u[2]",    12,    12,    12,    12 ],
 [       "Q",       :η,    12,    12,    12,    12 ],
 [       "Q",       :θ,    12,    12,    12,    12 ],
 [   "s_aux",       :y,    12,    12,    12,    12 ],
 [   "s_aux",       :w,    12,    12,    12,    12 ],
 [   "s_aux",    :pkin,    12,    12,    12,    12 ],
 [   "s_aux",     :wz0,    12,    12,     8,    12 ],
 [ "s_gflux", "ν∇u[1]",    12,    12,     8,    12 ],
 [ "s_gflux", "ν∇u[2]",    12,    12,    12,    12 ],
 [ "s_gflux", "ν∇u[3]",    12,    12,    12,    12 ],
 [ "s_gflux", "ν∇u[4]",    12,    12,    12,    12 ],
 [ "s_gflux", "ν∇u[5]",    12,    12,    12,    12 ],
 [ "s_gflux", "ν∇u[6]",    12,    12,    12,    12 ],
 [ "s_gflux", "κ∇θ[1]",    12,    12,    12,    12 ],
 [ "s_gflux", "κ∇θ[2]",    12,    12,    12,    12 ],
 [ "s_gflux", "κ∇θ[3]",    12,    12,    12,    12 ],
]
# END SCPRINT
# SC ====================================================================================

    append!(refVals ,[ varr ] )
    append!(refPrecs,[ parr ] )

# SC ========== Test number 2 reference values and precision match template. =======
# SC ========== /home/cnh/projects/cm/experiments/OceanBoxGCM/ocean_gyre.jl test reference values ======================================
# BEGIN SCPRINT
# varr - reference values (from reference run)
# parr - digits match precision (hand edit as needed)
#
# [
#  [ MPIStateArray Name, Field Name, Maximum, Minimum, Mean, Standard Deviation ],
#  [         :                :          :        :      :          :           ],
# ]
varr = [
 [       "Q",   "u[1]", -3.08415268094245687003e-01,  3.31683879748177812274e-01,  2.34355645025035056947e-03,  1.38278493625595393784e-02 ],
 [       "Q",   "u[2]", -9.30330187375882494694e-02,  1.45773331490709479041e-01,  6.38739141648009701308e-03,  1.38107523198905141754e-02 ],
 [       "Q",       :η, -4.60215148246349181615e-01,  3.97155090993862369686e-01, -1.05814653709044253051e-04,  2.14356824554893188317e-01 ],
 [       "Q",       :θ,  3.90305009874997816885e-04,  9.28488770009523101123e+00,  2.49938688339290848717e+00,  2.17986650147491722862e+00 ],
 [   "s_aux",       :y,  0.00000000000000000000e+00,  4.00000000000000046566e+06,  1.99999999999999976717e+06,  1.15573163901915703900e+06 ],
 [   "s_aux",       :w, -2.65432487944419423249e-04,  2.51335486222488370053e-04,  3.34985017281366756292e-07,  1.98256782258218657716e-05 ],
 [   "s_aux",    :pkin, -9.01203660410079376852e-01,  0.00000000000000000000e+00, -3.33173652152760846334e-01,  2.54737286187841360796e-01 ],
 [   "s_aux",     :wz0, -3.16776291712146345464e-05,  3.89428424525183031852e-05,  4.05688221636862481177e-10,  1.10561449663397378925e-05 ],
 [ "s_gflux", "ν∇u[1]", -6.91411158656193985950e-02,  6.71894067927724242262e-02,  1.93151282317531301526e-08,  3.67871498890457999768e-04 ],
 [ "s_gflux", "ν∇u[2]", -6.41072589623675609394e-02,  5.93158959821227672188e-03, -1.72612717858599068401e-05,  1.09370391833557892812e-03 ],
 [ "s_gflux", "ν∇u[3]", -7.40852152420143496942e-05,  7.70630509235797829829e-05,  1.94096112473072846645e-08,  3.35721658566900582726e-06 ],
 [ "s_gflux", "ν∇u[4]", -2.77618725100101104708e-02,  2.76053769492804849939e-02,  8.37000168929151316390e-06,  1.04649435866464054871e-03 ],
 [ "s_gflux", "ν∇u[5]", -3.57980327012049140412e-02,  4.20082014423407961584e-03, -2.26270579934147913334e-06,  5.16063361553070450508e-04 ],
 [ "s_gflux", "ν∇u[6]", -3.87729590851969090591e-05,  3.38326906830031177748e-05, -7.64232106453937395084e-08,  3.42855062975519724920e-06 ],
 [ "s_gflux", "κ∇θ[1]", -2.63114521554794764460e-03,  3.13139570197398927828e-03, -2.58270397697685688597e-05,  1.80489106756528977114e-04 ],
 [ "s_gflux", "κ∇θ[2]", -4.29150657020392189284e-03,  3.20181945576268351533e-03,  9.94194034856019440149e-04,  8.13274467049271117605e-04 ],
 [ "s_gflux", "κ∇θ[3]", -3.08119171379054497821e-05,  9.12508944783092335127e-05, -4.12575332587978521639e-07,  1.92043362474637987870e-06 ],
]
parr = [
 [       "Q",   "u[1]",    12,    12,    12,    12 ],
 [       "Q",   "u[2]",    12,    12,    12,    12 ],
 [       "Q",       :η,    12,    12,    12,    12 ],
 [       "Q",       :θ,    12,    12,    12,    12 ],
 [   "s_aux",       :y,    12,    12,    12,    12 ],
 [   "s_aux",       :w,    12,    12,    12,    12 ],
 [   "s_aux",    :pkin,    12,    12,    12,    12 ],
 [   "s_aux",     :wz0,    12,    12,     8,    12 ],
 [ "s_gflux", "ν∇u[1]",    12,    12,     8,    12 ],
 [ "s_gflux", "ν∇u[2]",    12,    12,    12,    12 ],
 [ "s_gflux", "ν∇u[3]",    12,    12,    12,    12 ],
 [ "s_gflux", "ν∇u[4]",    12,    12,    12,    12 ],
 [ "s_gflux", "ν∇u[5]",    12,    12,    12,    12 ],
 [ "s_gflux", "ν∇u[6]",    12,    12,    12,    12 ],
 [ "s_gflux", "κ∇θ[1]",    12,    12,    12,    12 ],
 [ "s_gflux", "κ∇θ[2]",    12,    12,    12,    12 ],
 [ "s_gflux", "κ∇θ[3]",    12,    12,    12,    12 ],
]
# END SCPRINT
# SC ====================================================================================

    append!(refVals ,[ varr ] )
    append!(refPrecs,[ parr ] )

#! format: on
