SICOPOLIS V5-dev  Revision 1368
calving_underwater_ice_m.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Module : c a l v i n g _ u n d e r w a t e r _ i c e _ m
4 !
5 !> @file
6 !!
7 !! Calving of "underwater ice".
8 !!
9 !! @section Copyright
10 !!
11 !! Copyright 2009-2018 Ralf Greve, Thorben Dunse
12 !!
13 !! @section License
14 !!
15 !! This file is part of SICOPOLIS.
16 !!
17 !! SICOPOLIS is free software: you can redistribute it and/or modify
18 !! it under the terms of the GNU General Public License as published by
19 !! the Free Software Foundation, either version 3 of the License, or
20 !! (at your option) any later version.
21 !!
22 !! SICOPOLIS is distributed in the hope that it will be useful,
23 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
24 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 !! GNU General Public License for more details.
26 !!
27 !! You should have received a copy of the GNU General Public License
28 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
29 !<
30 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31 
32 !-------------------------------------------------------------------------------
33 !> Calving of "underwater ice".
34 !<------------------------------------------------------------------------------
36 
37  use sico_types_m
39  use sico_vars_m
40  use error_m
41 
42  implicit none
43 
44  real(dp), dimension(0:JMAX,0:IMAX) :: calv_uw_ice
45 
46  public
47 
48 contains
49 
50 !-------------------------------------------------------------------------------
51 !> Main routine: Calving of "underwater ice".
52 !<------------------------------------------------------------------------------
53  subroutine calving_underwater_ice(z_sl)
54 
55  implicit none
56 
57  real(dp), intent(in) :: z_sl
58 
59  real(dp) :: year_sec_inv
60  real(dp) :: rhosw_rho_ratio
61  real(dp) :: calv_uw_coeff, r1_calv_uw, r2_calv_uw
62  real(dp), dimension(0:JMAX,0:IMAX) :: H, H_sea
63  integer(i4b) :: i, j
64 
65 !-------- Term abbreviations --------
66 
67  year_sec_inv = 1.0_dp/year_sec
68 
69  rhosw_rho_ratio = rho_sw/rho
70 
71 !-------- Setting of parameters --------
72 
73 #if (defined(CALV_UW_COEFF))
74  calv_uw_coeff = calv_uw_coeff * year_sec_inv
75 #else
76  errormsg = ' >>> calving_underwater_ice: CALV_UW_COEFF undefined!'
77  call error(errormsg)
78 #endif
79 
80 #if (defined(R1_CALV_UW))
81  r1_calv_uw = r1_calv_uw
82 #else
83  errormsg = ' >>> calving_underwater_ice: R1_CALV_UW undefined!'
84  call error(errormsg)
85 #endif
86 
87 #if (defined(R2_CALV_UW))
88  r2_calv_uw = r2_calv_uw
89 #else
90  errormsg = ' >>> calving_underwater_ice: R2_CALV_UW undefined!'
91  call error(errormsg)
92 #endif
93 
94 !-------- Ice thickness and sea depth --------
95 
96  h = max(h_c + h_t, 0.0_dp) ! ice thickness
97  h_sea = max(z_sl - zl, 0.0_dp) ! sea depth
98 
99 !-------- Calving of "underwater ice" --------
100 
101 #ifndef ALLOW_OPENAD /* Normal */
102 
103  where ( (maske == 0_i1b).and.(h < rhosw_rho_ratio*h_sea) )
104  calv_uw_ice = calv_uw_coeff * h**r1_calv_uw * h_sea**r2_calv_uw
105  elsewhere
106  calv_uw_ice = 0.0_dp
107  end where
108 
109 #else /* OpenAD */
110 
111  do i=0, imax
112  do j=0, jmax
113  if ( (maske(j,i) == 0_i1b) .and. (h(j,i) < rhosw_rho_ratio*h_sea(j,i)) ) then
114  calv_uw_ice(j,i) = calv_uw_coeff * h(j,i)**r1_calv_uw * h_sea(j,i)**r2_calv_uw
115  else
116  calv_uw_ice(j,i) = 0.0_dp
117  end if
118  end do
119  end do
120 
121 #endif /* Normal vs. OpenAD */
122 
123  end subroutine calving_underwater_ice
124 
125 !-------------------------------------------------------------------------------
126 
127 end module calving_underwater_ice_m
128 !
subroutine error(error_message)
Main routine of error_m: Writing of error messages and stopping execution.
Definition: error_m.F90:47
real(dp), dimension(0:jmax, 0:imax) zl
zl(j,i): Coordinate z of the lithosphere surface
Declarations of global variables for SICOPOLIS (for the ANT domain).
Definition: sico_vars_m.F90:35
real(dp), dimension(0:jmax, 0:imax) calv_uw_ice
Calving of "underwater ice".
Declarations of kind types for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) h_c
H_c(j,i): Thickness of ice in the upper (kc) domain (thickness of the cold-ice layer for POLY...
Writing of error messages and stopping execution.
Definition: error_m.F90:35
integer(i1b), dimension(0:jmax, 0:imax) maske
maske(j,i): Ice-land-ocean mask. 0: grounded ice, 1: ice-free land, 2: ocean, 3: floating ice ...
subroutine calving_underwater_ice(z_sl)
Main routine: Calving of "underwater ice".
real(dp) rho_sw
RHO_SW: Density of sea water.
character(len=256) errormsg
errormsg: Error-message string
real(dp) rho
RHO: Density of ice.
real(dp), dimension(0:jmax, 0:imax) h_t
H_t(j,i): Thickness of ice in the lower (kt) domain (thickness of the temperate layer for POLY...
Declarations of global variables for SICOPOLIS.