52 dtime, dtime_temp, dtime_wss, dtime_out, dtime_ser, &
53 time, time_init, time_end, time_output, &
54 dxi, deta, dzeta_c, dzeta_t, dzeta_r, &
55 z_sl, dzsl_dtau, z_mar, &
57 ndat2d, ndat3d, n_output, &
62 #if (CALCMOD==0 || CALCMOD==1 || CALCMOD==-1) 64 #elif (CALCMOD==2 || CALCMOD==3) 81 integer(i4b),
intent(in) :: ii((imax+1)*(jmax+1)), &
82 jj((imax+1)*(jmax+1)), &
84 integer(i4b),
intent(in) :: n_output
85 real(dp),
intent(in) :: mean_accum
86 real(dp),
intent(in) :: dtime, dtime_temp, dtime_wss, &
88 real(dp),
intent(in) :: time_init, time_end, time_output(100)
89 real(dp),
intent(in) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
90 character(len=100),
intent(in) :: runname
92 integer(i4b),
intent(inout) :: ndat2d, ndat3d
93 real(dp),
intent(inout) :: delta_ts, glac_index
94 real(dp),
intent(inout) :: time
95 real(dp),
intent(inout) :: z_sl, dzsl_dtau, z_mar
97 integer(i4b) :: i, j, kc, kt, kr, n
98 integer(i4b) :: itercount, itercount_max
99 integer(i4b) :: iter_temp, iter_wss, iter_ser, iter_out, iter_output(100)
100 real(dp) :: dtime_temp_inv
101 logical :: flag_3d_output
105 write(unit=6, fmt=
'(/a/)')
' -------- sico_main_loop --------' 107 itercount_max = nint((time_end-time_init)/dtime)
109 iter_temp = nint(dtime_temp/dtime)
111 iter_wss = nint(dtime_wss/dtime)
113 iter_ser = nint(dtime_ser/dtime)
114 #if (OUTPUT==1 || OUTPUT==3) 115 iter_out = nint(dtime_out/dtime)
117 #if (OUTPUT==2 || OUTPUT==3) 119 iter_output(n) = nint((time_output(n)-time_init)/dtime)
123 main_loop :
do itercount=1, itercount_max
125 write(unit=6, fmt=
'(2x,i0)') itercount
129 time = time_init +
real(itercount,
dp)*dtime
137 call boundary(time, dtime, dxi, deta, delta_ts, glac_index, &
138 z_sl, dzsl_dtau, z_mar)
142 if ( mod(itercount, iter_temp) == 0 )
then 144 write(unit=6, fmt=
'(10x,a)')
'Computation of T' 149 call calc_temp_poly(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
153 call calc_temp_cold(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
156 #elif (CALCMOD==2 || CALCMOD==3) 157 call calc_temp_enth(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
164 stop
' >>> sico_main_loop: Parameter CALCMOD must be between -1 and 3!' 170 dtime_temp_inv = 1.0_dp/dtime_temp
187 #if (CALCMOD==2 || CALCMOD==3) 206 stop
' >>> sico_main_loop: Parameter ENHMOD must be between 1 and 5!' 215 #if (DYNAMICS==1 || DYNAMICS==2) 220 #if (MARGIN==3 || DYNAMICS==2) 221 call calc_vxy_ssa(z_sl, dxi, deta, dzeta_c, dzeta_t, ii, jj, nn)
236 stop
' >>> sico_main_loop: DYNAMICS must be either 0, 1 or 2!' 239 call calc_dxyz(dxi, deta, dzeta_c, dzeta_t)
243 call calc_gia(time, z_sl, dtime, dxi, deta, itercount, iter_wss)
247 #if ((MARGIN==3 || DYNAMICS==2) && (CALCTHK==1 || CALCTHK==2 || CALCTHK==3)) 248 write(6, fmt=
'(a)')
' >>> sico_main_loop:' 249 write(6, fmt=
'(a)')
' Non-SIA dynamics combined with' 250 write(6, fmt=
'(a)')
' SIA ice thickness solver!' 256 #elif (CALCTHK==2 || CALCTHK==3) 260 #elif (CALCTHK==5 || CALCTHK==6) 261 call calc_thk_impl(time, dtime, dxi, deta, z_mar, mean_accum, ii, jj, nn)
263 stop
' >>> sico_main_loop: Parameter CALCTHK must be between 1 and 6!' 266 #if (MARGIN==3) /* coupled SIA/SSA or SIA/SStA/SSA dynamics */ 268 #elif (DYNAMICS==2) /* hybrid SIA/SStA dynamics */ 270 #else /* SIA-only dynamics */ 271 #if (CALCTHK==1 || CALCTHK==2 || CALCTHK==3) 273 #elif (CALCTHK==4 || CALCTHK==5 || CALCTHK==6) 297 call calc_qbm(time, z_sl, dzeta_c, dzeta_r)
307 if ( mod(itercount, iter_out) == 0 )
then 310 flag_3d_output = .false.
312 flag_3d_output = .true.
315 call output1(runname, time, delta_ts, glac_index, z_sl, &
316 flag_3d_output, ndat2d, ndat3d)
324 if (itercount == iter_output(n))
then 327 flag_3d_output = .false.
329 flag_3d_output = .true.
332 call output1(runname, time, delta_ts, glac_index, z_sl, &
333 flag_3d_output, ndat2d, ndat3d)
341 if ( mod(itercount, iter_out) == 0 )
then 343 flag_3d_output = .false.
345 call output1(runname, time, delta_ts, glac_index, z_sl, &
346 flag_3d_output, ndat2d, ndat3d)
352 if (itercount == iter_output(n))
then 354 flag_3d_output = .true.
356 call output1(runname, time, delta_ts, glac_index, z_sl, &
357 flag_3d_output, ndat2d, ndat3d)
365 if ( mod(itercount, iter_ser) == 0 )
then 366 call output2(time, dxi, deta, delta_ts, glac_index, z_sl)
367 call output4(time, dxi, deta, delta_ts, glac_index, z_sl)
368 #if (defined(ASF) && WRITE_SER_FILE_STAKES>0) 369 call output5(time, dxi, deta, delta_ts, glac_index, z_sl)
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) temp_c
temp_c(kc,j,i): Temperature in the upper (kc) ice domain
subroutine, public calc_thk_water_bas(z_sl)
Main subroutine of calc_thk_water_bas_m: Computation of the thickness of the water column under the i...
Computation of the ice thickness.
real(dp), dimension(0:krmax, 0:jmax, 0:imax) temp_r_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_thk_init()
Initialisations for the ice thickness computation.
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) age_c
age_c(kc,j,i): Age in the upper (kc) ice domain
integer(i2b), dimension(0:jmax, 0:imax) n_cts
n_cts(j,i): Mask for thermal conditions. -1: cold ice base, 0: temperate ice base with cold ice above...
subroutine, public calc_qbm(time, z_sl, dzeta_c, dzeta_r)
Computation of the basal melting rate Q_bm. Summation of Q_bm and Q_tld (water drainage rate from the...
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) enth_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) age_t
age_t(kt,j,i): Age in the lower (kt) ice domain
real(dp), dimension(0:krmax, 0:jmax, 0:imax) temp_r
temp_r(kr,j,i): Temperature in the bedrock
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) age_t_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_enhance_2()
Computation of the flow enhancement factor. Case ENHMOD==2: two different values depending on age for...
subroutine, public calc_vz_floating(z_sl, dxi, deta, dzeta_c)
Computation of the vertical velocity vz for floating ice.
subroutine, public output1(runname, time, delta_ts, glac_index, z_sl, flag_3d_output, ndat2d, ndat3d)
Writing of time-slice files in native binary or NetCDF format.
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) enth_t
enth_t(kt,j,i): Enthalpy in the lower (kt) ice domain
real(dp), dimension(0:jmax, 0:imax) dh_t_dtau
dH_t_dtau(j,i): Derivative of H_t by tau (time)
Computation of the thickness of the water column under the ice base.
integer(i2b), dimension(0:jmax, 0:imax) maske
maske(j,i): Ice-land-ocean mask. 0: grounded ice, 1: ice-free land, 2: ocean, 3: floating ice ...
subroutine, public calc_thk_impl(time, dtime, dxi, deta, z_mar, mean_accum, ii, jj, nn)
Over-implicit solver for the general ice thickness equation.
subroutine, public calc_temp_cold(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
Computation of temperature and age in cold-ice mode.
subroutine, public calc_thk_sia_expl(time, dtime, dxi, deta, z_mar)
Explicit solver for the diffusive SIA ice surface equation.
Computation of all components of the strain-rate tensor, the full effective strain rate and the shear...
real(dp), dimension(0:jmax, 0:imax) h_t_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_temp_const()
Isothermal mode: Setting of the temperature and age to constant values.
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 routine of sico_main_loop_m: Main loop of SICOPOLIS.
subroutine, public calc_enhance_5()
Computation of the flow enhancement factor. Case ENHMOD==5: minimal anisotropic enhancement factor fo...
real(dp), dimension(0:jmax, 0:imax) zl
zl(j,i): Coordinate z of the lithosphere surface
subroutine, public calc_thk_expl(time, dtime, dxi, deta, z_mar)
Explicit solver for the general ice thickness equation.
subroutine, public calc_vxy_static()
Computation of the horizontal velocity vx, vy, the horizontal volume flux qx, qy etc. for static ice.
subroutine, public 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 (and optionally in NetCDF f...
integer(i2b), dimension(0:jmax, 0:imax) kc_cts
kc_cts(j,i): Position kc of the CTS (for COLD, ENTC, ENTM)
subroutine, public 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 ...
real(dp), dimension(0:jmax, 0:imax) zl_neu
(.)_neu: New value of quantity (.) computed during an integration step
Declarations of global variables for SICOPOLIS (for the ANT domain).
Computation of the flow enhancement factor.
Computation of the horizontal velocity vx, vy.
subroutine, public calc_temp_melt()
Computation of the melting temperatures.
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) enth_c
enth_c(kc,j,i): Enthalpy in the upper (kc) ice domain
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) age_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_vz_grounded(dxi, deta, dzeta_c, dzeta_t)
Computation of the vertical velocity vz for grounded ice.
subroutine, public calc_thk_mask_update(time, dtime, dxi, deta, z_sl, z_mar, n_calc_thk_mask_update_aux)
Update of the ice-land-ocean mask etc.
Declarations of kind types for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) zs
zs(j,i): Coordinate z of the surface topography
integer(i2b), dimension(0:jmax, 0:imax) kc_cts_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) temp_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:jmax, 0:imax) h_c
H_c(j,i): Thickness of ice in the upper (kc) domain (thickness of the cold-ice layer for POLY...
Computation of temperature, water content and age.
subroutine, public calc_temp_bas()
Computation of the basal temperatures.
Computation of the melting and basal temperatures.
Computation of the vertical velocity vz.
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) omega_t_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_gia(time, z_sl, dtime, dxi, deta, itercount, iter_wss)
Main subroutine of calc_gia_m: Computation of the glacial isostatic adjustment of the lithosphere sur...
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) omega_c
omega_c(kc,j,i): Water content in the upper (kc) ice domain
integer(i2b), dimension(0:jmax, 0:imax) maske_old
maske_old(j,i): Old value of maske (at the previous time step)
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) enth_t_neu
(.)_neu: New value of quantity (.) computed during an integration step
real(dp), dimension(0:jmax, 0:imax) zs_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_vz_static()
Computation of the vertical velocity vz for static ice.
real(dp), dimension(0:jmax, 0:imax) h_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_enhance_1()
Computation of the flow enhancement factor. Case ENHMOD==1: constant for grounded ice...
real(dp), dimension(0:jmax, 0:imax) zm
zm(j,i): Coordinate z of the bottom of the upper (kc) ice domain = top of the lower (kt) ice domain (...
Computation of temperature, water content and age with the enthalpy method.
subroutine, public calc_vxy_sia(dzeta_c, dzeta_t)
Computation of the shear stresses txz, tyz, the effective shear stress sigma, the depth-averaged flui...
subroutine boundary(time, dtime, dxi, deta, delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
Main routine of boundary_m: Computation of the surface temperature (must be less than 0 deg C!) and o...
subroutine, public output2(time, dxi, deta, delta_ts, glac_index, z_sl)
Writing of time-series data on file in ASCII format (and optionally in NetCDF format).
subroutine, public calc_temp_enth(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
Main subroutine of calc_temp_enth_m: Computation of temperature, water content and age with the entha...
subroutine, public calc_enhance_3(time)
Computation of the flow enhancement factor. Case ENHMOD==3: two different values depending on time of...
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) omega_t
omega_t(kt,j,i): Water content in the lower (kt) ice domain
subroutine, public calc_dxyz(dxi, deta, dzeta_c, dzeta_t)
Main subroutine of calc_dxyz_m: Computation of all components of the strain-rate tensor, the full effective strain rate and the shear fraction.
subroutine, public calc_enhance_4()
Computation of the flow enhancement factor. Case ENHMOD==4: minimal anisotropic enhancement factor fo...
Computation of the basal melting rate.
real(dp), dimension(0:jmax, 0:imax) zb_neu
(.)_neu: New value of quantity (.) computed during an integration step
Computation of the surface temperature (must be less than 0 deg C!) and of the accumulation-ablation ...
real(dp), dimension(0:jmax, 0:imax) zm_neu
(.)_neu: New value of quantity (.) computed during an integration step
integer(i2b), dimension(0:jmax, 0:imax) n_cts_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_thk_sia_impl(time, dtime, dxi, deta, z_mar, mean_accum, ii, jj, nn)
Over-implicit solver for the diffusive SIA ice surface equation.
integer, parameter dp
Double-precision reals.
real(dp), dimension(0:jmax, 0:imax) zb
zb(j,i): Coordinate z of the ice base
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) omega_c_neu
(.)_neu: New value of quantity (.) computed during an integration step
subroutine, public calc_temp_poly(dxi, deta, dzeta_c, dzeta_t, dzeta_r, dtime_temp)
Computation of temperature, water content and age in polythermal mode.
Writing of output data on files.
Computation of the glacial isostatic adjustment of the lithosphere surface.
real(dp), dimension(0:jmax, 0:imax) h_t
H_t(j,i): Thickness of ice in the lower (kt) domain (thickness of the temperate layer for POLY...
subroutine, public calc_vxy_b_sia(time, z_sl)
Computation of the basal horizontal velocity vx_b, vy_b in the shallow ice approximation.
Declarations of global variables for SICOPOLIS.