Skip to content

E3SM-Project/sta-imex

Repository files navigation

Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC (NTESS). 
Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC (NTESS)

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



%%%%%%%%%%%%%%% README

plot_omega is used to plot eigenvalues of spatial discretizations \omega. 
This plot will have 3 branches of waves. 

If custom number of vertical levels is used (not 20, 72, or 128), 
then first one needs to 
run findHommeDispersion to find solutions m of eqn tan(m*D)=2*m/(B-A) .
These m values need to be recorded in script kvals_load .
Script findHommeDispersion also solves for analytical values \omega 
for 3 branches of waves 
(by solving quintic eqn numerically). 
One can adjust that script for analytical branches as solutions for \omega 
depend on initial interval (the script is set for 20 levels, not 72 or 128).

plot_stability plots (T_x,dt) white-blue stability plot for a particular 
IMEX scheme for system of normal modes. 
By default for horizontal wavenumber k it takes 2dx wave
and it uses homme conventions to denote hor. resolutions.

lock_plotting_courant_axes plots stability diagram using acoustics-gravity system as
in Lock2014 with relations of Courant numbers for axes.

lock_plotting_new plots stability diagram using acoustics-gravity system as
in Lock2014 with (T_x,dt) for axes.

IMEX methods and auxiliary functions are in folder IMEXfunctions.

dispersion_dissipation4 is used to plot amplification factors and numerical
\omega for IMEX method based on spatial discretizetion as in plot_omega. 
Before using dispersion_dissipation4, one needs to save spatial discretization
(by running plot_omega) for desired vertical levels.
For dispersion/dissipation plots, download 
Cao, Y.: Munkres Assignment Algorithm, https://www.mathworks.com/matlabcentral/fileexchange/20328-munkres-assignment-algorithm

 
plot_omega, dispersion_dissipation4, and save_5wave... use original value 
of horizontal wavenumber k, as in TW2005
(but this can be changed).

nlev_convergence plots stability diagrams for varying dz.