35 subroutine output2(time, dxi, deta, delta_ts, glac_index, z_sl)
42 real(dp),
intent(in) :: time, dxi, deta, delta_ts, glac_index, z_sl
45 integer(i4b) :: n_base, n_tempbase
46 real(dp) :: time_val, &
47 v_tot, v_grounded, v_floating, &
48 a_tot, a_grounded, a_floating, &
49 h_max, zs_max, v_temp, v_fw, v_sle, &
50 a_temp, v_bm, v_tld, h_t_max, vs_max, tbh_max
51 real(dp) :: x_pos, y_pos
52 real(dp),
dimension(0:JMAX,0:IMAX) :: h_ice, h_t_help
53 real(dp) :: v_gr_redu, a_surf, rhosw_rho_ratio
54 real(dp) :: vs_help, tbh_help
55 real(dp) :: h_ave_sed, tbh_ave_sed, atb_sed
56 real(dp) :: sum_area_sed
58 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
60 character(len=128),
parameter :: &
61 fmt1 =
'(1pe13.6,2(1pe13.4),/,13x,6(1pe13.4),/,'// &
63 #elif ( OUTSER_V_A==2 )
65 character(len=128),
parameter :: &
66 fmt1 =
'(1pe13.6,2(1pe13.4),/,13x,6(1pe13.4),/,'// &
67 '26x,5(1pe13.4),/,26x,5(1pe13.4),/)'
69 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
72 character(len=128),
parameter :: &
73 fmt2 =
'(1pe13.6,2(1pe13.4),/,13x,3(1pe13.4),/)'
84 h_t_help(j,i) = h_t(j,i)
90 h_t_help(j,i) = h_c(j,i)*eaz_c_quotient(kc_cts(j,i))
111 || defined(emtp2sge) \
112 || defined(heino) ) /* terrestrial ice sheet */
114 rhosw_rho_ratio = rho_sw/rho
116 #elif ( defined(NMARS) \
117 || defined(smars) ) /* martian ice sheet */
119 rhosw_rho_ratio = 0.0_dp
123 stop
' output2: No valid domain specified!'
133 zs_max = -1.11e+11_dp
146 if (maske(j,i) == 0)
then
148 if (zs(j,i) > zs_max) zs_max = zs(j,i)
149 if (h_ice(j,i) > h_max ) h_max = h_ice(j,i)
150 if (h_t_help(j,i) > h_t_max) h_t_max = h_t_help(j,i)
152 v_grounded = v_grounded + h_ice(j,i) *area(j,i)
153 v_temp = v_temp + h_t_help(j,i)*area(j,i)
161 || defined(emtp2sge) \
162 || defined(heino) ) /* terrestrial ice sheet */
164 if (zl0(j,i) < z_sl) &
165 v_gr_redu = v_gr_redu + rhosw_rho_ratio*(z_sl-zl0(j,i))*area(j,i)
169 a_grounded = a_grounded + area(j,i)
171 if (n_cts(j,i) /= -1) a_temp = a_temp + area(j,i)
173 v_bm = v_bm + q_bm(j,i) *area(j,i)
174 v_tld = v_tld + q_tld(j,i) *area(j,i)
177 0.25_dp*(vx_c(kcmax,j,i)+vx_c(kcmax,j,i-1))**2 &
178 +0.25_dp*(vy_c(kcmax,j,i)+vy_c(kcmax,j-1,i))**2 )
179 if (vs_help > vs_max) vs_max = vs_help
181 if (n_cts(j,i) >= 0)
then
184 tbh_help = min((temp_c(0,j,i)-temp_c_m(0,j,i)), -eps)
185 if (tbh_help > tbh_max) tbh_max = tbh_help
188 else if (maske(j,i) == 3)
then
192 if (zs(j,i) > zs_max) zs_max = zs(j,i)
193 if (h_ice(j,i) > h_max) h_max = h_ice(j,i)
195 v_floating = v_floating + h_ice(j,i)*area(j,i)
196 a_floating = a_floating + area(j,i)
198 v_bm = v_bm + q_bm(j,i) *area(j,i)
201 0.25_dp*(vx_c(kcmax,j,i)+vx_c(kcmax,j,i-1))**2 &
202 +0.25_dp*(vy_c(kcmax,j,i)+vy_c(kcmax,j-1,i))**2 )
203 if (vs_help > vs_max) vs_max = vs_help
205 tbh_help = min((temp_c(0,j,i)-temp_c_m(0,j,i)), -eps)
206 if (tbh_help > tbh_max) tbh_max = tbh_help
210 if ( (maske(j,i) == 0).or.(maske_help(j,i) == 0) &
211 .or.(maske(j,i) == 3).or.(maske_help(j,i) == 3) )
then
213 v_fw = v_fw + accum(j,i)*area(j,i) &
214 - (dzs_dtau(j,i)-dzb_dtau(j,i))*area(j,i)
228 || defined(emtp2sge) \
229 || defined(heino) ) /* terrestrial ice sheet */
231 a_surf = 3.61132e+14_dp
232 v_sle = (v_grounded-v_gr_redu)*(rho/rho_sw)/a_surf
235 #elif ( defined(NMARS) \
236 || defined(smars) ) /* martian ice sheet */
238 a_surf = 1.4441e+14_dp
239 v_sle = v_grounded*(rho_i/rho_w)*(1.0_dp-frac_dust)/a_surf
244 #if ( !defined(OUT_TIMES) || OUT_TIMES==1 )
245 time_val = time /year_sec
247 time_val = (time+year_zero) /year_sec
249 stop
' output2: OUT_TIMES must be either 1 or 2!'
252 v_tot = v_grounded + v_floating
253 a_tot = a_grounded + a_floating
255 if (zs_max < -1.1e+11_dp) zs_max = 0.0_dp
257 vs_max = vs_max *year_sec
265 || defined(emtp2sge) \
266 || defined(heino) ) /* terrestrial ice sheet */
268 v_fw = v_fw *year_sec *(rho/rho_w)
270 v_bm = v_bm *year_sec *(rho/rho_w)
272 v_tld = v_tld *year_sec *(rho/rho_w)
275 #elif ( defined(NMARS) \
276 || defined(smars) ) /* martian ice sheet */
278 v_fw = v_fw *year_sec *(rho_i/rho_w)*(1.0_dp-frac_dust)
280 v_bm = v_bm *year_sec *(rho_i/rho_w)*(1.0_dp-frac_dust)
282 v_tld = v_tld *year_sec *(rho_i/rho_w)*(1.0_dp-frac_dust)
294 || defined(emtp2sge) \
295 || defined(heino) ) /* terrestrial ice sheet */
297 if (forcing_flag == 1)
then
299 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
301 write(unit=12, fmt=trim(fmt1)) time_val, delta_ts, z_sl, &
302 h_max, zs_max, v_grounded, v_temp, v_fw, v_sle, &
303 a_grounded, a_temp, v_bm, v_tld, h_t_max, vs_max
307 write(unit=12, fmt=trim(fmt1)) time_val, delta_ts, z_sl, &
308 v_tot, v_grounded, v_floating, a_tot, a_grounded, a_floating, &
309 h_max, zs_max, v_temp, v_fw, v_sle, &
310 a_temp, v_bm, v_tld, h_t_max, vs_max
313 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
316 else if (forcing_flag == 2)
then
318 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
320 write(unit=12, fmt=trim(fmt1)) time_val, glac_index, z_sl, &
321 h_max, zs_max, v_grounded, v_temp, v_fw, v_sle, &
322 a_grounded, a_temp, v_bm, v_tld, h_t_max, vs_max
326 write(unit=12, fmt=trim(fmt1)) time_val, glac_index, z_sl, &
327 v_tot, v_grounded, v_floating, a_tot, a_grounded, a_floating, &
328 h_max, zs_max, v_temp, v_fw, v_sle, &
329 a_temp, v_bm, v_tld, h_t_max, vs_max
332 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
335 else if (forcing_flag == 3)
then
337 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
339 write(unit=12, fmt=trim(fmt1)) time_val, 1.11e+11_dp, z_sl, &
340 h_max, zs_max, v_grounded, v_temp, v_fw, v_sle, &
341 a_grounded, a_temp, v_bm, v_tld, h_t_max, vs_max
345 write(unit=12, fmt=trim(fmt1)) time_val, 1.11e+11_dp, z_sl, &
346 v_tot, v_grounded, v_floating, a_tot, a_grounded, a_floating, &
347 h_max, zs_max, v_temp, v_fw, v_sle, &
348 a_temp, v_bm, v_tld, h_t_max, vs_max
351 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
356 #elif ( defined(NMARS) \
357 || defined(smars) ) /* martian ice sheet */
359 if (forcing_flag == 1)
then
361 write(unit=12, fmt=trim(fmt1)) time_val, delta_ts, z_sl, &
362 h_max, zs_max, v_tot, v_temp, v_fw, tbh_max, &
363 a_tot, a_temp, v_bm, v_tld, h_t_max, vs_max
365 else if (forcing_flag == 2)
then
367 write(unit=12, fmt=trim(fmt1)) time_val, glac_index, z_sl, &
368 h_max, zs_max, v_tot, v_temp, v_fw, tbh_max, &
369 a_tot, a_temp, v_bm, v_tld, h_t_max, vs_max
371 else if (forcing_flag == 3)
then
373 write(unit=12, fmt=trim(fmt1)) time_val, 1.11e+11_dp, z_sl, &
374 h_max, zs_max, v_tot, v_temp, v_fw, tbh_max, &
375 a_tot, a_temp, v_bm, v_tld, h_t_max, vs_max
391 sum_area_sed = 0.0_dp
396 if (maske_sedi(j,i) == 7)
then
398 sum_area_sed = sum_area_sed + area(j,i)
400 h_ave_sed = h_ave_sed + area(j,i)*h_ice(j,i)
402 if (n_cts(j,i) /= -1)
then
405 tbh_help = min((temp_c(0,j,i)-temp_c_m(0,j,i)), -eps)
407 tbh_ave_sed = tbh_ave_sed + area(j,i)*tbh_help
409 if (n_cts(j,i) /= -1) atb_sed = atb_sed + area(j,i)
416 if (sum_area_sed > eps)
then
417 h_ave_sed = h_ave_sed / sum_area_sed
418 tbh_ave_sed = tbh_ave_sed / sum_area_sed
420 stop
' output2: No sediment area found!'
425 if (forcing_flag == 1)
then
426 write(unit=15, fmt=trim(fmt2)) time_val, delta_ts, z_sl, &
427 h_ave_sed, tbh_ave_sed, atb_sed
428 else if (forcing_flag == 2)
then
429 write(unit=15, fmt=trim(fmt2)) time_val, glac_index, z_sl, &
430 h_ave_sed, tbh_ave_sed, atb_sed
431 else if (forcing_flag == 3)
then
432 write(unit=15, fmt=trim(fmt2)) time_val, 1.11e+11_dp, z_sl, &
433 h_ave_sed, tbh_ave_sed, atb_sed