% Created by Daniel Burtch
% Last Updated: March, 2019 (Mariusz)
% University of North Dakota
% 
%
%
% This TeX template  follows the formatting guide for Thesis and Dissertations for the 
% University of North Dakota School of Graduate Studies
%
% Old versions tested on the following Operating Systems:
% Mac OS X 10.9
% Mac OS X 10.6.8 (Mariusz)
% Windows 7 Professional
% Windows 8 (Emily)
% New Version:
% Windows 10 (Mariusz)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PREAMBLE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Title of Thesis/Dissertation%%
\newcommand{\mytitle}{Thesis Title Goes Here}
\newcommand{\degree}{\ensuremath{^\circ}}
\documentclass[12pt]{report}

\usepackage{titlesec}
\usepackage{array}
\usepackage{float}
\usepackage{setspace}
\usepackage{geometry}
\usepackage{chngcntr}
\usepackage{textgreek}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{sectsty}
\usepackage[nottoc]{tocbibind}
\usepackage{tocloft}
\usepackage{setspace}
\usepackage{titlesec}
\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{natbib}
\usepackage{rotating}
\usepackage{lineno}
\usepackage{needspace}
\usepackage{pdfpages}
\usepackage{textgreek}
\usepackage{csvsimple}
\usepackage{tikz}

\fancyhf{}

\widowpenalty=10000
\clubpenalty=10000
%\widowpenalties 1 9999 %% Optional to reduce page breaks in small paragraphs
\raggedbottom
%\linenumbers
%\needspace{5\baselineskip}
%\parfillskip 0pt plus 0.75\textwidth


%Table of Contents and List of Tables/Figures Settings%

%\renewcommand*\cftpartfont{\scshape}
\renewcommand*\cftchapfont{\scshape}
\renewcommand*\cftloftitlefont{\hspace{0em}\normalsize\scshape}
\renewcommand*\cftlottitlefont{\normalsize\normalfont\scshape}
\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}
\setlength{\cftpartindent}{\cfttabindent}
\setlength{\cftchapindent}{2\cfttabindent}
\setlength{\cftsecindent}{2\cftchapindent}
\setlength{\cftsubsecindent}{3\cftchapindent}
\setlength{\cftfigindent}{0in} 
\setlength{\cfttabindent}{0in}

%Depth of headings%
\setcounter{secnumdepth}{3}

%Adds 'Figure/Table' and 'Page' Column Titles
\AtBeginDocument{%
  \addtocontents{lof}{Figure \hfill Page\par}
  \addtocontents{lot}{Table \hfill Page\par}
}

%Changes name of Table of Contents
\renewcommand*\contentsname{\normalsize\normalfont\scshape{\hfill Table of Contents \hfill}}
\renewcommand{\cftaftertoctitle}{\hfill}


\renewcommand*\listfigurename{\normalsize\normalfont\scshape{\hspace{-1.51em} List of Figures}}
\renewcommand*\listtablename{\normalsize\normalfont\scshape{\hspace{-1.51em} List of Tables}}
\renewcommand*\bibname{\normalsize\normalfont\scshape{\hspace{-1.51em} References}}

%Numbering Scheme for Chapters, Sections, Subsections etc.
\def\thesection{\arabic{chapter}.\arabic{section}}
\def\thesubsection{\arabic{chapter}.\arabic{section}.\arabic{subsection}}
\def\thesubsubsection{{\arabic{chapter}.\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}}

%Adjust Font Style of Headings
\partfont{\centering\normalsize\normalfont\MakeUppercase}
\chapterfont{\centering\normalsize\normalfont\singlespace\bf\MakeUppercase}
\sectionfont{\centering\normalsize\normalfont\bf\singlespace}
\subsectionfont{\normalsize\normalfont\bf\raggedright\singlespace}
\titleformat{\subsubsection}[runin]{\normalsize\normalfont\bf\raggedright}{\thesubsubsection}{2em}{}[]

%Sequential Numbering of Figures and Tables for Entire Document
\captionsetup{
  figurewithin=none,
  tablewithin=none
}
%Sequential Numbering of Figures and Tables for each Chapter
%\numberwithin{figure}{chapter}
%\numberwithin{table}{chapter}

\begin{document}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TITLE PAGE
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Begin Page counting
\pagenumbering{roman}

%Suppress page number on title page
\thispagestyle{empty}

\newgeometry{top=2in,left=1.5in,right=1in,bottom=1in,includefoot}

\begin{center}
\center{
\singlespacing\large\MakeUppercase\mytitle}
 \vspace{24pt}
\center{
{by}}
\vspace{24pt}
\singlespacing 
My Name\\
Bachelor of Science, University of North Dakota, 2017 %(When/where you received your Bachelors degree)
\vspace{36pt}\\
\center{A Thesis}
\vspace{-12pt}
\doublespacing
\center{Submitted to the Graduate Faculty\\
of the\\
University of North Dakota\\
in partial fulfillment of the requirements\\
\vspace{36pt}
for the degree of \\
Master of Science}\\
\vspace{24pt}
\singlespacing
{Grand Forks, North Dakota\\
March\\
2019}
\end{center}
\newpage%Title page is separate from rest of article
 
\restoregeometry

%%% Insert Copyright Page %%
\newgeometry{top=2in,left=1.5in,right=1in,bottom=1in,includefoot}
\begin{center}
\null
\vfill
{Copyright 2019 My Name}
\end{center}
\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% APPROVAL PAGE
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\newgeometry{top=2in,left=1.5in,right=1in,bottom=1in,includefoot}


%\includepdf[pages={1},offset=0.28cm -0.65cm]{burtch_approval.pdf}

%% Uncomment the above line to insert your signed approval page received from the grad school in pdf format.  Comment out the rest of the this page.


\begin{flushleft}
\hspace{3em} This thesis, submitted by MY NAME in partial fulfillment of the requirements for the Degree of Master of Science from the University of North Dakota, has been read by the Faculty Advisory Committee under whom the work has been done and is hereby approved.
\end{flushleft}

\vspace{30pt}
\begin{flushright}
\begin{tabular}{p{3in}}

\hline
Advisor \newline\newline\\

\hline
Committee Member\newline\newline\\

\hline
Committee Member\newline\newline\\

\end{tabular}
\end{flushright}

\vspace{30pt}

\begin{flushleft}
\hspace{3em} This thesis is being submitted by the appointed advisory committee as having met all of the requirements of the School of Graduate Studies at the University of North Dakota and is hereby approved.

\end{flushleft}

\vspace{30pt}
\begin{flushleft}
\begin{tabular}{p{3in}}

\hline
Grant McGimpsey \newline
Dean of the School of Graduate Studies\newline\newline\\

\hline
DATE
\end{tabular}
\end{flushleft}

\newpage
\restoregeometry

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PERMISSION PAGE
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newgeometry{top=2in,left=1.5in,right=1in,bottom=1in,includefoot}

\begin{center}
\MakeUppercase{Permission}
\end{center}

\begin{tabular}{p{1in}p{4in}}

Title  &\mytitle \\\\

Department & Atmospheric Sciences \\\\

Degree & Master of Science

\end{tabular}
\vspace{24pt}

\begin{flushleft}
\hspace{3em} In presenting this thesis in partial fulfillment of the requirements 
for a graduate degree from the University of North Dakota, I agree that the library of this 
University shall make it freely available for inspection. I further agree that permission for 
extensive copying for scholarly purposes may be granted by the professor who supervised 
my thesis work or, in her absence, by the Chairperson of the 
department or the dean of the School of Graduate Studies. It is understood that any 
copying or publication or other use of this thesis or part thereof for 
financial gain shall not be allowed without my written permission. It is also 
understood that due recognition shall be given to me and to the University of North 
Dakota in any scholarly use which may be made of any material in my thesis.

\end{flushleft}

\vspace{48pt}
\begin{flushright}
My Name\\
March 25, 2019 (Today's date)
\end{flushright}

\restoregeometry
\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Table of Contents and List of Tables and List of Figures
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newgeometry{top=1.0in,bottom=1in,left=1.5in,right=1in,includefoot}
\begin{spacing}{1}

\tableofcontents
\newpage

\setlength{\cftparskip}{1\baselineskip}
\begin{center}
\listoffigures
\end{center}
\newpage
\begin{center}
\listoftables
\end{center}
\newpage
\end{spacing}

%ADD THE FOLLOWING TO REMOVE HEADING NUMBERING%%

%\renewcommand{\thesection}{}
%\renewcommand{\thesubsection}{\hspace{-1em}}
%\renewcommand{\thesubsubsection}{\hspace{2em}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ACKNOWLEDGMENTS
%
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addcontentsline{toc}{chapter}{\hspace{-\cftchapindent}\hspace{\cftpartindent}\normalfont\normalsize\scshape{Acknowledgments}}

\newgeometry{top=2in,left=1.5in,right=1in,bottom=1in,includefoot}

\begin{center}
\MakeUppercase{Acknowledgments}
%\vspace{-30pt}
\end{center}

%\vspace{24pt}

\begin{flushleft}
\doublespacing{
 
\hspace{3em} Lovely acknowledgments to your advisor, committee, friends and family, and funding go here.}
\end{flushleft}

\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DEDICATION PAGE
%
% PLACE THIS IN THE PROPER PLACE BEFORE THE MAIN BODY OF THE TEXT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\thispagestyle{empty}
\newgeometry{top=2in,left=1.5in,right=1in,bottom=1in,includefoot}

\null\vfill
\begin{center}
This is where you dedicate your thesis to someone. 
\end{center}
\vfill
\null
\newpage
\restoregeometry


\addtocounter{page}{-1} %Continues page numbering after Dedication Page

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ABSTRACT
%
% Enter your Abstract here
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\addcontentsline{toc}{chapter}{\hspace{-\cftchapindent}\hspace{\cftpartindent}\normalfont\normalsize\scshape{Abstract}}
\newgeometry{top=2in,left=1.5in,right=1in,bottom=1in,includefoot}

\singlespacing
\begin{center}
\MakeUppercase{Abstract}

\end{center}

%\begin{flushleft}
{\setlength{\parindent}{3em}
\doublespacing
\par  This is where your abstract goes!
%\end{flushleft}
\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MAIN BODY OF PAPER
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newgeometry{top=1in,left=1.5in,bottom=1in,right=1in,includefoot,heightrounded,letterpaper}

\pagenumbering{arabic}

\addtocontents{toc}{\cftpagenumbersoff{part}}
\addcontentsline{toc}{part}{\normalfont\normalsize\scshape{Chapter}}
\addtocontents{toc}{\cftpagenumberson{part}}

\doublespacing
{\setlength{\parindent}{3em}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INTRODUCTION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\singlespacing
\chapter{Introduction} \label{Chap:Intro}
\vspace{-30pt}
\doublespacing

This is an example of a few chapters and sections for your thesis.  This template will also provide a general figure setup and reference, table, and equation.  Labels are added to each chapter and section to allow easy reference to them.  For example, this is Chapter \ref{Chap:Intro}.

\section{How to add an equation} \label{Intro:Sec_Table}

Here is an example of how to add an equation into your document. 
\begin{equation} \label{eqn:PV}
PV=\frac{1}{\rho}\bigg[\bigg(\frac{\partial v}{\partial x}-\frac{\partial u}{\partial y}\bigg)+f\bigg]*\frac{\partial \theta}{\partial z},
\end{equation}
where $\mathit{\rho}$ is density, $\mathit{v}$ and $\mathit{u}$ are horizontal velocity, $\mathit{f}$ is Coriolis, and $\mathit{\theta}$ is potential temperature. Equations can also be referenced easily by their labels. For example, Eq. \ref{eqn:PV} is Ertel's Potential Vorticity.

Another example is
\begin{equation} \label{eqn:static_stab}
\zeta = \frac{\partial v}{\partial x} -  \frac{\partial u}{\partial y}
\end{equation} 
where $\mathit{\zeta}$ is realtive (vertical) vorticity.

\pagebreak

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BACKGROUND
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\singlespacing
\chapter{Background} \label{Chap:Background}
\vspace{-30pt}
\doublespacing

\section{How to add a figure} \label{Background:Sec_Figure}

Here is an example of how to add in a figure.  The figure should be located in the same folder as your LaTeX document. The label MUST come after the caption. When a Figure is referenced, it is automatically numbered and gets placed where ever the figure is included in the .tex file. When you call in the figure, you do not add .png, .jpg, etc. The label should be somewhat short and helpful so it can easily be referenced throughout the document. Example: Figure \ref{figure:20130518_cell_hc} shows an example application of the SL3D algorithm to a discrete supercell.

\begin{figure} % places a figure. Add these at the end to place the figure %\[h] - right here %\[t] - top of page. For example \begin{figure}[t]
\noindent\includegraphics[width=19pc,angle=0]{sl3d_example_hc.pdf}\\ % Adjust figure size by changing the '19'
\caption{Maps of (a) Z$_{\rm{H}}$ at 3 km altitude, (b) column-maximum Z$_{\rm{H}}$, and (c) SL3D classification for a supercell located in northeast Texas on 18 May 2013 at 0055 UTC. The thick lines labeled A--B on each map show the location of the vertical cross-sections in Fig.\ \ref{figure:20130518_cell_vc}.}
\label{figure:20130518_cell_hc}
\end{figure}

A corresponding vertical cross-section is shown in Fig. \ref{figure:20130518_cell_vc}.

\begin{figure}[t]
\noindent\includegraphics[width=19pc,angle=0]{sl3d_example_vc.pdf}\\
\caption{Vertical cross-sections of (a) Z$_{\rm{H}}$, (b) Z$_{\rm{DR}}$, and (c) K$_{\rm{DP}}$ following the thick line in Fig.\ \ref{figure:20130518_cell_hc}, from A (left) to B (right). The thick colored line at the base of each cross-section shows the corresponding SL3D classification.}
\label{figure:20130518_cell_vc}
\end{figure}

\pagebreak

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Methodology
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\singlespacing
\chapter{Methodology}
\vspace{-30pt}
\doublespacing
\label{Chap:Methodology}

\section{How to add a table} \label{Intro:Sec_Table}
Here is an example of how to add in a table.  Please note that this is a very basic table and you can make several adjustments to the contents, layout, etc.  There are a lot of different table options, all it generally takes is a simple google search.  You can reference the table just like a figure.  This would be table~\ref{Table:example1}

For a slightly more complicated table example, please see the code for Table \ref{Table:example2}.

\begin{table} [h]
\caption{Table showing the analysis grid average tropopause height at 1 hour, total mass transported above the tropopause, and absolute and relative difference of mass transport with respect to the constant altitude tropopause definition.  The constant altitude tropopause definition calculated 3.4 * 10$^{11}$ kg of mass above the tropopause at 1 hour. \label{Table:example1}}
\begin{tabular}{ |m{7em}||m{7em}|m{7em}|m{7em}| }
\hline
\multicolumn{4}{|c|}{\textbf{1 hour}} \\
\hline
Definition & Average Tropopause Height (km) & Mass Transport (kg * 10$^{11}$) & Absolute Diff w.r.t CA (kg * 10$^{11}$) \\
\hline
WMO I & 10.94 & 2.7 & -0.7 \\
WMO II & 10.94 & 2.9 & -0.5 \\
\hline
\end{tabular}
\end{table}

\begin{sidewaystable}[t]
\caption{The criteria required for classification into the five SL3D categories, where $Z_{\rm{H}}$ is horizontally-polarized reflectivity, $Z_{\rm{Hmax}}$ is the column-maximum $Z_{\rm{H}}$, and $Z_{\rm{Melt}}$ is the height of the melting layer.}\label{Table:example2}
\begin{center}
\begin{tabular}{ccccrrcrc}
\hline\hline
Classification & Criteria \\
\hline
 Convection & $Z_{\rm{H}} =$ 25 dBZ echo top altitude $\ge$ 10 km \\
 & or $Z_{\rm{H}}$ peakedness exceeding threshold in at least 50\% of echo column between surface and 9 km\\
 & or $Z_{\rm{H}} \ge$ 45 dBZ above $Z_{\rm{Melt}}$ \\
 Precip. Stratiform & $Z_{\rm{H}} \ge$ 20 dBZ at 3 km \\
 & or $Z_{\rm{H}} \ge$ 10 dBZ below 3 km\\
 Non-Precip. Stratiform & No echo or $Z_{\rm{H}} \textless$ 20 dBZ at 3 km, and echo present below 5 km\\
 Anvil &  No echo at or below 5 km altitude, but echo present above $Z_{\rm{Melt}}$\\
 Updraft & $Z_{\rm{Hmax}} \ge$ 40 dBZ and $\frac{\partial Z_{\rm{H}}}{\partial z} \ge$ 8 dBZ km$^{-1}$ with echo in at least 6 of 8 horizontally adjacent grid volumes\\
 & or $Z_{\rm{H}} \ge$ 15 dBZ and $Z_{\rm{DR}} \ge$ 1.5 dBZ extending at least 1 km above $Z_{\rm{Melt}}$\\
 & or $Z_{\rm{H}} \ge$ 30 dBZ and $K_{\rm{DP}} \ge$ 0.5 deg km$^{-1}$ extending at least 1 km above $Z_{\rm{Melt}}$\\
\hline
\end{tabular}
\end{center}
\end{sidewaystable}

\pagebreak

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Results
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\singlespacing

\chapter{Results}
\vspace{-30pt}
\doublespacing
\label{Chap:Results}

\section{How to add references} \label{Results:Sec_reference}

References are automatically organized and inserted, all you need to do is provide each citation a label and either enter the citation in by hand or using a bibtex document (see `Bibliography' section below).

Citations are commonly inserted by either using them directly in text, or include the citation inside parentheses. For example... \citet{Starzec2017} ... or ... \citep[e.g.,][]{Starzec2017}.

\pagebreak


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Summary and Conclusions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\singlespacing
\chapter{Summary and Conclusions}
\vspace{-30pt}
\doublespacing
\label{Chap:Summary_Conclusions}

\pagebreak

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%BIBLIOGRAPHY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Bibliographies can be written by hand or by using a textbib file. To use a textbib file, you'll need a style sheet such as that used with AMS.

%% To use a bibtex file:
%\bibliographystyle{ametsoc2014} %%% AMS STYLE GUIDE
%\bibliography{references_example} %%% YOUR BIBTEX FILE

%% By hand:
\begin{thebibliography}{}

\bibitem[{Starzec et al.}(2017)]{Starzec2017}
Starzec, M., C. R. Homeyer, and G. L. Mullendore, 2017: Storm Labeling in Three Dimensions ({SL3D}): A Volumetric Radar Echo and Dual-Polarization Updraft Classification Algorithm, \textit{Monthly Weather Review}, \textbf{145 (3)}, 1127--1145, doi:10.1175/MWR-D-16-0089.1.

\end{thebibliography}

\end{document}