51 integer(i4b) :: i, j, m, n, i_f, j_f, n_filter
53 real(dp),
dimension(0:JMAX,0:IMAX) :: zl0_raw, zl0_smoothed
55 real(dp) :: filter_width, sigma_filter
56 real(dp) :: dist, weigh, sum_weigh
57 character(len= 8) :: ch_resolution
58 character(len= 64) :: ch_model
59 character(len=256) :: ch_filename
63 #if (GRID==0 || GRID==1)
69 stop
' make_zl0: Routine works only for GRID 0 or 1!'
86 if (maske(j,i) == 0)
then
87 zl0_raw(j,i) = zl(j,i) + rho_ratio*(h_c(j,i)+h_t(j,i))
89 zl0_raw(j,i) = zl(j,i)
101 stop
' make_zl0: REBOUND must be either 0, 1 or 2!'
110 filter_width =
real(DX, dp)
113 sigma_filter = filter_width/
real(DX, dp)
116 n_filter = ceiling(2.0_dp*sigma_filter)
117 n_filter = max(n_filter, 5)
121 do m=-n_filter, n_filter
122 do n=-n_filter, n_filter
128 if (i_f > imax) i_f = imax
131 if (j_f > jmax) j_f = jmax
133 dist = sqrt(
real(m,dp)**2+
real(n,dp)**2)
134 weigh = exp(-(dist/sigma_filter)**2)
135 sum_weigh = sum_weigh + weigh
137 zl0_smoothed(j,i) = zl0_smoothed(j,i) + weigh*zl0_raw(j_f,i_f)
142 zl0_smoothed(j,i) = zl0_smoothed(j,i)/sum_weigh
149 if ( abs(
real(dx,dp)-nint(
real(dx,dp))) < eps ) then
150 write(ch_resolution, fmt=
'(i8)') nint(
real(dx,dp))
152 write(ch_resolution, fmt=
'(f8.2)')
real(dx,dp)
155 ch_resolution = adjustl(ch_resolution)
158 ch_model =
'rigid_lithosphere'
160 ch_model =
'local_lithosphere'
162 ch_model =
'elastic_lithosphere'
165 ch_filename = trim(ch_domain_short)//
'_'//trim(ch_resolution)
166 ch_filename = trim(ch_filename)//
'_zl0_'//trim(ch_model)//
'.dat'
168 open(23, iostat=ios, &
169 file=outpath//
'/'//trim(ch_filename), &
170 recl=8192, status=
'replace')
171 if (ios /= 0) stop
' make_zl0: Error when opening the new zl0 file!'
174 '%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
175 write(23,
'(a)')
'% '//trim(ch_domain_long)//
':'
177 '% Relaxed lithosphere surface topography without ice load, in m AMSL.'
179 '% Horizontal resolution '//trim(ch_resolution)//
' km.'
180 write(23,
'(a,i3,a,i3,a,i3,a,i3,a)') &
181 '% ', jmax+1,
' records [j = ', &
182 jmax,
' (-1) 0] with ', imax+1, &
183 ' values [i = 0 (1) ', imax,
'] in each record.'
185 '%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
189 if ( zl0_smoothed(j,i) < -9999.0_dp ) zl0_smoothed(j,i) = -9999.0_dp
190 write(23,
'(f8.1)', advance=
'no') zl0_smoothed(j,i)
193 if ( zl0_smoothed(j,i) < -9999.0_dp ) zl0_smoothed(j,i) = -9999.0_dp
194 write(23,
'(f8.1)') zl0_smoothed(j,i)
197 close(23, status=
'keep')
Declarations of kind types for SICOPOLIS.
Declarations of global variables for SICOPOLIS (for the ANT domain).
subroutine make_zl0()
Generation of an isostatically relaxed lithosphere surface topography for either the rigid lithospher...
Declarations of global variables for SICOPOLIS.