\hypertarget{MOM_8F90}{}\section{/home/cermak/src/\+M\+O\+M6/src/core/\+M\+OM.F90 File Reference}
\label{MOM_8F90}\index{/home/cermak/src/\+M\+O\+M6/src/core/\+M\+O\+M.\+F90@{/home/cermak/src/\+M\+O\+M6/src/core/\+M\+O\+M.\+F90}}
{\ttfamily \#include $<$M\+O\+M\+\_\+memory.\+h$>$}\newline
\subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
type \hyperlink{structmom_1_1mom__diag__ids}{mom\+::mom\+\_\+diag\+\_\+ids}
\begin{DoxyCompactList}\small\item\em A structure with diagnostic I\+Ds of the state variables. \end{DoxyCompactList}\item 
type \hyperlink{structmom_1_1mom__control__struct}{mom\+::mom\+\_\+control\+\_\+struct}
\begin{DoxyCompactList}\small\item\em Control structure for the M\+OM module, including the variables that describe the state of the ocean. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Modules}
\begin{DoxyCompactItemize}
\item 
module \hyperlink{namespacemom}{mom}
\begin{DoxyCompactList}\small\item\em The central module of the M\+O\+M6 ocean model. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \hyperlink{namespacemom_adf54a4e3a72611aa2088f46076e56e53}{mom\+::step\+\_\+mom} (forces\+\_\+in, fluxes\+\_\+in, sfc\+\_\+state, Time\+\_\+start, time\+\_\+int\+\_\+in, CS, Waves, do\+\_\+dynamics, do\+\_\+thermodynamics, start\+\_\+cycle, end\+\_\+cycle, cycle\+\_\+length, reset\+\_\+therm)
\begin{DoxyCompactList}\small\item\em This subroutine orchestrates the time stepping of M\+OM. The adiabatic dynamics are stepped by calls to one of the step\+\_\+\+M\+O\+M\+\_\+dyn\+\_\+...routines. The action of lateral processes on tracers occur in calls to advect\+\_\+tracer and tracer\+\_\+hordiff. Vertical mixing and possibly remapping occur inside of diabatic. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom_a42ee7e91ffcf1340679e29ab28d9b41d}{mom\+::step\+\_\+mom\+\_\+dynamics} (forces, p\+\_\+surf\+\_\+begin, p\+\_\+surf\+\_\+end, dt, dt\+\_\+thermo, bbl\+\_\+time\+\_\+int, CS, Time\+\_\+local, Waves)
\begin{DoxyCompactList}\small\item\em Time step the ocean dynamics, including the momentum and continuity equations. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom_a0a07938ed3127b70bab5d466967aec80}{mom\+::step\+\_\+mom\+\_\+tracer\+\_\+dyn} (CS, G, GV, US, h, Time\+\_\+local)
\begin{DoxyCompactList}\small\item\em step\+\_\+\+M\+O\+M\+\_\+tracer\+\_\+dyn does tracer advection and lateral diffusion, bringing the tracers up to date with the changes in state due to the dynamics. Surface sources and sinks and remapping are handled via step\+\_\+\+M\+O\+M\+\_\+thermo. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom_a1a81ea749a309f10f5c3c7a17efa3606}{mom\+::step\+\_\+mom\+\_\+thermo} (CS, G, GV, US, u, v, h, tv, fluxes, dtdia, Time\+\_\+end\+\_\+thermo, update\+\_\+\+B\+BL, Waves)
\begin{DoxyCompactList}\small\item\em M\+O\+M\+\_\+step\+\_\+thermo orchestrates the thermodynamic time stepping and vertical remapping, via calls to diabatic (or adiabatic) and A\+L\+E\+\_\+main. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom_ade4f7557fcda73ffc12284d3cecf4182}{mom\+::step\+\_\+offline} (forces, fluxes, sfc\+\_\+state, Time\+\_\+start, time\+\_\+interval, CS)
\begin{DoxyCompactList}\small\item\em step\+\_\+offline is the main driver for running tracers offline in M\+O\+M6. This has been primarily developed with A\+LE configurations in mind. Some work has been done in isopycnal configuration, but the work is very preliminary. Some more detail about this capability along with some of the subroutines called here can be found in tracers/\+M\+O\+M\+\_\+offline\+\_\+control.\+F90 \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom_a96708b16215666edbfa5b46228f3a200}{mom\+::initialize\+\_\+mom} (Time, Time\+\_\+init, param\+\_\+file, dirs, CS, restart\+\_\+\+C\+Sp, Time\+\_\+in, offline\+\_\+tracer\+\_\+mode, input\+\_\+restart\+\_\+file, diag\+\_\+ptr, count\+\_\+calls, tracer\+\_\+flow\+\_\+\+C\+Sp)
\begin{DoxyCompactList}\small\item\em Initialize M\+OM, including memory allocation, setting up parameters and diagnostics, initializing the ocean state variables, and initializing subsidiary modules. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom_a2269d5cd79625cbf16cb916346379207}{mom\+::finish\+\_\+mom\+\_\+initialization} (Time, dirs, CS, restart\+\_\+\+C\+Sp)
\begin{DoxyCompactList}\small\item\em Finishes initializing M\+OM and writes out the initial conditions. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom_af0f791729b0ccb6cb8ae2f4d28edee21}{mom\+::register\+\_\+diags} (Time, G, GV, US, I\+Ds, diag)
\begin{DoxyCompactList}\small\item\em Register certain diagnostics. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom_ab57e47834591c651339770f7e51efe57}{mom\+::mom\+\_\+timing\+\_\+init} (CS)
\begin{DoxyCompactList}\small\item\em Set up C\+PU clock I\+Ds for timing various subroutines. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom_a76cb0af280a5c9e877dc206a6849b46b}{mom\+::set\+\_\+restart\+\_\+fields} (GV, US, param\+\_\+file, CS, restart\+\_\+\+C\+Sp)
\begin{DoxyCompactList}\small\item\em Set the fields that are needed for bitwise identical restarting the time stepping scheme. In addition to those specified here directly, there may be fields related to the forcing or to the barotropic solver that are needed; these are specified in sub-\/ routines that are called from this one. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom_a16f7cc52cef3eb7a99687bf3d0694285}{mom\+::adjust\+\_\+ssh\+\_\+for\+\_\+p\+\_\+atm} (tv, G, GV, US, ssh, p\+\_\+atm, use\+\_\+\+E\+OS)
\begin{DoxyCompactList}\small\item\em Apply a correction to the sea surface height to compensate for the atmospheric pressure (the inverse barometer). \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom_a699d6c5bfb5b9dcdaa03c18806fa824e}{mom\+::extract\+\_\+surface\+\_\+state} (CS, sfc\+\_\+state\+\_\+in)
\begin{DoxyCompactList}\small\item\em Set the surface (return) properties of the ocean model by setting the appropriate fields in sfc\+\_\+state. Unused fields are set to N\+U\+LL or are unallocated. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespacemom_a8f5160e583b599050515b8fe5575aa15}{mom\+::rotate\+\_\+initial\+\_\+state} (u\+\_\+in, v\+\_\+in, h\+\_\+in, T\+\_\+in, S\+\_\+in, use\+\_\+temperature, turns, u, v, h, T, S)
\begin{DoxyCompactList}\small\item\em Rotate initialization fields from input to rotated arrays. \end{DoxyCompactList}\item 
logical function, public \hyperlink{namespacemom_ada38a8329b76f9fa1685a230869a7647}{mom\+::mom\+\_\+state\+\_\+is\+\_\+synchronized} (CS, adv\+\_\+dyn)
\begin{DoxyCompactList}\small\item\em Return true if all phases of step\+\_\+\+M\+OM are at the same point in time. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom_aece0dd1e2c9498844befd8ba71986b96}{mom\+::get\+\_\+mom\+\_\+state\+\_\+elements} (CS, G, GV, US, C\+\_\+p, C\+\_\+p\+\_\+scaled, use\+\_\+temp)
\begin{DoxyCompactList}\small\item\em This subroutine offers access to values or pointers to other types from within the M\+O\+M\+\_\+control\+\_\+struct, allowing the M\+O\+M\+\_\+control\+\_\+struct to be opaque. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom_a462293ed92e99927ef9939747d633080}{mom\+::get\+\_\+ocean\+\_\+stocks} (CS, mass, heat, salt, on\+\_\+\+P\+E\+\_\+only)
\begin{DoxyCompactList}\small\item\em Find the global integrals of various quantities. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom_ae6dad976fb4be1c7ba7fc1aff809616b}{mom\+::mom\+\_\+end} (CS)
\begin{DoxyCompactList}\small\item\em End of ocean model, including memory deallocation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\textbf{ }\par
\begin{DoxyCompactItemize}
\item 
integer \hyperlink{namespacemom_a2e9f4b71ee77ba5bcb3f03a863948db3}{mom\+::id\+\_\+clock\+\_\+ocean}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_ae1cf2d523679b925a5e5baa9d974968c}{mom\+::id\+\_\+clock\+\_\+dynamics}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a052256dfa3e56390f62ef3a826d62617}{mom\+::id\+\_\+clock\+\_\+thermo}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a0fa4debacd02de6fcd066066c232adf3}{mom\+::id\+\_\+clock\+\_\+tracer}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a50edf00aa5998073d2db0360949253ba}{mom\+::id\+\_\+clock\+\_\+diabatic}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_af865d838388a05163e8de8d266316d5f}{mom\+::id\+\_\+clock\+\_\+adiabatic}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_aa512b2d8dd73b02634e772701be07a87}{mom\+::id\+\_\+clock\+\_\+continuity}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a8f5feb87a0cb40d9fcee00456e982b8a}{mom\+::id\+\_\+clock\+\_\+thick\+\_\+diff}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_aa69e79e4c51e1c24c474b84311322251}{mom\+::id\+\_\+clock\+\_\+bbl\+\_\+visc}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a41b67fabfc13e52cf3a5d1c337c780eb}{mom\+::id\+\_\+clock\+\_\+ml\+\_\+restrat}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_aa773fddb51f99098d75304eb271270d4}{mom\+::id\+\_\+clock\+\_\+diagnostics}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a09f2ac3470372b9ee233f4cc5a7a0da1}{mom\+::id\+\_\+clock\+\_\+z\+\_\+diag}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a7cf03c18244d0630616e925bab1841a2}{mom\+::id\+\_\+clock\+\_\+init}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a4180eb85bab39df7cbb72bb8e5b19fd4}{mom\+::id\+\_\+clock\+\_\+mom\+\_\+init}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a7af2f783166f32739569e4ed6ed6a98f}{mom\+::id\+\_\+clock\+\_\+pass}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_ac4d20612cad32d412dae492fedc2e971}{mom\+::id\+\_\+clock\+\_\+pass\+\_\+init}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a722ed13d0e6d76852e680054a0e3c964}{mom\+::id\+\_\+clock\+\_\+ale}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a283a5d32d799a3cd11113a05dcae2d56}{mom\+::id\+\_\+clock\+\_\+other}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a2ab767469f0d918b9e479d8e0fde44b0}{mom\+::id\+\_\+clock\+\_\+offline\+\_\+tracer}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\item 
integer \hyperlink{namespacemom_a785851181d2a3db5a938322d2ff9498a}{mom\+::id\+\_\+clock\+\_\+unit\+\_\+tests}
\begin{DoxyCompactList}\small\item\em C\+PU time clock I\+Ds. \end{DoxyCompactList}\end{DoxyCompactItemize}

