35 subroutine output2(time, dxi, deta, delta_ts, glac_index, z_sl)
43 real(dp),
intent(in) :: time, dxi, deta, delta_ts, glac_index, z_sl
46 integer(i4b) :: n_base, n_tempbase
47 real(dp) :: time_val, &
48 v_tot, v_grounded, v_floating, &
49 a_tot, a_grounded, a_floating, &
50 h_max, zs_max, v_temp, v_fw, v_sle, &
51 a_temp, v_bm, v_tld, h_t_max, vs_max, tbh_max
52 real(dp) :: x_pos, y_pos
53 real(dp),
dimension(0:JMAX,0:IMAX) :: h, h_cold, h_temp
54 real(dp) :: v_gr_redu, a_surf, rhosw_rho_ratio
55 real(dp) :: vs_help, tbh_help
56 real(dp) :: h_ave_sed, tbh_ave_sed, atb_sed
57 real(dp) :: sum_area_sed
59 #if (!defined(OUTSER_V_A) || OUTSER_V_A==1)
61 character(len=128),
parameter :: &
62 fmt1 =
'(1pe13.6,2(1pe13.4),/,13x,6(1pe13.4),/,'// &
66 character(len=128),
parameter :: &
67 fmt1 =
'(1pe13.6,2(1pe13.4),/,13x,6(1pe13.4),/,'// &
68 '26x,5(1pe13.4),/,26x,5(1pe13.4),/)'
70 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
73 character(len=128),
parameter :: &
74 fmt2 =
'(1pe13.6,2(1pe13.4),/,13x,3(1pe13.4),/)'
88 h_temp(j,i) = h_t(j,i)
91 #elif (CALCMOD==0 || CALCMOD==2 || CALCMOD==3 || CALCMOD==-1)
94 h_temp(j,i) = h_c(j,i)*eaz_c_quotient(kc_cts(j,i))
117 || defined(emtp2sge) \
118 || defined(xyz)) /* terrestrial ice sheet */
120 rhosw_rho_ratio = rho_sw/rho
122 #elif (defined(NMARS) || defined(SMARS)) /* Martian ice sheet */
124 rhosw_rho_ratio = 0.0_dp
128 stop
' output2: No valid domain specified!'
138 zs_max = -1.11e+11_dp
151 if (maske(j,i) == 0)
then
153 if (zs(j,i) > zs_max) zs_max = zs(j,i)
154 if (h(j,i) > h_max ) h_max = h(j,i)
155 if (h_temp(j,i) > h_t_max) h_t_max = h_temp(j,i)
157 v_grounded = v_grounded + h(j,i) *area(j,i)
158 v_temp = v_temp + h_temp(j,i)*area(j,i)
166 || defined(emtp2sge) \
167 || defined(xyz)) /* terrestrial ice sheet */
169 if (zl0(j,i) < z_sl) &
170 v_gr_redu = v_gr_redu + rhosw_rho_ratio*(z_sl-zl0(j,i))*area(j,i)
174 a_grounded = a_grounded + area(j,i)
176 if (n_cts(j,i) /= -1) a_temp = a_temp + area(j,i)
178 v_bm = v_bm + q_bm(j,i) *area(j,i)
179 v_tld = v_tld + q_tld(j,i) *area(j,i)
182 0.25_dp*(vx_c(kcmax,j,i)+vx_c(kcmax,j,i-1))**2 &
183 +0.25_dp*(vy_c(kcmax,j,i)+vy_c(kcmax,j-1,i))**2 )
184 if (vs_help > vs_max) vs_max = vs_help
186 if (n_cts(j,i) >= 0)
then
189 tbh_help = min((temp_c(0,j,i)-temp_c_m(0,j,i)), -eps)
190 if (tbh_help > tbh_max) tbh_max = tbh_help
193 else if (maske(j,i) == 3)
then
197 if (zs(j,i) > zs_max) zs_max = zs(j,i)
198 if (h(j,i) > h_max) h_max = h(j,i)
200 v_floating = v_floating + h(j,i)*area(j,i)
201 a_floating = a_floating + area(j,i)
203 v_bm = v_bm + q_bm(j,i) *area(j,i)
206 0.25_dp*(vx_c(kcmax,j,i)+vx_c(kcmax,j,i-1))**2 &
207 +0.25_dp*(vy_c(kcmax,j,i)+vy_c(kcmax,j-1,i))**2 )
208 if (vs_help > vs_max) vs_max = vs_help
210 tbh_help = min((temp_c(0,j,i)-temp_c_m(0,j,i)), -eps)
211 if (tbh_help > tbh_max) tbh_max = tbh_help
215 if ( (maske(j,i) == 0).or.(maske_help(j,i) == 0) &
216 .or.(maske(j,i) == 3).or.(maske_help(j,i) == 3) )
then
218 v_fw = v_fw + accum(j,i)*area(j,i) &
219 - (dzs_dtau(j,i)-dzb_dtau(j,i))*area(j,i)
233 || defined(emtp2sge) \
234 || defined(xyz)) /* terrestrial ice sheet */
236 a_surf = 3.61132e+14_dp
237 v_sle = (v_grounded-v_gr_redu)*(rho/rho_sw)/a_surf
240 #elif (defined(NMARS) || defined(SMARS)) /* Martian ice sheet */
242 a_surf = 1.4441e+14_dp
243 v_sle = v_grounded*(rho_i/rho_w)*(1.0_dp-frac_dust)/a_surf
248 #if (!defined(OUT_TIMES) || OUT_TIMES==1)
249 time_val = time /year_sec
251 time_val = (time+year_zero) /year_sec
253 stop
' output2: OUT_TIMES must be either 1 or 2!'
256 v_tot = v_grounded + v_floating
257 a_tot = a_grounded + a_floating
259 if (zs_max < -1.1e+11_dp) zs_max = 0.0_dp
261 vs_max = vs_max *year_sec
269 || defined(emtp2sge) \
270 || defined(xyz)) /* terrestrial ice sheet */
272 v_fw = v_fw *year_sec *(rho/rho_w)
274 v_bm = v_bm *year_sec *(rho/rho_w)
276 v_tld = v_tld *year_sec *(rho/rho_w)
279 #elif (defined(NMARS) || defined(SMARS)) /* Martian ice sheet */
281 v_fw = v_fw *year_sec *(rho_i/rho_w)*(1.0_dp-frac_dust)
283 v_bm = v_bm *year_sec *(rho_i/rho_w)*(1.0_dp-frac_dust)
285 v_tld = v_tld *year_sec *(rho_i/rho_w)*(1.0_dp-frac_dust)
297 || defined(emtp2sge) \
298 || defined(xyz)) /* terrestrial ice sheet */
300 if (forcing_flag == 1)
then
302 #if (!defined(OUTSER_V_A) || OUTSER_V_A==1)
304 write(unit=12, fmt=trim(fmt1)) time_val, delta_ts, z_sl, &
305 h_max, zs_max, v_grounded, v_temp, v_fw, v_sle, &
306 a_grounded, a_temp, v_bm, v_tld, h_t_max, vs_max
308 #elif (OUTSER_V_A==2)
310 write(unit=12, fmt=trim(fmt1)) time_val, delta_ts, z_sl, &
311 v_tot, v_grounded, v_floating, a_tot, a_grounded, a_floating, &
312 h_max, zs_max, v_temp, v_fw, v_sle, &
313 a_temp, v_bm, v_tld, h_t_max, vs_max
316 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
319 else if (forcing_flag == 2)
then
321 #if (!defined(OUTSER_V_A) || OUTSER_V_A==1)
323 write(unit=12, fmt=trim(fmt1)) time_val, glac_index, z_sl, &
324 h_max, zs_max, v_grounded, v_temp, v_fw, v_sle, &
325 a_grounded, a_temp, v_bm, v_tld, h_t_max, vs_max
327 #elif (OUTSER_V_A==2)
329 write(unit=12, fmt=trim(fmt1)) time_val, glac_index, z_sl, &
330 v_tot, v_grounded, v_floating, a_tot, a_grounded, a_floating, &
331 h_max, zs_max, v_temp, v_fw, v_sle, &
332 a_temp, v_bm, v_tld, h_t_max, vs_max
335 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
338 else if (forcing_flag == 3)
then
340 #if (!defined(OUTSER_V_A) || OUTSER_V_A==1)
342 write(unit=12, fmt=trim(fmt1)) time_val, 1.11e+11_dp, z_sl, &
343 h_max, zs_max, v_grounded, v_temp, v_fw, v_sle, &
344 a_grounded, a_temp, v_bm, v_tld, h_t_max, vs_max
346 #elif (OUTSER_V_A==2)
348 write(unit=12, fmt=trim(fmt1)) time_val, 1.11e+11_dp, z_sl, &
349 v_tot, v_grounded, v_floating, a_tot, a_grounded, a_floating, &
350 h_max, zs_max, v_temp, v_fw, v_sle, &
351 a_temp, v_bm, v_tld, h_t_max, vs_max
354 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
359 #elif (defined(NMARS) || defined(SMARS)) /* Martian ice sheet */
361 if (forcing_flag == 1)
then
363 write(unit=12, fmt=trim(fmt1)) time_val, delta_ts, z_sl, &
364 h_max, zs_max, v_tot, v_temp, v_fw, tbh_max, &
365 a_tot, a_temp, v_bm, v_tld, h_t_max, vs_max
367 else if (forcing_flag == 2)
then
369 write(unit=12, fmt=trim(fmt1)) time_val, glac_index, z_sl, &
370 h_max, zs_max, v_tot, v_temp, v_fw, tbh_max, &
371 a_tot, a_temp, v_bm, v_tld, h_t_max, vs_max
373 else if (forcing_flag == 3)
then
375 write(unit=12, fmt=trim(fmt1)) time_val, 1.11e+11_dp, z_sl, &
376 h_max, zs_max, v_tot, v_temp, v_fw, tbh_max, &
377 a_tot, a_temp, v_bm, v_tld, h_t_max, vs_max
397 sum_area_sed = 0.0_dp
402 if (maske_sedi(j,i) == 7)
then
404 sum_area_sed = sum_area_sed + area(j,i)
406 h_ave_sed = h_ave_sed + area(j,i)*h(j,i)
408 if (n_cts(j,i) /= -1)
then
411 tbh_help = min((temp_c(0,j,i)-temp_c_m(0,j,i)), -eps)
413 tbh_ave_sed = tbh_ave_sed + area(j,i)*tbh_help
415 if (n_cts(j,i) /= -1) atb_sed = atb_sed + area(j,i)
422 if (sum_area_sed > eps)
then
423 h_ave_sed = h_ave_sed / sum_area_sed
424 tbh_ave_sed = tbh_ave_sed / sum_area_sed
426 stop
' output2: No sediment area found!'
431 if (forcing_flag == 1)
then
432 write(unit=15, fmt=trim(fmt2)) time_val, delta_ts, z_sl, &
433 h_ave_sed, tbh_ave_sed, atb_sed
434 else if (forcing_flag == 2)
then
435 write(unit=15, fmt=trim(fmt2)) time_val, glac_index, z_sl, &
436 h_ave_sed, tbh_ave_sed, atb_sed
437 else if (forcing_flag == 3)
then
438 write(unit=15, fmt=trim(fmt2)) time_val, 1.11e+11_dp, z_sl, &
439 h_ave_sed, tbh_ave_sed, atb_sed
subroutine output2(time, dxi, deta, delta_ts, glac_index, z_sl)
Writing of time-series data on file in ASCII format.
Declarations of kind types for SICOPOLIS.
Declarations of global variables for SICOPOLIS (for the ANT domain).
Declarations of global variables for SICOPOLIS.