SICOPOLIS V5-dev  Revision 1264
mask_update_sea_level_m.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Module : m a s k _ u p d a t e _ s e a _ l e v e l _ m
4 !
5 !> @file
6 !!
7 !! Update of the ice-land-ocean mask due to changes of the sea level.
8 !!
9 !! @section Copyright
10 !!
11 !! Copyright 2009-2018 Ralf Greve
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 !> Update of the ice-land-ocean mask due to changes of the sea level.
34 !<------------------------------------------------------------------------------
36 
37  use sico_types_m
39  use sico_vars_m
40 
41  implicit none
42 
43  private
44  public :: mask_update_sea_level
45 
46 contains
47 
48 !-------------------------------------------------------------------------------
49 !> Main function of mask_update_m:
50 !! Update of the ice-land-ocean mask due to changes of the sea level.
51 !<------------------------------------------------------------------------------
52  function mask_update_sea_level(z_sl, i, j)
53 
54  implicit none
55 
56 #ifndef ALLOW_OPENAD
57  integer(i4b), intent(in) :: i, j
58 #else
59  integer(i4b), intent(inout) :: i, j
60 #endif
61  real(dp), intent(in) :: z_sl
62 
63  integer(i2b) :: mask_update_sea_level
64  real(dp) :: rhosw_rho_ratio, H_ice, H_sea
65 
66  rhosw_rho_ratio = rho_sw/rho
67 
68 !-------- Previously ice-free land point or sea point --------
69 
70  if ( (maske(j,i) == 1_i2b).or.(maske(j,i) == 2_i2b) ) then
71 
72  if (zl(j,i) > z_sl) then
73  mask_update_sea_level = 1_i2b ! now ice-free land
74  return
75  else
76  mask_update_sea_level = 2_i2b ! now sea point
77  return
78  end if
79 
80 !-------- Previously grounded-ice or floating-ice point --------
81 
82  else ! (maske(j,i) == 0_i2b, 3_i2b)
83 
84  if (zl(j,i) > z_sl) then
85 
86  mask_update_sea_level = 0_i2b ! now grounded ice
87  return
88 
89  else
90 
91  h_ice = zs(j,i)-zb(j,i) ! ice thickness
92  h_sea = z_sl -zl(j,i) ! sea depth
93 
94  if ( h_ice < (rhosw_rho_ratio*h_sea) ) then
95 
96 #if (MARGIN==1 || (MARGIN==2 && MARINE_ICE_FORMATION==1))
97  mask_update_sea_level = 2_i2b ! ice becomes floating, therefore
98  ! now sea point (ice cut off)
99 #elif (MARGIN==2 && MARINE_ICE_FORMATION==2)
100  mask_update_sea_level = 0_i2b ! now "underwater ice"
101 #elif (MARGIN==3)
102  mask_update_sea_level = 3_i2b ! now floating ice
103 #endif
104  return
105 
106  else
107 
108  mask_update_sea_level = 0_i2b ! now grounded ice
109  return
110 
111  end if
112 
113  end if
114 
115  end if
116 
117  end function mask_update_sea_level
118 
119 !-------------------------------------------------------------------------------
120 
121 end module mask_update_sea_level_m
122 !
integer(i2b), 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 ...
integer(i2b) function, public mask_update_sea_level(z_sl, i, j)
Main function of mask_update_m: Update of the ice-land-ocean mask due to changes of the sea level...
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
Declarations of kind types for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) zs
zs(j,i): Coordinate z of the surface topography
real(dp) rho_sw
RHO_SW: Density of sea water.
real(dp) rho
RHO: Density of ice.
Update of the ice-land-ocean mask due to changes of the sea level.
real(dp), dimension(0:jmax, 0:imax) zb
zb(j,i): Coordinate z of the ice base
Declarations of global variables for SICOPOLIS.