SICOPOLIS V5-dev  Revision 1105
calc_thk_water_bas_m.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Module : c a l c _ t h k _ w a t e r _ b a s _ m
4 !
5 !> @file
6 !!
7 !! Computation of the thickness of the water column under the ice base.
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 !> Computation of the thickness of the water column under the ice base.
34 !<------------------------------------------------------------------------------
36 
37  use sico_types_m
39  use sico_vars_m
40 
41 #if (BASAL_HYDROLOGY==1)
42  use hydro_m
43 #endif
44 
45  implicit none
46 
47  private
48  public :: calc_thk_water_bas
49 
50 contains
51 
52 !-------------------------------------------------------------------------------
53 !> Main subroutine of calc_thk_water_bas_m:
54 !! Computation of the thickness of the water column under the ice base.
55 !<------------------------------------------------------------------------------
56  subroutine calc_thk_water_bas(z_sl)
57 
58  implicit none
59 
60  real(dp), intent(in) :: z_sl
61 
62  logical, save :: firstcall = .true.
63 
64 #if (BASAL_HYDROLOGY==1)
65  real(dp), save :: rho_rho_w_ratio
66  integer , dimension(0:IMAX,0:JMAX) :: hydro_icemask
67  real(dp), dimension(0:IMAX,0:JMAX) :: hydro_topg, hydro_thk, &
68  hydro_temppabase, hydro_supply, &
69  hydro_sflux, hydro_bwat
70  type(hydro_t), save :: hydro
71  !!! Does this need a save attribute?
72 #endif
73 
74 !-------- Water column --------
75 
76 #if (BASAL_HYDROLOGY==1)
77 
78  if (firstcall) then
79 
80  rho_rho_w_ratio = rho/rho_w
81 
82  call hydro_init(hydro, xi, eta)
83  call hydro_gen_conf(hydro, &
84  & method='quinn', &
85  & avoid_frz=.false., &
86  & filter_len=0.0_dp, &
87  & rho_seawater=rho_sw, &
88  & rho_freshwater=rho_w, &
89  & rho_ice=rho)
90 
91  end if
92 
93  hydro_topg = transpose(zl)-z_sl
94  hydro_temppabase = transpose(temph_b)
95 
96  where (transpose(maske)==0_i2b) ! grounded ice
97  hydro_icemask = 1
98  hydro_thk = transpose(h_c+h_t)
99  hydro_supply = rho_rho_w_ratio*transpose(q_b_tot)
100  elsewhere
101  hydro_icemask = 0
102  hydro_thk = 0.0_dp
103  hydro_supply = 0.0_dp
104  end where
105 
106  call hydro_set_topg(hydro, hydro_topg)
107  call hydro_set_thk(hydro, hydro_thk)
108  call hydro_set_temppabase(hydro, hydro_temppabase)
109  call hydro_set_supply(hydro, hydro_supply)
110  call hydro_set_mask(hydro, hydro_icemask)
111 
112  call hydro_update(hydro)
113 
114  call hydro_get_sflux(hydro, hydro_sflux)
115  call hydro_get_bwat(hydro, hydro_bwat)
116 
117  h_w = transpose(hydro_bwat)
118 
119 #else
120  where (maske==0_i2b) h_w = 0.0_dp ! grounded ice
121 #endif
122 
123  where (maske==2_i2b) ! ocean
124  h_w = z_sl-zl
125  elsewhere (maske==3_i2b) ! floating ice
126  h_w = zb-zl
127  elsewhere (maske==1_i2b) ! ice-free land
128  h_w = 0.0_dp
129  end where
130 
131  if (firstcall) firstcall = .false.
132 
133  end subroutine calc_thk_water_bas
134 
135 !-------------------------------------------------------------------------------
136 
137 end module calc_thk_water_bas_m
138 !
subroutine, public calc_thk_water_bas(z_sl)
Main subroutine of calc_thk_water_bas_m: Computation of the thickness of the water column under the i...
real(dp) rho_w
RHO_W: Density of pure water.
Computation of the thickness of the water column under the ice base.
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 ...
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) h_c
H_c(j,i): Thickness of ice in the upper (kc) domain (thickness of the cold-ice layer for POLY...
real(dp), dimension(0:jmax, 0:imax) q_b_tot
Q_b_tot(j,i): Sum of Q_bm and Q_tld.
real(dp), dimension(0:jmax, 0:imax) temph_b
temph_b(j,i): Basal temperature relative to the pressure melting point
real(dp), dimension(0:jmax) eta
eta(j): Coordinate eta (= y) of grid point j
real(dp), dimension(0:imax) xi
xi(i): Coordinate xi (= x) of grid point i
real(dp) rho_sw
RHO_SW: Density of sea water.
real(dp) rho
RHO: Density of ice.
real(dp), dimension(0:jmax, 0:imax) zb
zb(j,i): Coordinate z of the ice base
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...
real(dp), dimension(0:jmax, 0:imax) h_w
H_w(j,i): Thickness of the water column under the ice base.
Declarations of global variables for SICOPOLIS.