SICOPOLIS V3.2
 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-2016 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 use sico_vars
44 
45 implicit none
46 
47 real(dp), intent(out) :: dxi, deta
48 
49 integer(i4b) :: i, j
50 integer(i4b) :: ios
51 real(dp) :: xi0, eta0
52 
53 !-------- Set topography --------
54 
55 zl0 = 0.0_dp
56 
57 maske = 1
58 
59 maske(0,:) = 2
60 maske(jmax,:) = 2
61 
62 maske(:,0) = 2
63 maske(:,imax) = 2
64 
65 !-------- Further stuff --------
66 
67 #if (GRID==0 || GRID==1)
68 
69 dxi = dx *1000.0_dp ! km -> m
70 deta = dx *1000.0_dp ! km -> m
71 
72 xi0 = x0 *1000.0_dp ! km -> m
73 eta0 = y0 *1000.0_dp ! km -> m
74 
75 #elif GRID==2
76 
77 stop ' topography2: GRID==2 not allowed for this application!'
78 
79 #endif
80 
81 do i=0, imax
82 do j=0, jmax
83 
84  zs(j,i) = zl0(j,i)
85  zb(j,i) = zl0(j,i)
86  zl(j,i) = zl0(j,i)
87 
88  xi(i) = xi0 + real(i,dp)*dxi
89  eta(j) = eta0 + real(j,dp)*deta
90 
91  call geo_coord(phi(j,i), lambda(j,i), xi(i), eta(j))
92 
93  zm(j,i) = zb(j,i)
94  n_cts(j,i) = -1
95  kc_cts(j,i) = 0
96 
97  h_c(j,i) = 0.0_dp
98  h_t(j,i) = 0.0_dp
99 
100  dzs_dtau(j,i) = 0.0_dp
101  dzm_dtau(j,i) = 0.0_dp
102  dzb_dtau(j,i) = 0.0_dp
103  dzl_dtau(j,i) = 0.0_dp
104  dh_c_dtau(j,i) = 0.0_dp
105  dh_t_dtau(j,i) = 0.0_dp
106 
107 end do
108 end do
109 
110 !-------- Metric tensor, gradients of the topography --------
111 
112 call metric()
113 
114 #if TOPOGRAD==0
115 call topograd_1(dxi, deta, 1)
116 #elif TOPOGRAD==1
117 call topograd_2(dxi, deta, 1)
118 #endif
119 
120 !-------- Corresponding area of grid points --------
121 
122 do i=0, imax
123 do j=0, jmax
124  area(j,i) = sq_g11_g(j,i)*sq_g22_g(j,i)*dxi*deta
125 end do
126 end do
127 
128 end subroutine topography2
129 !
subroutine topograd_2(dxi, deta, n_switch)
Calculation of topography gradients on the staggered grid and on the grid points (the latter by fourt...
Definition: topograd_2.F90:41
Declarations of kind types for SICOPOLIS.
Definition: sico_types.F90:35
subroutine topograd_1(dxi, deta, n_switch)
Calculation of topography gradients on the staggered grid and on the grid points (the latter by secon...
Definition: topograd_1.F90:41
Declarations of global variables for SICOPOLIS (for the ANT domain).
Definition: sico_vars.F90:35
subroutine topography2(dxi, deta)
Definition of the initial surface and bedrock topography (including gradients) and of the horizontal ...
Definition: topography2.F90:39
subroutine geo_coord(phi_val, lambda_val, x_val, y_val)
Computation of longitude lambda and latitude phi for position (x,y) in the numerical domain...
Definition: geo_coord.F90:37
subroutine metric()
Definition of the components g11 and g22 of the metric tensor of the applied coordinates.
Definition: metric.F90:37
Declarations of global variables for SICOPOLIS.