Jablonowski and Williamson Baroclinic Instability Test

This test is used for several things:

****************************************************************
1.  Model assessment.  
****************************************************************

This test case is also used for evaluating the model.  This involves
full 30 day simulations at several different resolutions, with
PIO_INTERP output of ps and relative vorticity.  
See "baro.job"  for a sample script.  NCL scripts to plot the results
to mimic the J&W paper are is ps.ncl, zeta.ncl and steady.ncl

Example plots, from a run with NE=21, NP=4 and del^4 nu=2e15:

zeta.png    closeup of vorticty near instability at day 9
q1.png      tracer 1 in same region
q2.png      tracer 2 in same region



Note: all scripts referenced below have not been updated to use
HOMME's CMAKE build system and need work to get them to run.


****************************************************************
2.  Inviscid early time conservation properties
****************************************************************


For this, see the script debug.job and the reference output:
debug-tadv0.out:
   tadv=0, RK2 = 0  (LF dynamics, LF advection of Q)      
debug-sub3rk.out:
   tadv=1, RK2 = 1, qsplit=3  (RK dynamics, RK 2-stage advection of Q dp)   

to be more like the CAM defult, we should replace the above with
debug-sub4rk.out:
   tadv=1, RK2 = 1, qsplit=4, rk_stage_user=3  
   (RK dynamics, RK 3-stage advection of Q dp)   


The "reference" output was computed with nlev=26 (standard CAM3.0
eta coordinate levels), NE=2, NPTS=4, delt=180, running for 4 days
with no viscosity.  

Reference runs made on 4 cpus, Sandia Blackrose

For a quick debug check, look at the time = 4.0 days,
KE dissipation, Q1 dissipation and Q1^2 dissipation and
compare to the values in the *.out files above.
KE dissipation should agree to several digits.  Q1 dissipation
should be zero to machine precision.  Q1^2 dissipation should
agree to within 1 order of magnitude.  


                                                      

****************************************************************
3.  Debug Exact Restart Capability.   
****************************************************************

For this, see the script debug-restart.job.  We run the model
for 4 days, then restart from day 1 and run again to day 4.
The two runs, at day 4, should have identical output.
They should also be identical to debug-tadv0.out (for tadv=0) 
or debug-tadv1.out (for tadv=1) from the run below: 



****************************************************************
4.  Day 9 Conservation Properties
****************************************************************

This case was used to debug the dp/dn scaling of viscosity and
the viscous heating term.  

The script "energy-check.job" is used to run a convergence check
of the KE, IE and PE dissipation rates, and the tracer mass dissipation
rate.  The script will first run
a 9 day viscous simulation and output a restart file for day 9.
We then restart from this solution, run 3 timesteps and compute 
all the dissipation rates during the 3rd timestep.  

Results are given below.  High level summary follows:

(Q results are for advecting Qdp.  Advecting Q instead will
not change the dynamics and should have slightly worse conservation
properties on Q)

Branch restart with viscosity on IE and KE:
   1. Tracer mass exacty conserved
   2. PE dissipation close to rounodff (1.5e-12)
   3. Total energy dissipation rate goes to zero like dt^2.
      Computing the percent change in E for one timestep,
      we are already close to roundoff at dt=360:

                        % change in one timestep
         dt    dE/dt     ( dE/dt * dt / E(t) )
         360   .8e-5            1e-12
         180   .2e-5            1e-13
          90   .5e-6            2e-14
          45   .1e-6            2e-15
          15   .3e-7            2e-16
           5  -.3e-6            6e-16
           1  -.1e-5            4e-16


Branch restart with no viscosity:  we confirm the expected results:
   1. IE dissipation rates are at the level of roundoff.
   2. PE dissipation close to roundoff roundoff.  (1e-11)
   3. KE dissipation rate goes to zero as tstep**2
      (at dt=360, percent change in KE from dissipation is 1e-9)
   4. Tracer mass conserved to roundoff

Branch restart with viscosity on IE and Q only:
   1. PE dissipation rate is at the level of roundoff.  
   2. IE dissipation rate is close to roundoff.  (1.5e-12)
   3. KE dissipation rate goes to zero as tstep**2   (not checked)



==============================RESULTS==================================


NE=6
Reference run:   tstep=360  nu=nu_s=4e16  nu_p = 0

DAY=9 results
E=.262e10   (KE = .165e7  IE=.262e10 PE=.448e3  )

Percent change in energy for one timestep:
   ( E(t+1min)-E(t) ) / E(t)  =  (dE/dt) dt/E(t) = (dE/dt)  dt * 4e-10



                  DISSIPATION RATES  d/dt of:
          KE        IE         PE           E          Q     
       -.2809e-1  .2810e-1  -.7379e-12   .3309e-5    .1768e-13    blackrose 8 cpus 

Exact Restart (runtype=1)
       -.2843e-1  .2843e-1   .2354e-12   .2298e-5    .2526e-14    blackrose 8 cpus 

Hyperviscosity
Branch Restart (runtype=2)  nu = nu_s = 4e16  nu_p=0
dt
360    -.2843e-1  .2843e-1   .2595e-11    .8412e-5    .0000        blackrose 8 cpus 
180    -.2815e-1  .2815e-1   .1982e-10    .2080e-5    .5053e-14    blackrose 8 cpus 
 90    -.2801e-1  .2801e-1   .3788e-10    .5245e-6    .3032e-13    blackrose 8 cpus 
 45    -.2794e-1  .2794e-1  -.1192e-11    .1166e-6    .2021e-13    blackrose 8 cpus 
 15    -.2789e-1  .2789e-1   .1699e-9     .3179e-7   -.6063e-13    blackrose 8 cpus 
  5    -.2788e-1  .2788e-1  -.4839e-9    -.2861e-6    .0000        blackrose 8 cpus 
  1    -.2787e-1  .2787e-1  -.3277e-8    -.1431e-5    .0000        blackrose 8 cpus 


Hyperviscosty only on T,Q
Branch Restart (runtype=2)  nu_s = 4e16 nu = nu_p = 0
360     .5367e-5  .2345e-8  -.2841e-11               .0000e-13     blackrose 8 cpus 


No Viscosity
Branch Restart (runtype=2)  nu = nu_s = nu_p = 0
360     .5280e-5  .7003e-9  -.1619e-10               .1010e-13     blackrose 8 cpus 
180     .1442e-5  .9449e-8  -.2581e-10               .1010e-13     blackrose 8 cpus 
 90     .3789e-6  .5988e-9  -.9933e-11
 45     .9704e-7 -.1640e-7   .9587e-11 
 15     .1096e-7  .3520e-7  -.2650e-10
  5     .1223e-8 -.4563e-6   .6158e-9
  1     .2707e-9  .7260e-6  -.1201e-8                .2728e-11 


