53 subroutine calc_gia(time, z_sl, dtime, dxi, deta, itercount, iter_wss)
57 integer(i4b),
intent(in) :: itercount, iter_wss
58 real(dp),
intent(in) :: time
59 real(dp),
intent(in) :: z_sl
60 real(dp),
intent(in) :: dtime, dxi, deta
63 real(dp) :: tldt_inv(0:jmax,0:imax)
65 real(dp) :: rho_rhoa_ratio, rhosw_rhoa_ratio
78 dtime_inv = 1.0_dp/dtime
96 if (
maske(j,i) <= 1_i2b)
then 100 -frac_llra*rho_rhoa_ratio*(
h_c(j,i)+
h_t(j,i))) )
106 -frac_llra*rhosw_rhoa_ratio*z_sl) )
120 if ((mod(itercount, iter_wss)==0).or.(itercount==1))
then 121 write(6, fmt=
'(10x,a)')
'Computation of wss' 122 call calc_elra(z_sl, dxi, deta)
128 zl_neu(j,i) = tldt_inv(j,i) &
170 #if (defined(EXEC_MAKE_ZL0)) 174 write(6, fmt=
'(a)')
' ' 175 write(6, fmt=
'(a)')
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * ' 176 write(6, fmt=
'(a)')
' >>> calc_gia: Routine make_zl0 successfully completed, ' 177 write(6, fmt=
'(a)')
' isostatically relaxed lithosphere ' 178 write(6, fmt=
'(a)')
' topography written on file ' 179 write(6, fmt=
'(a)')
' (in directory specified by OUTPATH). ' 180 write(6, fmt=
'(a)')
' Execution of SICOPOLIS stopped. ' 181 write(6, fmt=
'(a)')
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * ' 182 write(6, fmt=
'(a)')
' ' 194 subroutine calc_elra(z_sl, dxi, deta)
198 real(dp),
intent(in) :: z_sl, dxi, deta
200 integer(i4b) :: i, j, ir, jr, il, jl, n
201 integer(i4b) :: ir_max, jr_max, min_imax_jmax
202 integer(i4b) :: il_begin, il_end, jl_begin, jl_end
203 real(dp) :: rho_g, rho_sw_g, rho_a_g_inv
204 real(dp) :: dxi_inv, deta_inv
205 real(dp) :: kei_r_incr_inv
206 real(dp),
dimension(0:JMAX,0:IMAX) :: l_r, l_r_inv, fac_wss
208 real(dp),
allocatable,
dimension(:,:) :: f_0
210 real(dp),
parameter :: r_infl = 8.0_dp
218 rho_a_g_inv = 1.0_dp/(
rho_a*
g)
221 deta_inv = 1.0_dp/deta
228 l_r_inv(j,i) = 1.0_dp/l_r(j,i)
233 ra_max = r_infl*maxval(l_r)
235 ir_max = floor(ra_max*dxi_inv)
236 jr_max = floor(ra_max*deta_inv)
239 min_imax_jmax = min(imax, jmax)
240 ir_max = min(ir_max, min_imax_jmax)
241 jr_max = min(jr_max, min_imax_jmax)
251 allocate(f_0(jl_begin:jl_end, il_begin:il_end))
253 do il=il_begin, il_end
254 do jl=jl_begin, jl_end
256 i = min(max(il, 0), imax)
257 j = min(max(jl, 0), jmax)
259 if (
maske(j,i)==0)
then 260 f_0(jl,il) = rho_g *
area(j,i) * (
h_c(j,i) +
h_t(j,i))
261 else if (
maske(j,i)==1)
then 264 f_0(jl,il) = rho_sw_g *
area(j,i) * z_sl
280 do ir=-ir_max, ir_max
281 do jr=-jr_max, jr_max
284 n = nint(
dist_dxdy(jr,ir)*l_r_inv(j,i)*kei_r_incr_inv )
289 n = nint(
dist_dxdy(jr,ir)*l_r_inv(j,i)*kei_r_incr_inv )
294 wss(j,i) =
wss(j,i) - fac_wss(j,i)*f_0(jr+j,ir+i)*
kei(n)
304 end subroutine calc_elra
313 subroutine make_zl0()
317 integer(i4b) :: i, j, m, n, i_f, j_f, n_filter
319 real(dp),
dimension(0:JMAX,0:IMAX) :: zl0_raw, zl0_smoothed
321 real(dp) :: rho_ratio
322 real(dp) :: filter_width, sigma_filter
323 real(dp) :: dist, weigh, sum_weigh
324 character(len= 8) :: ch_resolution
325 character(len= 64) :: ch_model
326 character(len=256) :: filename, filename_with_path
330 #if (GRID==0 || GRID==1) 337 stop
' >>> make_zl0: Routine works only for GRID 0 or 1!' 354 if (
maske(j,i) == 0)
then 355 zl0_raw(j,i) =
zl(j,i) + rho_ratio*(
h_c(j,i)+
h_t(j,i))
357 zl0_raw(j,i) =
zl(j,i)
369 stop
' >>> make_zl0: REBOUND must be either 0, 1 or 2!' 378 sigma_filter = filter_width/dx
381 n_filter = ceiling(2.0_dp*sigma_filter)
382 n_filter = max(n_filter, 5)
389 do m=-n_filter, n_filter
390 do n=-n_filter, n_filter
396 if (i_f > imax) i_f = imax
399 if (j_f > jmax) j_f = jmax
401 dist = sqrt(
real(m,
dp)**2+
real(n,
dp)**2)
402 weigh = exp(-(dist/sigma_filter)**2)
403 sum_weigh = sum_weigh + weigh
405 zl0_smoothed(j,i) = zl0_smoothed(j,i) + weigh*zl0_raw(j_f,i_f)
410 zl0_smoothed(j,i) = zl0_smoothed(j,i)/sum_weigh
417 if ( abs(dx-nint(dx)) <
eps )
then 418 write(ch_resolution, fmt=
'(i8)') nint(dx)
420 write(ch_resolution, fmt=
'(f8.2)') dx
423 ch_resolution = adjustl(ch_resolution)
426 ch_model =
'rigid_lithosphere' 428 ch_model =
'local_lithosphere' 430 ch_model =
'elastic_lithosphere' 434 filename = trim(filename)//
'_zl0_'//trim(ch_model)//
'.dat' 435 filename_with_path = trim(outpath)//
'/'//trim(filename)
437 open(23, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'replace')
439 if (ios /= 0) stop
' >>> make_zl0: Error when opening the new zl0 file!' 442 '%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' 445 '% Relaxed lithosphere surface topography without ice load, in m AMSL.' 447 '% Horizontal resolution '//trim(ch_resolution)//
' km.' 448 write(23,
'(a,i3,a,i3,a,i3,a,i3,a)') &
449 '% ', jmax+1,
' records [j = ', &
450 jmax,
' (-1) 0] with ', imax+1, &
451 ' values [i = 0 (1) ', imax,
'] in each record.' 453 '%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' 458 write(23,
'(f8.1)', advance=
'no') zl0_smoothed(j,i)
462 write(23,
'(f8.1)') zl0_smoothed(j,i)
465 close(23, status=
'keep')
467 end subroutine make_zl0
real(dp), parameter eps
eps: Small number
integer(i2b), dimension(0:jmax, 0:imax) maske
maske(j,i): Ice-land-ocean mask. 0: grounded ice, 1: ice-free land, 2: ocean, 3: floating ice ...
real(dp), dimension(0:jmax, 0:imax) area
area(j,i): Area of grid cell associated with grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) zl_target
zl_target(j,i): Target topography (lithosphere surface)
real(dp) target_topo_tau
target_topo_tau: Relaxation time for target-topography adjustment
real(dp), dimension(0:jmax, 0:imax) zl
zl(j,i): Coordinate z of the lithosphere surface
real(dp) g
G: Acceleration due to gravity.
real(dp), dimension(0:jmax, 0:imax) zl_neu
(.)_neu: New value of quantity (.) computed during an integration step
Declarations of global variables for SICOPOLIS (for the ANT domain).
integer(i4b), parameter rcl1
rcl1: Maximum length of record for input files (with factor 3 safety margin)
real(dp), parameter no_value_neg_2
no_value_neg_2: Negative no-value parameter
real(dp), dimension(0:jmax, 0:imax) wss
wss(j,i): Isostatic steady-state displacement of the lithosphere
Declarations of kind types for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) h_c
H_c(j,i): Thickness of ice in the upper (kc) domain (thickness of the cold-ice layer for POLY...
subroutine, public calc_gia(time, z_sl, dtime, dxi, deta, itercount, iter_wss)
Main subroutine of calc_gia_m: Computation of the glacial isostatic adjustment of the lithosphere sur...
character(len=64) ch_domain_long
ch_domain_long: Long name of the computational domain
real(dp), dimension(0:jmax, 0:imax) zl0
zl0(j,i): zl for isostatically relaxed ice-free conditions
real(dp) time_target_topo_final
time_target_topo_final: Final time for target-topography adjustment
real(dp), dimension(-10000:10000) kei
kei(n): Tabulated values of the kei function (Kelvin function of zero order)
real(dp) time_target_topo_init
time_target_topo_init: Initial time for target-topography adjustment
real(dp), dimension(-jmax:jmax,-imax:imax) dist_dxdy
dist_dxdy(jr,ir): Distance between grid points with delta_i=ir, delta_j=jr
real(dp), parameter pi
pi: Constant pi
real(dp), dimension(0:jmax, 0:imax) sq_g11_g
sq_g11_g(j,i): Square root of the coefficient g11 of the metric tensor on grid point (i...
real(dp), dimension(0:jmax, 0:imax) time_lag_asth
time_lag_asth(j,i): Time lag of the relaxing asthenosphere
character(len=16) ch_domain_short
ch_domain_short: Short name of the computational domain
real(dp) kei_r_incr
kei_r_incr: Increment of the argument r of the tabulated kei function
real(dp) rho_sw
RHO_SW: Density of sea water.
real(dp) rho
RHO: Density of ice.
real(dp) rho_a
RHO_A: Density of the asthenosphere.
integer, parameter dp
Double-precision reals.
Computation of the glacial isostatic adjustment of the lithosphere surface.
real(dp), dimension(0:jmax, 0:imax) h_t
H_t(j,i): Thickness of ice in the lower (kt) domain (thickness of the temperate layer for POLY...
Declarations of global variables for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) flex_rig_lith
flex_rig_lith(j,i): Flexural rigidity of the lithosphere
real(dp), dimension(0:jmax, 0:imax) dzl_dtau
dzl_dtau(j,i): Derivative of zl by tau (time)