SICOPOLIS V5-dev  Revision 1173
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-2017 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  integer(i4b), intent(in) :: i, j
57  real(dp), intent(in) :: z_sl
58 
59  integer(i2b) :: mask_update_sea_level
60  real(dp) :: rhosw_rho_ratio, H_ice, H_sea
61 
62  rhosw_rho_ratio = rho_sw/rho
63 
64 !-------- Previously ice-free land point or sea point --------
65 
66  if ( (maske(j,i) == 1_i2b).or.(maske(j,i) == 2_i2b) ) then
67 
68  if (zl(j,i) > z_sl) then
69  mask_update_sea_level = 1_i2b ! now ice-free land
70  return
71  else
72  mask_update_sea_level = 2_i2b ! now sea point
73  return
74  end if
75 
76 !-------- Previously grounded-ice or floating-ice point --------
77 
78  else ! (maske(j,i) == 0_i2b, 3_i2b)
79 
80  if (zl(j,i) > z_sl) then
81 
82  mask_update_sea_level = 0_i2b ! now grounded ice
83  return
84 
85  else
86 
87  h_ice = zs(j,i)-zb(j,i) ! ice thickness
88  h_sea = z_sl -zl(j,i) ! sea depth
89 
90  if ( h_ice < (rhosw_rho_ratio*h_sea) ) then
91 
92 #if (MARGIN==1 || (MARGIN==2 && MARINE_ICE_FORMATION==1))
93  mask_update_sea_level = 2_i2b ! ice becomes floating, therefore
94  ! now sea point (ice cut off)
95 #elif (MARGIN==2 && MARINE_ICE_FORMATION==2)
96  mask_update_sea_level = 0_i2b ! now "underwater ice"
97 #elif (MARGIN==3)
98  mask_update_sea_level = 3_i2b ! now floating ice
99 #endif
100  return
101 
102  else
103 
104  mask_update_sea_level = 0_i2b ! now grounded ice
105  return
106 
107  end if
108 
109  end if
110 
111  end if
112 
113  end function mask_update_sea_level
114 
115 !-------------------------------------------------------------------------------
116 
117 end module mask_update_sea_level_m
118 !
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.