SAMSIM
Functions/Subroutines
mo_init Module Reference

Allocates Arrays and sets initial data for a given testcase for SAMSIM. More...

Functions/Subroutines

subroutine init (testcase)
 Sets initial conditions according to which testcase is chosen. More...
 
subroutine sub_allocate (Nlayer, length_input_lab)
 Allocates Arrays. More...
 
subroutine sub_allocate_bgc (Nlayer, N_bgc)
 Allocates BGC Arrays. More...
 
subroutine sub_deallocate
 Deallocates Arrays. More...
 

Detailed Description

Allocates Arrays and sets initial data for a given testcase for SAMSIM.

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_init::init ( integer, intent(in)  testcase)

Sets initial conditions according to which testcase is chosen.

For different initial conditions the Arrays are allocated and the initial values are set. Following must always be:

  1. Nlayer = N_top+N_middle+N_bottom
  2. N_active is set correctly, N_active <= Nlayer
  3. fl_q_bottom >= 0
  4. T_bottom > freezing point of for S_bu_bottom
  5. A too high dt for a too small thick_0 leads to numerical thermodynamic instability. For a conservative guess dt [s] should be smaller than 250000 * (dz [m])**2

Testcase 1

  • Testcase 1 is a replication of lab experiments conducted in tanks cooled from above by a cooling plate using the boundflux_flag 1.
  • In this testcase the cooling plate Temperature T_top changes every 12 hours to imitate the experiments Dirk Notz conducted in his PhD.
  • This testcase was used to optimize the free parameters of the gravity drainage parametrization (see Griewank Notz 2013/14).
  • Can also be run with bgc tracers.

Testcase 2

  • Testcase is an example of how to simulate ice growth and melt in cooling chambers.
  • Boundflux_flag 3 is used, which uses T2m as the air temperature in the cooling chamber.
  • The surface flux heat flux is proportional to the ice-air temperature difference (T_top-T2m).
  • When reproducing cooling chamber experiments the alpha flux parameters need to be tuned, and a module in mo_testcase_specifics is needed to set/ T2m over time.
  • The heat flux in the water from below (fl_q_bottom) for such experiments can be very hard to reproduce if the heat input is not carefully measured from all pumps or similar devices used.

Testcase 3

  • Uses interpolated climate mean forcing from Notz and a constant oceanic heat flux (fl_q_bottom) to grow idealized arctic sea ice.
  • Is generally intended as a numerically cheap testcase to check for effects of code changes.
  • Is also useful when runs over many years are needed.
  • The amount of liquid and solid precipitation is set in sub_test3 of mo_testcase specifics.

Testcase 4

  • Uses three hourly reanalysis forcing over 4.5 years.
  • Is set up to start in July.
  • Prescribes annual cycle of oceanic heat flux.
  • Requires the proper input data to be copied into the executable folder (see sub_input).
  • Is more computer intensive
  • Was used a lot for Griewank & Notz 2013/2014
Revision History
First set up by Philipp Griewank, IMPRS (2010-07-22>)
subroutine mo_init::sub_allocate ( integer, intent(in)  Nlayer,
integer, intent(in), optional  length_input_lab 
)

Allocates Arrays.

For a given number of layers Nlayers all arrays are allocated

Parameters
[in]nlayernumber of layers
[in]length_input_labNiels, 2017 add: dimension of input arrays
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
[in]length_input_labNiels, 2017
subroutine mo_init::sub_allocate_bgc ( integer, intent(in)  Nlayer,
integer, intent(in)  N_bgc 
)

Allocates BGC Arrays.

subroutine mo_init::sub_deallocate ( )

Deallocates Arrays.