SICOPOLIS V3.0
 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 integer(i4b) :: i, j
46 integer(i4b) :: ios
47 real(dp) :: dxi, deta
48 real(dp) :: xi0, eta0
49 
50 !-------- Set topography --------
51 
52 zl0 = 0.0_dp
53 
54 maske = 1
55 
56 maske(0,:) = 2
57 maske(jmax,:) = 2
58 
59 maske(:,0) = 2
60 maske(:,imax) = 2
61 
62 !-------- Further stuff --------
63 
64 #if (GRID==0 || GRID==1)
65 
66 dxi = dx *1000.0_dp ! km -> m
67 deta = dx *1000.0_dp ! km -> m
68 
69 xi0 = x0 *1000.0_dp ! km -> m
70 eta0 = y0 *1000.0_dp ! km -> m
71 
72 #elif GRID==2
73 
74 stop ' topography2: GRID==2 not allowed for this application!'
75 
76 #endif
77 
78 do i=0, imax
79 do j=0, jmax
80 
81  zs(j,i) = zl0(j,i)
82  zb(j,i) = zl0(j,i)
83  zl(j,i) = zl0(j,i)
84 
85  xi(i) = xi0 + real(i,dp)*dxi
86  eta(j) = eta0 + real(j,dp)*deta
87 
88  call geo_coord(phi(j,i), lambda(j,i), xi(i), eta(j))
89 
90  zm(j,i) = zb(j,i)
91  n_cts(j,i) = -1
92 
93  h_c(j,i) = 0.0_dp
94  h_t(j,i) = 0.0_dp
95 
96  dzs_dtau(j,i) = 0.0_dp
97  dzm_dtau(j,i) = 0.0_dp
98  dzb_dtau(j,i) = 0.0_dp
99  dzl_dtau(j,i) = 0.0_dp
100  dh_c_dtau(j,i) = 0.0_dp
101  dh_t_dtau(j,i) = 0.0_dp
102 
103 end do
104 end do
105 
106 !-------- Metric tensor, gradients of the topography --------
107 
108 call metric
109 
110 #if TOPOGRAD==0
111 call topograd_1(dxi, deta, 1)
112 #elif TOPOGRAD==1
113 call topograd_2(dxi, deta, 1)
114 #endif
115 
116  1000 format(a)
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 !