SAMSIM
|
Mo_layer_dynamics contains all subroutines for the growth and shrinking of layer thickness. More...
Functions/Subroutines | |
subroutine, public | layer_dynamics (phi, N_active, Nlayer, N_bottom, N_middle, N_top, m, S_abs, H_abs, thick, thick_0, T_bottom, S_bu_bottom, bottom_flag, debug_flag, melt_thick_output, N_bgc, bgc_abs, bgc_bottom) |
Organizes the Semi-Adaptive grid SAMSIM uses. More... | |
subroutine, public | top_melt (Nlayer, N_active, N_bottom, N_middle, N_top, thick_0, m, S_abs, H_abs, thick, N_bgc, bgc_abs) |
subroutine, public | top_grow (Nlayer, N_active, N_bottom, N_middle, N_top, thick_0, m, S_abs, H_abs, thick, N_bgc, bgc_abs) |
Top grow subroutine. More... | |
Mo_layer_dynamics contains all subroutines for the growth and shrinking of layer thickness.
The middle layers have flexible thickness in contrast to the lower and upper layers which have static thickness. The details are provided in the separate subroutines.
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/.
subroutine, public mo_layer_dynamics::layer_dynamics | ( | real(wp), dimension(nlayer), intent(in) | phi, |
integer, intent(inout) | N_active, | ||
integer, intent(in) | Nlayer, | ||
integer, intent(in) | N_bottom, | ||
integer, intent(in) | N_middle, | ||
integer, intent(in) | N_top, | ||
real(wp), dimension(nlayer), intent(inout) | m, | ||
real(wp), dimension(nlayer), intent(inout) | S_abs, | ||
real(wp), dimension(nlayer), intent(inout) | H_abs, | ||
real(wp), dimension(nlayer), intent(inout) | thick, | ||
real(wp), intent(in) | thick_0, | ||
real(wp), intent(in) | T_bottom, | ||
real(wp), intent(in) | S_bu_bottom, | ||
integer, intent(in) | bottom_flag, | ||
integer, intent(in) | debug_flag, | ||
real(wp), intent(inout) | melt_thick_output, | ||
integer, intent(in) | N_bgc, | ||
real(wp), dimension(nlayer,n_bgc), intent(inout), optional | bgc_abs, | ||
real(wp), dimension(n_bgc), intent(in), optional | bgc_bottom | ||
) |
Organizes the Semi-Adaptive grid SAMSIM uses.
Modifies the grid and all core variables due to growth or melt. Calls the different subroutines according to current conditions. All subroutines can be called with or without biogeochemical tracers active, which is triggered by providing bgc_abs when calling the subroutine. See Griewank PhD thesis for a full description of the grid.
Conditions under which following layer dynamics subroutines are called:
If debug_flag is set to 2 the layer values will be written into the debug output (thermoXX.dat) before and after layer dynamics with a string to identify which subroutine was called
[in,out] | melt_thick_output | Niels, 2017 add: melt_thick_output !OBS: only 3rd element in standard melt_thick_output vector! |
[in] | bgc_bottom | Niels, 2017 add: subtract top growth from melt thick output |
subroutine, public mo_layer_dynamics::top_grow | ( | integer, intent(in) | Nlayer, |
integer, intent(inout) | N_active, | ||
integer, intent(in) | N_bottom, | ||
integer, intent(in) | N_middle, | ||
integer, intent(in) | N_top, | ||
real(wp), intent(in) | thick_0, | ||
real(wp), dimension(nlayer), intent(inout) | m, | ||
real(wp), dimension(nlayer), intent(inout) | S_abs, | ||
real(wp), dimension(nlayer), intent(inout) | H_abs, | ||
real(wp), dimension(nlayer), intent(inout) | thick, | ||
integer, intent(in) | N_bgc, | ||
real(wp), dimension(nlayer,n_bgc), intent(inout), optional | bgc_abs | ||
) |
Top grow subroutine.
Should be called when the top layer is thicker then 1.5 *thick_0. If N_active=Nlayer middle layers are expanded by thick_0/N_middle and top layers are moved one down. IF N_active<Nlayer then N_active=N_active+1 and all layers are shifted downwards.
subroutine, public mo_layer_dynamics::top_melt | ( | integer, intent(in) | Nlayer, |
integer, intent(inout) | N_active, | ||
integer, intent(in) | N_bottom, | ||
integer, intent(in) | N_middle, | ||
integer, intent(in) | N_top, | ||
real(wp), intent(in) | thick_0, | ||
real(wp), dimension(nlayer), intent(inout) | m, | ||
real(wp), dimension(nlayer), intent(inout) | S_abs, | ||
real(wp), dimension(nlayer), intent(inout) | H_abs, | ||
real(wp), dimension(nlayer), intent(inout) | thick, | ||
integer, intent(in) | N_bgc, | ||
real(wp), dimension(nlayer,n_bgc), intent(inout), optional | bgc_abs | ||
) |