SICOPOLIS V3.1
 All Classes Files Functions Variables Macros
topography2.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Subroutine : t o p o g r a p h y 2
4 !
5 !> @file
6 !!
7 !! Definition of the initial surface and bedrock topography
8 !! (including gradients) and of the horizontal grid spacings dxi, deta.
9 !! For ice-free initial topography with relaxed lithosphere.
10 !!
11 !! @section Copyright
12 !!
13 !! Copyright 2009-2013 Ralf Greve
14 !!
15 !! @section License
16 !!
17 !! This file is part of SICOPOLIS.
18 !!
19 !! SICOPOLIS is free software: you can redistribute it and/or modify
20 !! it under the terms of the GNU General Public License as published by
21 !! the Free Software Foundation, either version 3 of the License, or
22 !! (at your option) any later version.
23 !!
24 !! SICOPOLIS is distributed in the hope that it will be useful,
25 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
26 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 !! GNU General Public License for more details.
28 !!
29 !! You should have received a copy of the GNU General Public License
30 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
31 !<
32 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33 
34 !-------------------------------------------------------------------------------
35 !> Definition of the initial surface and bedrock topography
36 !! (including gradients) and of the horizontal grid spacings dxi, deta.
37 !! For ice-free initial topography with relaxed lithosphere.
38 !<------------------------------------------------------------------------------
39 subroutine topography2(dxi, deta)
40 
41 use sico_types
43 
44 implicit none
45 
46 real(dp), intent(out) :: dxi, deta
47 
48 integer(i4b) :: i, j
49 integer(i4b) :: ios
50 real(dp) :: xi0, eta0
51 
52 !-------- Set topography --------
53 
54 zl0 = 0.0_dp
55 
56 maske = 1
57 
58 maske(0,:) = 2
59 maske(jmax,:) = 2
60 
61 maske(:,0) = 2
62 maske(:,imax) = 2
63 
64 !-------- Further stuff --------
65 
66 #if (GRID==0 || GRID==1)
67 
68 dxi = dx *1000.0_dp ! km -> m
69 deta = dx *1000.0_dp ! km -> m
70 
71 xi0 = x0 *1000.0_dp ! km -> m
72 eta0 = y0 *1000.0_dp ! km -> m
73 
74 #elif GRID==2
75 
76 stop ' topography2: GRID==2 not allowed for this application!'
77 
78 #endif
79 
80 do i=0, imax
81 do j=0, jmax
82 
83  zs(j,i) = zl0(j,i)
84  zb(j,i) = zl0(j,i)
85  zl(j,i) = zl0(j,i)
86 
87  xi(i) = xi0 + real(i,dp)*dxi
88  eta(j) = eta0 + real(j,dp)*deta
89 
90  call geo_coord(phi(j,i), lambda(j,i), xi(i), eta(j))
91 
92  zm(j,i) = zb(j,i)
93  n_cts(j,i) = -1
94 
95  h_c(j,i) = 0.0_dp
96  h_t(j,i) = 0.0_dp
97 
98  dzs_dtau(j,i) = 0.0_dp
99  dzm_dtau(j,i) = 0.0_dp
100  dzb_dtau(j,i) = 0.0_dp
101  dzl_dtau(j,i) = 0.0_dp
102  dh_c_dtau(j,i) = 0.0_dp
103  dh_t_dtau(j,i) = 0.0_dp
104 
105 end do
106 end do
107 
108 !-------- Metric tensor, gradients of the topography --------
109 
110 call metric()
111 
112 #if TOPOGRAD==0
113 call topograd_1(dxi, deta, 1)
114 #elif TOPOGRAD==1
115 call topograd_2(dxi, deta, 1)
116 #endif
117 
118 !-------- Corresponding area of grid points --------
119 
120 do i=0, imax
121 do j=0, jmax
122  area(j,i) = sq_g11_g(j,i)*sq_g22_g(j,i)*dxi*deta
123 end do
124 end do
125 
126 end subroutine topography2
127 !