SICOPOLIS V5-dev  Revision 1279
topograd_m.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Module : t o p o g r a d _ m
4 !
5 !> @file
6 !!
7 !! Calculation of topography gradients on the staggered grid and on the grid
8 !! points (including length rescaling with the corresponding components of the
9 !! metric tensor).
10 !!
11 !! @section Copyright
12 !!
13 !! Copyright 2009-2018 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 !> Calculation of topography gradients on the staggered grid and on the grid
36 !! points (including length rescaling with the corresponding components of the
37 !! metric tensor).
38 !<------------------------------------------------------------------------------
39 module topograd_m
40 
41  use sico_types_m
43  use sico_vars_m
44  use error_m
45 
46  implicit none
47 
48  public
49 
50 contains
51 
52 !-------------------------------------------------------------------------------
53 !> Calculation of topography gradients on the staggered grid and on the grid
54 !! points (the latter by second-order discretization).
55 !<------------------------------------------------------------------------------
56  subroutine topograd_1(dxi, deta, n_switch)
57 
58  implicit none
59 
60  integer(i4b), intent(in) :: n_switch
61  real(dp), intent(in) :: dxi, deta
62 
63  integer(i4b) :: i, j
64  real(dp) :: dxi_inv, deta_inv
65  real(dp), dimension(0:JMAX,0:IMAX) :: zs_aux, zm_aux, zb_aux
66 
67  dxi_inv = 1.0_dp/dxi
68  deta_inv = 1.0_dp/deta
69 
70 !-------- Distinguish between old and new topography data --------
71 
72  if (n_switch == 1) then
73  zs_aux = zs
74  zm_aux = zm
75  zb_aux = zb
76  else if (n_switch == 2) then
77  zs_aux = zs_neu
78  zm_aux = zm_neu
79  zb_aux = zb_neu
80  else
81  errormsg = ' >>> topograd_1: Wrong value for n_switch!'
82  call error(errormsg)
83  end if
84 
85 !-------- Topography gradients on the staggered grid --------
86 
87 ! ------ x-derivatives
88 
89  do i=0, imax-1
90  do j=0, jmax
91  dzs_dxi(j,i) = (zs_aux(j,i+1)-zs_aux(j,i))*dxi_inv &
92  *insq_g11_sgx(j,i)
93  dzm_dxi(j,i) = (zm_aux(j,i+1)-zm_aux(j,i))*dxi_inv &
94  *insq_g11_sgx(j,i)
95  dzb_dxi(j,i) = (zb_aux(j,i+1)-zb_aux(j,i))*dxi_inv &
96  *insq_g11_sgx(j,i)
97  dh_c_dxi(j,i) = dzs_dxi(j,i)-dzm_dxi(j,i)
98  dh_t_dxi(j,i) = dzm_dxi(j,i)-dzb_dxi(j,i)
99  end do
100  end do
101 
102 ! ------ y-derivatives
103 
104  do i=0, imax
105  do j=0, jmax-1
106  dzs_deta(j,i) = (zs_aux(j+1,i)-zs_aux(j,i))*deta_inv &
107  *insq_g22_sgy(j,i)
108  dzm_deta(j,i) = (zm_aux(j+1,i)-zm_aux(j,i))*deta_inv &
109  *insq_g22_sgy(j,i)
110  dzb_deta(j,i) = (zb_aux(j+1,i)-zb_aux(j,i))*deta_inv &
111  *insq_g22_sgy(j,i)
112  dh_c_deta(j,i) = dzs_deta(j,i)-dzm_deta(j,i)
113  dh_t_deta(j,i) = dzm_deta(j,i)-dzb_deta(j,i)
114  end do
115  end do
116 
117 !-------- Topography gradients on the grid points --------
118 
119 ! ------ x-derivatives
120 
121  do i=1, imax-1
122  do j=0, jmax
123  dzs_dxi_g(j,i) = (zs_aux(j,i+1)-zs_aux(j,i-1))*0.5_dp*dxi_inv &
124  *insq_g11_g(j,i)
125  dzm_dxi_g(j,i) = (zm_aux(j,i+1)-zm_aux(j,i-1))*0.5_dp*dxi_inv &
126  *insq_g11_g(j,i)
127  dzb_dxi_g(j,i) = (zb_aux(j,i+1)-zb_aux(j,i-1))*0.5_dp*dxi_inv &
128  *insq_g11_g(j,i)
129  dh_c_dxi_g(j,i) = dzs_dxi_g(j,i)-dzm_dxi_g(j,i)
130  dh_t_dxi_g(j,i) = dzm_dxi_g(j,i)-dzb_dxi_g(j,i)
131  end do
132  end do
133 
134  do j=0, jmax
135  dzs_dxi_g(j,0) = (zs_aux(j,1)-zs_aux(j,0))*dxi_inv &
136  *insq_g11_g(j,0)
137  dzm_dxi_g(j,0) = (zm_aux(j,1)-zm_aux(j,0))*dxi_inv &
138  *insq_g11_g(j,0)
139  dzb_dxi_g(j,0) = (zb_aux(j,1)-zb_aux(j,0))*dxi_inv &
140  *insq_g11_g(j,0)
141  dh_c_dxi_g(j,0) = dzs_dxi_g(j,0)-dzm_dxi_g(j,0)
142  dh_t_dxi_g(j,0) = dzm_dxi_g(j,0)-dzb_dxi_g(j,0)
143  dzs_dxi_g(j,imax) = (zs_aux(j,imax)-zs_aux(j,imax-1)) &
144  *dxi_inv &
145  *insq_g11_g(j,imax)
146  dzm_dxi_g(j,imax) = (zm_aux(j,imax)-zm_aux(j,imax-1)) &
147  *dxi_inv &
148  *insq_g11_g(j,imax)
149  dzb_dxi_g(j,imax) = (zb_aux(j,imax)-zb_aux(j,imax-1)) &
150  *dxi_inv &
151  *insq_g11_g(j,imax)
152  dh_c_dxi_g(j,imax) = dzs_dxi_g(j,imax)-dzm_dxi_g(j,imax)
153  dh_t_dxi_g(j,imax) = dzm_dxi_g(j,imax)-dzb_dxi_g(j,imax)
154  end do
155 
156 ! ------ y-derivatives
157 
158  do i=0, imax
159  do j=1, jmax-1
160  dzs_deta_g(j,i) = (zs_aux(j+1,i)-zs_aux(j-1,i)) &
161  *0.5_dp*deta_inv &
162  *insq_g22_g(j,i)
163  dzm_deta_g(j,i) = (zm_aux(j+1,i)-zm_aux(j-1,i)) &
164  *0.5_dp*deta_inv &
165  *insq_g22_g(j,i)
166  dzb_deta_g(j,i) = (zb_aux(j+1,i)-zb_aux(j-1,i)) &
167  *0.5_dp*deta_inv &
168  *insq_g22_g(j,i)
169  dh_c_deta_g(j,i) = dzs_deta_g(j,i)-dzm_deta_g(j,i)
170  dh_t_deta_g(j,i) = dzm_deta_g(j,i)-dzb_deta_g(j,i)
171  end do
172  end do
173 
174  do i=0, imax
175  dzs_deta_g(0,i) = (zs_aux(1,i)-zs_aux(0,i))*deta_inv &
176  *insq_g22_g(0,i)
177  dzm_deta_g(0,i) = (zm_aux(1,i)-zm_aux(0,i))*deta_inv &
178  *insq_g22_g(0,i)
179  dzb_deta_g(0,i) = (zb_aux(1,i)-zb_aux(0,i))*deta_inv &
180  *insq_g22_g(0,i)
181  dh_c_deta_g(0,i) = dzs_deta_g(0,i)-dzm_deta_g(0,i)
182  dh_t_deta_g(0,i) = dzm_deta_g(0,i)-dzb_deta_g(0,i)
183  dzs_deta_g(jmax,i) = (zs_aux(jmax,i)-zs_aux(jmax-1,i)) &
184  *deta_inv &
185  *insq_g22_g(jmax,i)
186  dzm_deta_g(jmax,i) = (zm_aux(jmax,i)-zm_aux(jmax-1,i)) &
187  *deta_inv &
188  *insq_g22_g(jmax,i)
189  dzb_deta_g(jmax,i) = (zb_aux(jmax,i)-zb_aux(jmax-1,i)) &
190  *deta_inv &
191  *insq_g22_g(jmax,i)
192  dh_c_deta_g(jmax,i) = dzs_deta_g(jmax,i)-dzm_deta_g(jmax,i)
193  dh_t_deta_g(jmax,i) = dzm_deta_g(jmax,i)-dzb_deta_g(jmax,i)
194  end do
195 
196  end subroutine topograd_1
197 
198 !-------------------------------------------------------------------------------
199 !> Calculation of topography gradients on the staggered grid and on the grid
200 !! points (the latter by fourth-order discretization).
201 !<------------------------------------------------------------------------------
202  subroutine topograd_2(dxi, deta, n_switch)
204  implicit none
205 
206  integer(i4b), intent(in) :: n_switch
207  real(dp), intent(in) :: dxi, deta
208 
209  integer(i4b) :: i, j
210  real(dp) :: dxi_inv, deta_inv, dxi12_inv, deta12_inv
211  real(dp), dimension(0:JMAX,0:IMAX) :: zs_aux, zm_aux, zb_aux
212 
213  dxi_inv = 1.0_dp/dxi
214  deta_inv = 1.0_dp/deta
215 
216  dxi12_inv = 1.0_dp/(12.0_dp*dxi)
217  deta12_inv = 1.0_dp/(12.0_dp*deta)
218 
219 !-------- Distinguish between old and new topography data --------
220 
221  if (n_switch == 1) then
222  zs_aux = zs
223  zm_aux = zm
224  zb_aux = zb
225  else if (n_switch == 2) then
226  zs_aux = zs_neu
227  zm_aux = zm_neu
228  zb_aux = zb_neu
229  else
230  errormsg = ' >>> topograd_2: Wrong value for n_switch!'
231  call error(errormsg)
232  end if
233 
234 !-------- Topography gradients on the staggered grid --------
235 
236 ! ------ x-derivatives
237 
238  do i=0, imax-1
239  do j=0, jmax
240  dzs_dxi(j,i) = (zs_aux(j,i+1)-zs_aux(j,i))*dxi_inv &
241  *insq_g11_sgx(j,i)
242  dzm_dxi(j,i) = (zm_aux(j,i+1)-zm_aux(j,i))*dxi_inv &
243  *insq_g11_sgx(j,i)
244  dzb_dxi(j,i) = (zb_aux(j,i+1)-zb_aux(j,i))*dxi_inv &
245  *insq_g11_sgx(j,i)
246  dh_c_dxi(j,i) = dzs_dxi(j,i)-dzm_dxi(j,i)
247  dh_t_dxi(j,i) = dzm_dxi(j,i)-dzb_dxi(j,i)
248  end do
249  end do
250 
251 ! ------ y-derivatives
252 
253  do i=0, imax
254  do j=0, jmax-1
255  dzs_deta(j,i) = (zs_aux(j+1,i)-zs_aux(j,i))*deta_inv &
256  *insq_g22_sgy(j,i)
257  dzm_deta(j,i) = (zm_aux(j+1,i)-zm_aux(j,i))*deta_inv &
258  *insq_g22_sgy(j,i)
259  dzb_deta(j,i) = (zb_aux(j+1,i)-zb_aux(j,i))*deta_inv &
260  *insq_g22_sgy(j,i)
261  dh_c_deta(j,i) = dzs_deta(j,i)-dzm_deta(j,i)
262  dh_t_deta(j,i) = dzm_deta(j,i)-dzb_deta(j,i)
263  end do
264  end do
265 
266 !-------- Topography gradients on the grid points --------
267 
268 ! ------ x-derivatives
269 
270  do i=2, imax-2
271  do j=0, jmax
272  dzs_dxi_g(j,i) &
273  = ( -zs_aux(j,i+2) + 8.0_dp*zs_aux(j,i+1) &
274  -8.0_dp*zs_aux(j,i-1) + zs_aux(j,i-2) ) &
275  *dxi12_inv &
276  *insq_g11_g(j,i)
277  dzm_dxi_g(j,i) &
278  = ( -zm_aux(j,i+2) + 8.0_dp*zm_aux(j,i+1) &
279  -8.0_dp*zm_aux(j,i-1) + zm_aux(j,i-2) ) &
280  *dxi12_inv &
281  *insq_g11_g(j,i)
282  dzb_dxi_g(j,i) &
283  = ( -zb_aux(j,i+2) + 8.0_dp*zb_aux(j,i+1) &
284  -8.0_dp*zb_aux(j,i-1) + zb_aux(j,i-2) ) &
285  *dxi12_inv &
286  *insq_g11_g(j,i)
287  dh_c_dxi_g(j,i) = dzs_dxi_g(j,i)-dzm_dxi_g(j,i)
288  dh_t_dxi_g(j,i) = dzm_dxi_g(j,i)-dzb_dxi_g(j,i)
289  end do
290  end do
291 
292  do j=0, jmax
293 
294  dzs_dxi_g(j,0) = (zs_aux(j,1)-zs_aux(j,0))*dxi_inv &
295  *insq_g11_g(j,0)
296  dzm_dxi_g(j,0) = (zm_aux(j,1)-zm_aux(j,0))*dxi_inv &
297  *insq_g11_g(j,0)
298  dzb_dxi_g(j,0) = (zb_aux(j,1)-zb_aux(j,0))*dxi_inv &
299  *insq_g11_g(j,0)
300  dh_c_dxi_g(j,0) = dzs_dxi_g(j,0)-dzm_dxi_g(j,0)
301  dh_t_dxi_g(j,0) = dzm_dxi_g(j,0)-dzb_dxi_g(j,0)
302 
303  dzs_dxi_g(j,1) = (zs_aux(j,2)-zs_aux(j,0)) &
304  *0.5_dp*dxi_inv &
305  *insq_g11_g(j,1)
306  dzm_dxi_g(j,1) = (zm_aux(j,2)-zm_aux(j,0)) &
307  *0.5_dp*dxi_inv &
308  *insq_g11_g(j,1)
309  dzb_dxi_g(j,1) = (zb_aux(j,2)-zb_aux(j,0)) &
310  *0.5_dp*dxi_inv &
311  *insq_g11_g(j,1)
312  dh_c_dxi_g(j,1) = dzs_dxi_g(j,1)-dzm_dxi_g(j,1)
313  dh_t_dxi_g(j,1) = dzm_dxi_g(j,1)-dzb_dxi_g(j,1)
314 
315  dzs_dxi_g(j,imax-1) = (zs_aux(j,imax)-zs_aux(j,imax-2)) &
316  *0.5_dp*dxi_inv &
317  *insq_g11_g(j,imax-1)
318  dzm_dxi_g(j,imax-1) = (zm_aux(j,imax)-zm_aux(j,imax-2)) &
319  *0.5_dp*dxi_inv &
320  *insq_g11_g(j,imax-1)
321  dzb_dxi_g(j,imax-1) = (zb_aux(j,imax)-zb_aux(j,imax-2)) &
322  *0.5_dp*dxi_inv &
323  *insq_g11_g(j,imax-1)
324  dh_c_dxi_g(j,imax-1) = dzs_dxi_g(j,imax-1) &
325  -dzm_dxi_g(j,imax-1)
326  dh_t_dxi_g(j,imax-1) = dzm_dxi_g(j,imax-1) &
327  -dzb_dxi_g(j,imax-1)
328 
329  dzs_dxi_g(j,imax) = (zs_aux(j,imax)-zs_aux(j,imax-1)) &
330  *dxi_inv &
331  *insq_g11_g(j,imax)
332  dzm_dxi_g(j,imax) = (zm_aux(j,imax)-zm_aux(j,imax-1)) &
333  *dxi_inv &
334  *insq_g11_g(j,imax)
335  dzb_dxi_g(j,imax) = (zb_aux(j,imax)-zb_aux(j,imax-1)) &
336  *dxi_inv &
337  *insq_g11_g(j,imax)
338  dh_c_dxi_g(j,imax) = dzs_dxi_g(j,imax)-dzm_dxi_g(j,imax)
339  dh_t_dxi_g(j,imax) = dzm_dxi_g(j,imax)-dzb_dxi_g(j,imax)
340 
341  end do
342 
343 ! ------ y-derivatives
344 
345  do i=0, imax
346  do j=2, jmax-2
347  dzs_deta_g(j,i) &
348  = ( -zs_aux(j+2,i) + 8.0_dp*zs_aux(j+1,i) &
349  -8.0_dp*zs_aux(j-1,i) + zs_aux(j-2,i) ) &
350  *deta12_inv &
351  *insq_g22_g(j,i)
352  dzm_deta_g(j,i) &
353  = ( -zm_aux(j+2,i) + 8.0_dp*zm_aux(j+1,i) &
354  -8.0_dp*zm_aux(j-1,i) + zm_aux(j-2,i) ) &
355  *deta12_inv &
356  *insq_g22_g(j,i)
357  dzb_deta_g(j,i) &
358  = ( -zb_aux(j+2,i) + 8.0_dp*zb_aux(j+1,i) &
359  -8.0_dp*zb_aux(j-1,i) + zb_aux(j-2,i) ) &
360  *deta12_inv &
361  *insq_g22_g(j,i)
362  dh_c_deta_g(j,i) = dzs_deta_g(j,i)-dzm_deta_g(j,i)
363  dh_t_deta_g(j,i) = dzm_deta_g(j,i)-dzb_deta_g(j,i)
364  end do
365  end do
366 
367  do i=0, imax
368 
369  dzs_deta_g(0,i) = (zs_aux(1,i)-zs_aux(0,i))*deta_inv &
370  *insq_g22_g(0,i)
371  dzm_deta_g(0,i) = (zm_aux(1,i)-zm_aux(0,i))*deta_inv &
372  *insq_g22_g(0,i)
373  dzb_deta_g(0,i) = (zb_aux(1,i)-zb_aux(0,i))*deta_inv &
374  *insq_g22_g(0,i)
375  dh_c_deta_g(0,i) = dzs_deta_g(0,i)-dzm_deta_g(0,i)
376  dh_t_deta_g(0,i) = dzm_deta_g(0,i)-dzb_deta_g(0,i)
377 
378  dzs_deta_g(1,i) = (zs_aux(2,i)-zs_aux(0,i)) &
379  *0.5_dp*deta_inv &
380  *insq_g22_g(1,i)
381  dzm_deta_g(1,i) = (zm_aux(2,i)-zm_aux(0,i)) &
382  *0.5_dp*deta_inv &
383  *insq_g22_g(1,i)
384  dzb_deta_g(1,i) = (zb_aux(2,i)-zb_aux(0,i)) &
385  *0.5_dp*deta_inv &
386  *insq_g22_g(1,i)
387  dh_c_deta_g(1,i) = dzs_deta_g(1,i)-dzm_deta_g(1,i)
388  dh_t_deta_g(1,i) = dzm_deta_g(1,i)-dzb_deta_g(1,i)
389 
390  dzs_deta_g(jmax-1,i) = (zs_aux(jmax,i)-zs_aux(jmax-2,i)) &
391  *0.5_dp*deta_inv &
392  *insq_g22_g(jmax-1,i)
393  dzm_deta_g(jmax-1,i) = (zm_aux(jmax,i)-zm_aux(jmax-2,i)) &
394  *0.5_dp*deta_inv &
395  *insq_g22_g(jmax-1,i)
396  dzb_deta_g(jmax-1,i) = (zb_aux(jmax,i)-zb_aux(jmax-2,i)) &
397  *0.5_dp*deta_inv &
398  *insq_g22_g(jmax-1,i)
399  dh_c_deta_g(jmax-1,i) = dzs_deta_g(jmax-1,i) &
400  -dzm_deta_g(jmax-1,i)
401  dh_t_deta_g(jmax-1,i) = dzm_deta_g(jmax-1,i) &
402  -dzb_deta_g(jmax-1,i)
403 
404  dzs_deta_g(jmax,i) = (zs_aux(jmax,i)-zs_aux(jmax-1,i)) &
405  *deta_inv &
406  *insq_g22_g(jmax,i)
407  dzm_deta_g(jmax,i) = (zm_aux(jmax,i)-zm_aux(jmax-1,i)) &
408  *deta_inv &
409  *insq_g22_g(jmax,i)
410  dzb_deta_g(jmax,i) = (zb_aux(jmax,i)-zb_aux(jmax-1,i)) &
411  *deta_inv &
412  *insq_g22_g(jmax,i)
413  dh_c_deta_g(jmax,i) = dzs_deta_g(jmax,i)-dzm_deta_g(jmax,i)
414  dh_t_deta_g(jmax,i) = dzm_deta_g(jmax,i)-dzb_deta_g(jmax,i)
415 
416  end do
417 
418  end subroutine topograd_2
419 
420 !-------------------------------------------------------------------------------
421 
422 end module topograd_m
423 !
real(dp), dimension(0:jmax, 0:imax) insq_g22_sgy
insq_g22_sgy(j,i): Inverse square root of g22, at (i,j+1/2)
real(dp), dimension(0:jmax, 0:imax) dh_c_deta
dH_c_deta(j,i): Derivative of H_c by eta (at i,j+1/2)
subroutine error(error_message)
Main routine of error_m: Writing of error messages and stopping execution.
Definition: error_m.F90:47
real(dp), dimension(0:jmax, 0:imax) insq_g11_sgx
insq_g11_sgx(j,i): Inverse square root of g11, at (i+1/2,j)
real(dp), dimension(0:jmax, 0:imax) insq_g22_g
insq_g22_g(j,i): Inverse square root of g22 on grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dh_c_dxi_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dh_c_dxi
dH_c_dxi(j,i): Derivative of H_c by xi (at i+1/2,j)
real(dp), dimension(0:jmax, 0:imax) dzs_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dzm_deta
dzm_deta(j,i): Derivative of zm by eta (at i,j+1/2)
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_m.F90:57
real(dp), dimension(0:jmax, 0:imax) dzs_dxi
dzs_dxi(j,i): Derivative of zs by xi (at i+1/2,j)
real(dp), dimension(0:jmax, 0:imax) dzb_dxi
dzb_dxi(j,i): Derivative of zb by xi (at i+1/2,j)
Declarations of global variables for SICOPOLIS (for the ANT domain).
Definition: sico_vars_m.F90:35
real(dp), dimension(0:jmax, 0:imax) dh_t_deta
dH_t_deta(j,i): Derivative of H_t by eta (at i,j+1/2)
Declarations of kind types for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) zs
zs(j,i): Coordinate z of the surface topography
real(dp), dimension(0:jmax, 0:imax) dh_c_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
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_m.F90:203
Writing of error messages and stopping execution.
Definition: error_m.F90:35
real(dp), dimension(0:jmax, 0:imax) dzb_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) zs_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:jmax, 0:imax) dzs_deta
dzs_deta(j,i): Derivative of zs by eta (at i,j+1/2)
real(dp), dimension(0:jmax, 0:imax) zm
zm(j,i): Coordinate z of the bottom of the upper (kc) ice domain = top of the lower (kt) ice domain (...
real(dp), dimension(0:jmax, 0:imax) dzb_deta
dzb_deta(j,i): Derivative of zb by eta (at i,j+1/2)
real(dp), dimension(0:jmax, 0:imax) dh_t_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dh_t_dxi_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dzm_dxi_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dzm_dxi
dzm_dxi(j,i): Derivative of zm by xi (at i+1/2,j)
real(dp), dimension(0:jmax, 0:imax) dzs_dxi_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
Calculation of topography gradients on the staggered grid and on the grid points (including length re...
Definition: topograd_m.F90:39
real(dp), dimension(0:jmax, 0:imax) dzm_deta_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) insq_g11_g
insq_g11_g(j,i): Inverse square root of g11 on grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) zb_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:jmax, 0:imax) zm_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:jmax, 0:imax) dh_t_dxi
dH_t_dxi(j,i): Derivative of H_t by xi (at i+1/2,j)
character(len=256) errormsg
errormsg: Error-message string
real(dp), dimension(0:jmax, 0:imax) zb
zb(j,i): Coordinate z of the ice base
Declarations of global variables for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) dzb_dxi_g
(.)_g(j,i): Staggered-grid quantity (.) interpolated to grid point (i,j)