7 !! Writing of time-series data for all defined surface points on file
8 !! in ASCII format. Modification of Tolly's output7 by Thorben Dunse.
12 !! Copyright 2009-2013 Thorben Dunse, Ralf Greve
16 !! This file is part of SICOPOLIS.
18 !! SICOPOLIS is free software: you can redistribute it and/or modify
19 !! it under the terms of the GNU General Public License as published by
20 !! the Free Software Foundation, either version 3 of the License, or
21 !! (at your option) any later version.
23 !! SICOPOLIS is distributed in the hope that it will be useful,
24 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
25 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 !! GNU General Public License for more details.
28 !! You should have received a copy of the GNU General Public License
29 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
31 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
34 !> Writing of time-series data for all defined surface points on file
35 !! in ASCII format. Modification of Tolly's output7 by Thorben Dunse.
36 !<------------------------------------------------------------------------------
37 subroutine output5(time, dxi, deta, delta_ts, glac_index, z_sl)
43 real(dp),
intent(in) :: time, dxi, deta, delta_ts, glac_index, z_sl
47 real(dp),
dimension(0:JMAX,0:IMAX) :: field
48 real(dp),
dimension(:),
allocatable :: zl_surf, zs_surf, &
49 accum_surf, as_perp_surf, &
50 snowfall_surf, rainfall_surf, runoff_surf, &
51 vx_surf, vy_surf, vz_surf, &
52 vx_base, vy_base, vz_base, &
55 allocate(zl_surf(n_surf), zs_surf(n_surf), &
57 as_perp_surf(n_surf), snowfall_surf(n_surf), &
58 rainfall_surf(n_surf), runoff_surf(n_surf), &
59 vx_surf(n_surf), vy_surf(n_surf), vz_surf(n_surf), &
60 vx_base(n_surf), vy_base(n_surf), vz_base(n_surf), &
61 temp_base_pmp(n_surf))
70 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
76 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
83 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
84 'grid', accum_surf(n))
89 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
90 'grid', as_perp_surf(n))
95 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
96 'grid', snowfall_surf(n))
101 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
102 'grid', rainfall_surf(n))
107 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
108 'grid', runoff_surf(n))
113 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
117 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
121 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
127 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
131 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
135 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
141 call
borehole(field, x_surf(n), y_surf(n), dxi, deta, &
142 'grid', temp_base_pmp(n))
149 #if ( !defined(OUT_TIMES) || OUT_TIMES==1 )
150 time_val = time /year_sec
152 time_val = (time+year_zero) /year_sec
154 stop
' output5: OUT_TIMES must be either 1 or 2!'
158 accum_surf(n) = accum_surf(n) *year_sec
159 as_perp_surf(n) = as_perp_surf(n) *year_sec
160 snowfall_surf(n) = snowfall_surf(n) *year_sec
161 rainfall_surf(n) = rainfall_surf(n) *year_sec
162 runoff_surf(n) = runoff_surf(n) *year_sec
163 vx_surf(n) = vx_surf(n) *year_sec
164 vy_surf(n) = vy_surf(n) *year_sec
165 vz_surf(n) = vz_surf(n) *year_sec
166 vx_base(n) = vx_base(n) *year_sec
167 vy_base(n) = vy_base(n) *year_sec
168 vz_base(n) = vz_base(n) *year_sec
173 if (forcing_flag == 1)
then
174 write(41,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
175 write(42,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
176 write(43,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
177 write(44,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
178 write(45,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
179 write(46,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
180 write(47,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
181 write(48,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
182 write(49,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
183 write(50,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
184 write(51,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
185 write(52,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
186 write(53,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
187 write(54,
'(1pe13.6,2(1pe13.4))') time_val, delta_ts, z_sl
188 else if (forcing_flag == 2)
then
189 write(41,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
190 write(42,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
191 write(43,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
192 write(44,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
193 write(45,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
194 write(46,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
195 write(47,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
196 write(48,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
197 write(49,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
198 write(50,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
199 write(51,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
200 write(52,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
201 write(53,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
202 write(54,
'(1pe13.6,2(1pe13.4))') time_val, glac_index, z_sl
206 write(41,
'(1pe13.4)',advance=
'no') zl_surf(n)
207 write(42,
'(1pe13.4)',advance=
'no') zs_surf(n)
208 write(43,
'(1pe13.4)',advance=
'no') accum_surf(n)
209 write(44,
'(1pe13.4)',advance=
'no') as_perp_surf(n)
210 write(45,
'(1pe13.4)',advance=
'no') snowfall_surf(n)
211 write(46,
'(1pe13.4)',advance=
'no') rainfall_surf(n)
212 write(47,
'(1pe13.4)',advance=
'no') runoff_surf(n)
213 write(48,
'(1pe13.4)',advance=
'no') vx_surf(n)
214 write(49,
'(1pe13.4)',advance=
'no') vy_surf(n)
215 write(50,
'(1pe13.4)',advance=
'no') vz_surf(n)
216 write(51,
'(1pe13.4)',advance=
'no') vx_base(n)
217 write(52,
'(1pe13.4)',advance=
'no') vy_base(n)
218 write(53,
'(1pe13.4)',advance=
'no') vz_base(n)
219 write(54,
'(1pe13.4)',advance=
'no') temp_base_pmp(n)
223 write(41,
'(1pe13.4)') zl_surf(n)
224 write(42,
'(1pe13.4)') zs_surf(n)
225 write(43,
'(1pe13.4)') accum_surf(n)
226 write(44,
'(1pe13.4)') as_perp_surf(n)
227 write(45,
'(1pe13.4)') snowfall_surf(n)
228 write(46,
'(1pe13.4)') rainfall_surf(n)
229 write(47,
'(1pe13.4)') runoff_surf(n)
230 write(48,
'(1pe13.4)') vx_surf(n)
231 write(49,
'(1pe13.4)') vy_surf(n)
232 write(50,
'(1pe13.4)') vz_surf(n)
233 write(51,
'(1pe13.4)') vx_base(n)
234 write(52,
'(1pe13.4)') vy_base(n)
235 write(53,
'(1pe13.4)') vz_base(n)
236 write(54,
'(1pe13.4)') temp_base_pmp(n)
238 deallocate(zl_surf, zs_surf, accum_surf, as_perp_surf, &
239 snowfall_surf, rainfall_surf, runoff_surf, &
240 vx_surf, vy_surf, vz_surf, &
241 vx_base, vy_base, vz_base,temp_base_pmp)