SAMSIM
Functions/Subroutines
mo_grotz Module Reference

The most important module of SAMSIM. More...

Functions/Subroutines

subroutine grotz (testcase, description)
 Main subroutine of SAMSIM, a 1D thermodynamic seaice model. A semi-adaptive grid is used which is managed by mo_layer_dynamics. More...
 

Detailed Description

The most important module of SAMSIM.

The module mo_grotz contains the most important subroutine grotz (Named after GRiewank nOTZ). Mo_grotz is called by SAMSIM.f90. SAMSIM.f90's only purpose is to set the testcase number and description string. Subroutine grotz contains the time loop, as well as the initialization, and calls all other branches of the model. This model was developed from scratch by Philipp Griewank during and after his PhD at Max Planck Institute of Meteorology from 2010-2014. The code is intended to be understandable and most subroutines, modules, functions, parameters, and global variables have doxygen compatible descriptions. In addition to the doxygen generated description, some python plotscripts are available to plot model output.

Author
Philipp Griewank

COPYRIGHT

This file is part of SAMSIM.

SAMSIM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

SAMSIM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with SAMSIM. If not, see http://www.gnu.org/licenses/.

Function/Subroutine Documentation

subroutine mo_grotz::grotz ( integer, intent(in)  testcase,
character*12000, intent(in)  description 
)

Main subroutine of SAMSIM, a 1D thermodynamic seaice model. A semi-adaptive grid is used which is managed by mo_layer_dynamics.

The basic rundown of the time loop is:

  1. Calculate the current ice/snow state and forcing, as well as gravity drainage and flooding
  2. Apply all the fluxes, recalculate ice state
  3. Flushing and layer dynamics

Here is the full rundown of what happens in mo_grotz:

  • Initialization: all fields are initialized for the given testcase, and the output is formatted
  • Input and Forcing read in: Only if needed by the chosen testcase TIME LOOP BEGINS:
    • Calculate the total ice properties, total freshwater, thermal resistivity, energy, bulk salinity
    • Determine snow and rain rates
    • Calculate snow thermodynamics
    • Calculate inner ice thermodynamic fluxes
    • Calculate brine flux from expulsion
    • Raw output written out if debug_flag is set to 2
    • Standard output written
    • Flooding parametrized
    • Lowest layer mixing with underlying water
    • Gravity drainage parametrized
    • Various testcase specifics
    • Calcuating and applying the heat fluxes
    • After heatfluxes are applied new liquidus thermal equilibrium is calculated
    • Flushing is parametrized
    • Chemistry advection calculated
    • Layer Dynamics TIME LOOP ENDS -Final output, files closed, and fields deallocated

IMPORTANT: To get the correct freshwater amount make sure the freshwater is calculated using a salinity value to compare against.

Common errors leading to termination are: too small timestep, bad programming

Revision History
Basic thermodynamics and layer_dynamics for fixed boundaries seem stable, backup made. by griewank (2010-08-10)
Add some more outputs, changed routine names and arguments with respect to newly introduces flags by Niels Fuchs, MPIMET (2017-03-01)
Added a bit of description with the run down of what happends by Philipp Griewank, Uni K (2018-08-08)
Parameters
[in]descriptionString to describes simulation which is output into dat_settings