SICOPOLIS V3.1
 All Classes Files Functions Variables Macros
calc_temp_bas.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Subroutine : c a l c _ t e m p _ b a s
4 !
5 !> @file
6 !!
7 !! Computation of the basal temperatures.
8 !!
9 !! @section Copyright
10 !!
11 !! Copyright 2009-2013 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 basal temperatures.
34 !<------------------------------------------------------------------------------
35 subroutine calc_temp_bas()
36 
37 use sico_types
39 
40 implicit none
41 integer(i4b) :: i, j
42 
43 !-------- Computation of the basal temperatures --------
44 
45 do i=0, imax
46 do j=0, jmax
47 
48  if ( (maske(j,i) == 0).or.(maske(j,i) == 3) ) then
49  ! glaciated land or floating ice
50 
51  if (n_cts(j,i) == -1) then ! cold ice base
52 
53  temp_b(j,i) = temp_c(0,j,i)
54  temph_b(j,i) = temp_c(0,j,i) - temp_c_m(0,j,i)
55  ! relative to the pressure melting point
56 
57  else ! n_cts(j,i) == 0 or 1, temperate ice base
58 
59  temp_b(j,i) = temp_t_m(0,j,i)
60  temph_b(j,i) = 0.0_dp
61  ! relative to the pressure melting point
62 
63  end if
64 
65  else ! maske(j,i) == 1 or 2, ice-free land or sea
66 
67  temp_b(j,i) = temp_c(0,j,i)
68  temph_b(j,i) = temp_c(0,j,i) - temp_c_m(0,j,i)
69  ! relative to the pressure melting point
70 
71  end if
72 
73 end do
74 end do
75 
76 end subroutine calc_temp_bas
77 !