37 dtime, dtime_temp, dtime_wss, dtime_out, dtime_ser, &
38 time, time_init, time_end, time_output, &
39 dxi, deta, dzeta_c, dzeta_t, dzeta_r, &
40 z_sl, dzsl_dtau, z_mar, &
42 ndat2d, ndat3d, n_output, &
51 integer(i4b),
intent(in) :: ii((imax+1)*(jmax+1)), &
52 jj((imax+1)*(jmax+1)), &
54 integer(i4b),
intent(in) :: n_output
55 real(dp),
intent(in) :: mean_accum
56 real(dp),
intent(in) :: dtime, dtime_temp, dtime_wss, &
58 real(dp),
intent(in) :: time_init, time_end, time_output(100)
59 real(dp),
intent(in) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
60 character(len=100),
intent(in) :: runname
62 integer(i4b),
intent(inout) :: ndat2d, ndat3d
63 real(dp),
intent(inout) :: delta_ts, glac_index
64 real(dp),
intent(inout) :: time
65 real(dp),
intent(inout) :: z_sl, dzsl_dtau, z_mar
67 integer(i4b) :: i, j, kc, kt, kr, n
68 integer(i4b) :: itercount, itercount_max
69 integer(i4b) :: iter_temp, iter_wss, iter_ser, iter_out, iter_output(100)
70 real(dp) :: dtime_temp_inv
71 logical :: flag_3d_output
75 write(unit=6, fmt=
'(a)')
' '
77 itercount_max = nint((time_end-time_init)/dtime)
79 iter_temp = nint(dtime_temp/dtime)
81 iter_wss = nint(dtime_wss/dtime)
83 iter_ser = nint(dtime_ser/dtime)
84 #if (OUTPUT==1 || OUTPUT==3)
85 iter_out = nint(dtime_out/dtime)
87 #if (OUTPUT==2 || OUTPUT==3)
89 iter_output(n) = nint((time_output(n)-time_init)/dtime)
93 main_loop :
do itercount=1, itercount_max
95 write(unit=6, fmt=
'(i7)') itercount
99 time = time_init +
real(itercount,dp)*dtime
107 call
boundary(time, dtime, dxi, deta, delta_ts, glac_index, &
108 z_sl, dzsl_dtau, z_mar)
112 if ( mod(itercount, iter_temp) == 0 )
then
114 write(unit=6, fmt=
'(a)')
' -------- Computation of T'
119 call
calc_temp_poly(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
123 call
calc_temp_cold(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
126 #elif (CALCMOD==2 || CALCMOD==3)
127 call
calc_temp_enth(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
134 stop
' sico_main_loop: Parameter CALCMOD must be either -1, 0, 1, 2 or 3!'
140 dtime_temp_inv = 1.0_dp/dtime_temp
142 dh_t_dtau = (h_t_neu - h_t)*dtime_temp_inv
153 omega_t = omega_t_neu
157 #if (CALCMOD==2 || CALCMOD==3)
160 omega_c = omega_c_neu
173 #if (DYNAMICS==1 || DYNAMICS==2)
178 #if (MARGIN==3 || DYNAMICS==2)
179 call
calc_vxy_ssa(z_sl, dxi, deta, dzeta_c, dzeta_t, ii, jj, nn)
194 stop
' sico_main_loop: DYNAMICS must be either 0, 1 or 2!'
197 call
calc_dxyz(dxi, deta, dzeta_c, dzeta_t)
201 call
calc_gia(time, z_sl, dtime, dxi, deta, itercount, iter_wss)
203 #if (MARGIN==3) /* coupled SIA/SSA or SIA/SStA/SSA dynamics */
204 call
calc_top_3(time, z_sl, z_mar, dtime, dxi, deta, mean_accum, ii, jj, nn)
205 #elif (DYNAMICS==2) /* hybrid SIA/SStA dynamics */
206 call
calc_top_2(time, z_sl, z_mar, dtime, dxi, deta, mean_accum, ii, jj, nn)
207 #else /* SIA-only dynamics */
208 call
calc_top_1(time, z_sl, z_mar, dtime, dxi, deta, mean_accum, ii, jj, nn)
230 call
calc_qbm(time, z_sl, dzeta_c, dzeta_r)
240 if ( mod(itercount, iter_out) == 0 )
then
243 flag_3d_output = .false.
245 flag_3d_output = .true.
249 call
output1(runname, time, delta_ts, glac_index, z_sl, &
250 flag_3d_output, ndat2d, ndat3d)
252 call
output_nc(runname, time, delta_ts, glac_index, z_sl, &
253 flag_3d_output, ndat2d, ndat3d)
262 if (itercount == iter_output(n))
then
265 flag_3d_output = .false.
267 flag_3d_output = .true.
271 call
output1(runname, time, delta_ts, glac_index, z_sl, &
272 flag_3d_output, ndat2d, ndat3d)
274 call
output_nc(runname, time, delta_ts, glac_index, z_sl, &
275 flag_3d_output, ndat2d, ndat3d)
284 if ( mod(itercount, iter_out) == 0 )
then
286 flag_3d_output = .false.
289 call
output1(runname, time, delta_ts, glac_index, z_sl, &
290 flag_3d_output, ndat2d, ndat3d)
292 call
output_nc(runname, time, delta_ts, glac_index, z_sl, &
293 flag_3d_output, ndat2d, ndat3d)
300 if (itercount == iter_output(n))
then
302 flag_3d_output = .true.
305 call
output1(runname, time, delta_ts, glac_index, z_sl, &
306 flag_3d_output, ndat2d, ndat3d)
308 call
output_nc(runname, time, delta_ts, glac_index, z_sl, &
309 flag_3d_output, ndat2d, ndat3d)
318 if ( mod(itercount, iter_ser) == 0 )
then
319 call
output2(time, dxi, deta, delta_ts, glac_index, z_sl)
321 call
output3(time, delta_ts, glac_index, z_sl)
324 call
output4(time, dxi, deta, delta_ts, glac_index, z_sl)
326 #if (defined(ASF) && OUTSER==4)
327 call
output5(time, dxi, deta, delta_ts, glac_index, z_sl)
subroutine calc_vz_ssa(z_sl, dxi, deta, dzeta_c)
Computation of the vertical velocity vz in the shallow shelf approximation.
subroutine calc_temp_enth(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
Computation of temperature, water content and age with the enthalpy method.
subroutine calc_vxy_static()
Computation of the horizontal velocity vx, vy, the horizontal volume flux qx, qy etc. for static ice.
subroutine calc_vxy_sia(dzeta_c, dzeta_t)
Computation of the shear stresses txz, tyz, the effective shear stress sigma, the depth-averaged flui...
subroutine output2(time, dxi, deta, delta_ts, glac_index, z_sl)
Writing of time-series data on file in ASCII format.
subroutine calc_top_3(time, z_sl, z_mar, dtime, dxi, deta, mean_accum, ii, jj, nn)
Computation of the ice topography (including gradients) for coupled SIA/SSA or SIA/SStA/SSA dynamics ...
subroutine calc_temp_bas()
Computation of the basal temperatures.
subroutine calc_water_bas(z_sl)
Computation of the thickness of the water column under the ice base.
Declarations of kind types for SICOPOLIS.
subroutine output3(time, delta_ts, glac_index, z_sl)
Writing of time-series data of the ice thickness field on file in ASCII format.
subroutine calc_temp_melt()
Computation of the melting temperatures.
subroutine output_nc(runname, time, delta_ts, glac_index, z_sl, flag_3d_output, ndat2d, ndat3d)
Writing of time-slice files in NetCDF format.
subroutine calc_vxy_ssa(z_sl, dxi, deta, dzeta_c, dzeta_t, ii, jj, nn)
Computation of the horizontal velocity vx, vy, the horizontal volume flux qx, qy and the flux across ...
subroutine calc_top_2(time, z_sl, z_mar, dtime, dxi, deta, mean_accum, ii, jj, nn)
Computation of the ice topography (including gradients) for hybrid SIA/SStA dynamics of ice sheets wi...
Declarations of global variables for SICOPOLIS (for the ANT domain).
subroutine calc_qbm(time, z_sl, dzeta_c, dzeta_r)
Computation of the basal melting rate Q_bm. Summation of Q_bm and Q_tld.
subroutine calc_gia(time, z_sl, dtime, dxi, deta, itercount, iter_wss)
Computation of the glacial isostatic adjustment of the lithosphere surface.
subroutine calc_vz_static()
Computation of the vertical velocity vz for static ice.
subroutine calc_dxyz(dxi, deta, dzeta_c, dzeta_t)
Computation of all components of the strain-rate tensor, the full effective strain rate and the shear...
subroutine calc_enhance(time)
Computation of the flow enhancement factor.
subroutine calc_temp_poly(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
Computation of temperature, water content and age in polythermal mode.
subroutine output5(time, dxi, deta, delta_ts, glac_index, z_sl)
Writing of time-series data for all defined surface points on file in ASCII format. Modification of Tolly's output7 by Thorben Dunse.
subroutine calc_top_1(time, z_sl, z_mar, dtime, dxi, deta, mean_accum, ii, jj, nn)
Computation of the ice topography (including gradients) for SIA-only dynamics of ice sheets without i...
subroutine calc_vxy_b_sia(time, z_sl)
Computation of the basal horizontal velocity vx_b, vy_b in the shallow ice approximation.
subroutine sico_main_loop(delta_ts, glac_index, mean_accum, dtime, dtime_temp, dtime_wss, dtime_out, dtime_ser, time, time_init, time_end, time_output, dxi, deta, dzeta_c, dzeta_t, dzeta_r, z_sl, dzsl_dtau, z_mar, ii, jj, nn, ndat2d, ndat3d, n_output, runname)
Main loop of SICOPOLIS.
subroutine boundary(time, dtime, dxi, deta, delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
Computation of the surface temperature (must be less than 0 deg C!) and of the accumulation-ablation ...
subroutine output4(time, dxi, deta, delta_ts, glac_index, z_sl)
Writing of time-series data of the deep ice cores on file in ASCII format.
Declarations of global variables for SICOPOLIS.
subroutine calc_vz_sia(dxi, deta, dzeta_c, dzeta_t)
Computation of the vertical velocity vz in the shallow ice approximation.
subroutine calc_temp_const()
Isothermal mode: Setting of the temperature and age to constant values.
subroutine output1(runname, time, delta_ts, glac_index, z_sl, flag_3d_output, ndat2d, ndat3d)
Writing of time-slice files in binary format.
subroutine calc_temp_cold(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
Computation of temperature and age in cold-ice mode.