!! All data needed by mo_grotz are set in this module.
!! Most arrays are allocated after the needed dimension is specified for each testcase in mo_init.f90.
!!
!!
!! @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/>.
!!
!!
!! @par Revision History
!! Initialized by Philipp Griewank, IMPRS (2010-07-14) \n
!! Add several variables by Niels Fuchs, MPIMET (2017-03-01)
INTEGER::prescribe_flag!< 1: nothing happens, 2: prescribed Salinity profile is prescribed at each timestep (does not disable brine dynamics, just overwrites the salinity!)
INTEGER::turb_flag!< 1: No bottom turbulence, 2: Bottom mixing
INTEGER::salt_flag!< 1: Sea salt, 2: NaCL
INTEGER::boundflux_flag!< 1: top and bottom cooling plate, 2:top Notz fluxes, bottom cooling plate 3: top flux=a*(T-T_s)
INTEGER::flush_flag!< 1: no flushing, 4:meltwater is removed artificially, 5:vert and horiz flushing, 6: simplified
INTEGER::flood_flag!< 1: no flooding, 2:normal flooding, 3:simple flooding
INTEGER::bottom_flag!< 1: nothing changes, 2: deactivates all bottom layer dynamics, useful for some debugging and idealized tests
INTEGER::debug_flag!< 1: no raw layer output, 2: each layer is output at every timestep (warning, file size can be very large)
INTEGER::precip_flag!< 0: solid and liquid precipitation, 1:phase determined by T2m
INTEGER::harmonic_flag!< 1: minimal permeability is used to calculate Rayleigh number, 2:harmonic mean is used for Rayleigh number
INTEGER::tank_flag!< 1: nothing, 2: S_bu_bottom and bgc_bottom are calculated as if the experiment is conducted in a tank
INTEGER::lab_snow_flag!< Niels, 2017 add: 0: lab setup without snow covers, 1: lab setup include snow influence on heat fluxes
INTEGER::albedo_flag!< 1: simple albedo, 2: normal albedo, see func_albedo for details
INTEGER::freeboard_snow_flag!< Niels, 2017 add: 0: respect the mass of snow in the freeboard calculation, 1: don't
INTEGER::snow_flush_flag!< Niels, 2017 add: 0: all meltwater from snow forms slush, 1: meltwater partly leads to flushing, ratio defined by "k_snow_flush"
INTEGER::initial_state_flag!< Jakob 2022 add: 1: default behaviour - starts from ice thickness = 0, 2: H_abs, S_abs, m, thick of initial ice given
INTEGER::Length_Input!< Sets the input length for atmoflux_flag==2, common value of 13169
REAL(wp),DIMENSION(:),ALLOCATABLE::Tinput!< Niels, 2017 add: used to read in top temperature for field experiment tests, dimension needs to be set in the code
!REAL(wp), DIMENSION(:), ALLOCATABLE :: precipinput !< Niels, 2017 add: used to read in precipation for field experiment tests, dimension needs to be set in the code
REAL(wp),DIMENSION(:),ALLOCATABLE::ocean_T_input!< Niels, 2017 add: used to read in ocean temperature for field experiment tests, dimension needs to be set in the code
REAL(wp),DIMENSION(:),ALLOCATABLE::ocean_flux_input!< Niels, 2017 add: used to read in oceanic heat flux for field experiment tests, dimension needs to be set in the code
REAL(wp),DIMENSION(:),ALLOCATABLE::styropor_input!< Niels, 2017 add: if styropor is used in the lab on top of the ice to simulate snow heat fluxes
REAL(wp),DIMENSION(:),ALLOCATABLE::Ttop_input!< Niels, 2017 add: used for testcase 111, comparison with greenland harp data, uppermost harp temperature is seen as Ttop
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_sw_input!< Used to read in sw fluxes
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_lw_input!< Used to read in lw fluxes
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_sen_input!< Used to read in sensible heat fluxes
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_lat_input!< Used to read in latent heat fluxes
REAL(wp),DIMENSION(:),ALLOCATABLE::T2m_input!< Used to read in 2Tm
REAL(wp),DIMENSION(:),ALLOCATABLE::precip_l_input!< Used to read in liquid precipitation
REAL(wp),DIMENSION(:),ALLOCATABLE::precip_s_input!< Used to read in solid precipitation
REAL(wp),DIMENSION(:),ALLOCATABLE::T_top_input!< Used to read in T_top
REAL(wp),DIMENSION(:),ALLOCATABLE::T_bottom_input!< Used to read in T_bottom
REAL(wp),DIMENSION(:),ALLOCATABLE::S_bu_bottom_input!< Used to read in S_bu_bottom
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_q_bottom_input!< Used to read in fl_q_bottom
REAL(wp),DIMENSION(:),ALLOCATABLE::time_input!< Used to read in time from ERA for atmoflux_flag==2
INTEGER::time_counter!< Keeps track of input data
INTEGER::days!< Days of simulation, specified in init.py
REAL(wp),DIMENSION(:,:),ALLOCATABLE::fl_brine_bgc!< Brine fluxes in a matrix, [kg/s], first index is the layer of origin, and the second index is the layer of arrival
REAL(wp),DIMENSION(:,:),ALLOCATABLE::bgc_abs!< Absolute amount of chemicals [kmol] for each tracer
REAL(wp),DIMENSION(:,:),ALLOCATABLE::bgc_bu!< Bulk amounts of chemicals [kmol/kg]
REAL(wp),DIMENSION(:,:),ALLOCATABLE::bgc_br!< Brine concentrations of chems [kmol/kg]
REAL(wp),DIMENSION(:),ALLOCATABLE::bgc_bottom!< Bulk concentrations of chems below the ice [kmol/kg]
REAL(wp),DIMENSION(:),ALLOCATABLE::bgc_total!< Total of chems, for lab experiments with a fixed total amount
REAL(wp)::m_total!< Total initial water mass, for lab experiments with a fixed total amount
REAL(wp)::S_total!< Total initial salt mass, for lab experiments with a fixed total amount
REAL(wp)::tank_depth!< water depth in meters, used to calculate concentrations below ice for tank experiments
!#######
!Misc
!#######
CHARACTER*3::flush_question='No!'!< Niels, 2017 add: used to indicate in stdout wether flushing occurs at this moment or not
REAL(wp)::melt_err=0._wp!< Niels, 2017 add: used to check how much meltwater vanishes in flushing routine
INTEGER::length_input_lab!< Niels, 2017 add: used to allocate lab testcase input arrays in mo_init, set value in testcases
REAL(wp)::grav_heat_flux_down=0._wp!< output variable for heat loss at the ice bottom caused by gravity drainage (negative = gain)
REAL(wp)::grav_heat_flux_up=0._wp!< output variable for heat gain at the ice bottom caused by gravity drainage (sea water replacing brine, positive = loss)
REAL(wp)::exp_heat=0._wp
ENDMODULEmo_data
!>
!! Sets data and contains all flag descriptions.
!!
!! All data needed by mo_grotz are set in this module.
!! Most arrays are allocated after the needed dimension is specified for each testcase in mo_init.f90.
!!
!!
!! @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/>.
!!
!!
!! @par Revision History
!! Initialized by Philipp Griewank, IMPRS (2010-07-14) \n
!! Add several variables by Niels Fuchs, MPIMET (2017-03-01)
!! edited by Niels Fuchs, UHH (2024-05-03), corrected Enthalpy declaration (before specific and total enthalpy were confused)
!!
MODULEmo_data
USEmo_parameters,ONLY:wp
IMPLICITNONE
!----Arrays
REAL(wp),DIMENSION(:),ALLOCATABLE::H!< specific Enthalpy [J/kg]
REAL(wp),DIMENSION(:),ALLOCATABLE::H_abs!< total Enthalpy [J]
REAL(wp),DIMENSION(:),ALLOCATABLE::Q!< Heat in layer [J]
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_Q!< Heat flux between layers [J/s]
REAL(wp),DIMENSION(:),ALLOCATABLE::T!< Temperature [C]
INTEGER::prescribe_flag!< 1: nothing happens, 2: prescribed Salinity profile is prescribed at each timestep (does not disable brine dynamics, just overwrites the salinity!)
INTEGER::turb_flag!< 1: No bottom turbulence, 2: Bottom mixing
INTEGER::salt_flag!< 1: Sea salt, 2: NaCL
INTEGER::boundflux_flag!< 1: top and bottom cooling plate, 2:top Notz fluxes, bottom cooling plate 3: top flux=a*(T-T_s)
INTEGER::flush_flag!< 1: no flushing, 4:meltwater is removed artificially, 5:vert and horiz flushing, 6: simplified
INTEGER::flood_flag!< 1: no flooding, 2:normal flooding, 3:simple flooding
INTEGER::bottom_flag!< 1: nothing changes, 2: deactivates all bottom layer dynamics, useful for some debugging and idealized tests
INTEGER::debug_flag!< 1: no raw layer output, 2: each layer is output at every timestep (warning, file size can be very large)
INTEGER::precip_flag!< 0: solid and liquid precipitation, 1:phase determined by T2m
INTEGER::harmonic_flag!< 1: minimal permeability is used to calculate Rayleigh number, 2:harmonic mean is used for Rayleigh number
INTEGER::tank_flag!< 1: nothing, 2: S_bu_bottom and bgc_bottom are calculated as if the experiment is conducted in a tank
INTEGER::lab_snow_flag!< Niels, 2017 add: 0: lab setup without snow covers, 1: lab setup include snow influence on heat fluxes
INTEGER::albedo_flag!< 1: simple albedo, 2: normal albedo, see func_albedo for details
INTEGER::freeboard_snow_flag!< Niels, 2017 add: 0: respect the mass of snow in the freeboard calculation, 1: don't
INTEGER::snow_flush_flag!< Niels, 2017 add: 0: all meltwater from snow forms slush, 1: meltwater partly leads to flushing, ratio defined by "k_snow_flush"
INTEGER::initial_state_flag!< Jakob 2022 add: 1: default behaviour - starts from ice thickness = 0, 2: H_abs, S_abs, m, thick of initial ice given
INTEGER::Length_Input!< Sets the input length for atmoflux_flag==2, common value of 13169
REAL(wp),DIMENSION(:),ALLOCATABLE::Tinput!< Niels, 2017 add: used to read in top temperature for field experiment tests, dimension needs to be set in the code
!REAL(wp), DIMENSION(:), ALLOCATABLE :: precipinput !< Niels, 2017 add: used to read in precipation for field experiment tests, dimension needs to be set in the code
REAL(wp),DIMENSION(:),ALLOCATABLE::ocean_T_input!< Niels, 2017 add: used to read in ocean temperature for field experiment tests, dimension needs to be set in the code
REAL(wp),DIMENSION(:),ALLOCATABLE::ocean_flux_input!< Niels, 2017 add: used to read in oceanic heat flux for field experiment tests, dimension needs to be set in the code
REAL(wp),DIMENSION(:),ALLOCATABLE::styropor_input!< Niels, 2017 add: if styropor is used in the lab on top of the ice to simulate snow heat fluxes
REAL(wp),DIMENSION(:),ALLOCATABLE::Ttop_input!< Niels, 2017 add: used for testcase 111, comparison with greenland harp data, uppermost harp temperature is seen as Ttop
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_sw_input!< Used to read in sw fluxes
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_lw_input!< Used to read in lw fluxes
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_sen_input!< Used to read in sensible heat fluxes
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_lat_input!< Used to read in latent heat fluxes
REAL(wp),DIMENSION(:),ALLOCATABLE::T2m_input!< Used to read in 2Tm
REAL(wp),DIMENSION(:),ALLOCATABLE::precip_l_input!< Used to read in liquid precipitation
REAL(wp),DIMENSION(:),ALLOCATABLE::precip_s_input!< Used to read in solid precipitation
REAL(wp),DIMENSION(:),ALLOCATABLE::T_top_input!< Used to read in T_top
REAL(wp),DIMENSION(:),ALLOCATABLE::T_bottom_input!< Used to read in T_bottom
REAL(wp),DIMENSION(:),ALLOCATABLE::S_bu_bottom_input!< Used to read in S_bu_bottom
REAL(wp),DIMENSION(:),ALLOCATABLE::fl_q_bottom_input!< Used to read in fl_q_bottom
REAL(wp),DIMENSION(:),ALLOCATABLE::time_input!< Used to read in time from ERA for atmoflux_flag==2
INTEGER::time_counter!< Keeps track of input data
INTEGER::days!< Days of simulation, specified in init.py
REAL(wp),DIMENSION(:,:),ALLOCATABLE::fl_brine_bgc!< Brine fluxes in a matrix, [kg/s], first index is the layer of origin, and the second index is the layer of arrival
REAL(wp),DIMENSION(:,:),ALLOCATABLE::bgc_abs!< Absolute amount of chemicals [kmol] for each tracer
REAL(wp),DIMENSION(:,:),ALLOCATABLE::bgc_bu!< Bulk amounts of chemicals [kmol/kg]
REAL(wp),DIMENSION(:,:),ALLOCATABLE::bgc_br!< Brine concentrations of chems [kmol/kg]
REAL(wp),DIMENSION(:),ALLOCATABLE::bgc_bottom!< Bulk concentrations of chems below the ice [kmol/kg]
REAL(wp),DIMENSION(:),ALLOCATABLE::bgc_total!< Total of chems, for lab experiments with a fixed total amount
REAL(wp)::m_total!< Total initial water mass, for lab experiments with a fixed total amount
REAL(wp)::S_total!< Total initial salt mass, for lab experiments with a fixed total amount
REAL(wp)::tank_depth!< water depth in meters, used to calculate concentrations below ice for tank experiments
!#######
!Misc
!#######
CHARACTER*3::flush_question='No!'!< Niels, 2017 add: used to indicate in stdout wether flushing occurs at this moment or not
REAL(wp)::melt_err=0._wp!< Niels, 2017 add: used to check how much meltwater vanishes in flushing routine
INTEGER::length_input_lab!< Niels, 2017 add: used to allocate lab testcase input arrays in mo_init, set value in testcases
REAL(wp)::grav_heat_flux_down=0._wp!< output variable for heat loss at the ice bottom caused by gravity drainage (negative = gain)
REAL(wp)::grav_heat_flux_up=0._wp!< output variable for heat gain at the ice bottom caused by gravity drainage (sea water replacing brine, positive = loss)