7 !! Initialisations for SICOPOLIS.
11 !! Copyright 2009-2013 Ralf Greve
15 !! This file is part of SICOPOLIS.
17 !! SICOPOLIS is free software: you can redistribute it and/or modify
18 !! it under the terms of the GNU General Public License as published by
19 !! the Free Software Foundation, either version 3 of the License, or
20 !! (at your option) any later version.
22 !! SICOPOLIS is distributed in the hope that it will be useful,
23 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
24 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 !! GNU General Public License for more details.
27 !! You should have received a copy of the GNU General Public License
28 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
30 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33 !> Initialisations for SICOPOLIS.
34 !<------------------------------------------------------------------------------
36 sum_accum, mean_accum, mean_accum_inv, &
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, &
49 integer(i4b) :: i, j, kc, kt, kr, m, n, ir, jr
50 integer(i4b) :: ios, ios1, ios2, ios3, ios4
51 integer(i4b) :: ndat2d, ndat3d
52 integer(i4b) :: n_output
54 integer(i4b) :: ii((imax+1)*(jmax+1)), jj((imax+1)*(jmax+1)), nn(0:jmax,0:imax)
55 real(dp) :: delta_ts, glac_index
56 real(dp) :: sum_accum, mean_accum, mean_accum_inv
57 real(dp) :: dtime0, dtime_temp0, dtime_wss0, dtime_out0, dtime_ser0
58 real(dp) :: dtime, dtime_temp, dtime_wss, dtime_out, dtime_ser
59 real(dp) :: time_init0, time_end0, time_output0(100)
60 real(dp) :: time, time_init, time_end, time_output(100)
61 real(dp) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
62 real(dp) :: z_sl, dzsl_dtau, z_mar
64 character (len=100) :: runname, anfdatname
65 character (len=256) :: shell_command
67 logical :: flag_3d_output
72 #if (CALCZS==4 || MARGIN==3)
75 call lis_initialize(ierr)
85 x_hat = x_hat *1.0e+03_dp
86 y_hat = y_hat *1.0e+03_dp
88 b_min = b_min /year_sec
89 b_max = b_max /year_sec
93 if ( trim(version) /= trim(sico_version) ) &
94 stop
' sico_init: SICOPOLIS version not compatible with header file!'
101 if (abs(dx-50.0_dp) < eps)
then
103 if ((imax /= 80).or.(jmax /= 80))
then
104 stop
' sico_init: IMAX and/or JMAX wrong!'
107 else if (abs(dx-25.0_dp) < eps)
then
109 if ((imax /= 160).or.(jmax /= 160))
then
110 stop
' sico_init: IMAX and/or JMAX wrong!'
114 stop
' sico_init: DX wrong!'
119 stop
' sico_init: GRID==1 not allowed for this application!'
123 stop
' sico_init: GRID==2 not allowed for this application!'
131 stop
' sico_init: Option ADV_HOR==1 (central differences) not defined!'
134 #if ((ADV_HOR == 3) && (ADV_VERT != 3))
135 stop
' sico_init: Options ADV_HOR==3 and ADV_VERT==3 must be used together!'
138 #if ((ADV_HOR != 3) && (ADV_VERT == 3))
139 stop
' sico_init: Options ADV_HOR==3 and ADV_VERT==3 must be used together!'
149 dtime_temp0 = dtime_temp0
153 dzeta_c = 1.0_dp/
real(kcmax,dp)
154 dzeta_t = 1.0_dp/
real(ktmax,dp)
155 dzeta_r = 1.0_dp/
real(krmax,dp)
168 if ((i.le.imax).and.(j.le.jmax))
then
180 anfdatname = anfdatname
182 #if defined(YEAR_ZERO)
183 year_zero = year_zero
185 year_zero = 2000.0_dp
188 time_init0 = time_init0
189 time_end0 = time_end0
190 dtime_ser0 = dtime_ser0
192 #if ( OUTPUT==1 || OUTPUT==3 )
193 dtime_out0 = dtime_out0
196 #if ( OUTPUT==2 || OUTPUT==3 )
198 time_output0( 1) = time_out0_01
199 time_output0( 2) = time_out0_02
200 time_output0( 3) = time_out0_03
201 time_output0( 4) = time_out0_04
202 time_output0( 5) = time_out0_05
203 time_output0( 6) = time_out0_06
204 time_output0( 7) = time_out0_07
205 time_output0( 8) = time_out0_08
206 time_output0( 9) = time_out0_09
207 time_output0(10) = time_out0_10
208 time_output0(11) = time_out0_11
209 time_output0(12) = time_out0_12
210 time_output0(13) = time_out0_13
211 time_output0(14) = time_out0_14
212 time_output0(15) = time_out0_15
213 time_output0(16) = time_out0_16
214 time_output0(17) = time_out0_17
215 time_output0(18) = time_out0_18
216 time_output0(19) = time_out0_19
217 time_output0(20) = time_out0_20
222 shell_command =
'if [ ! -d'
223 shell_command = trim(shell_command)//
' '//outpath
224 shell_command = trim(shell_command)//
' '//
'] ; then mkdir'
225 shell_command = trim(shell_command)//
' '//outpath
226 shell_command = trim(shell_command)//
' '//
'; fi'
227 call system(trim(shell_command))
230 open(10, iostat=ios, &
231 file=outpath//
'/'//trim(runname)//
'.log', &
233 if (ios /= 0) stop
' sico_init: Error when opening the log file!'
235 write(10,1000)
'Computational domain:'
237 write(10,1000)
'Antarctica'
239 write(10,1000)
'Greenland'
241 write(10,1000)
'Scandinavia and Eurasia'
243 write(10,1000)
'Northern hemisphere'
244 #elif defined(EMTP2SGE)
245 write(10,1000)
'EISMINT Phase 2 Simplified Geometry Experiment'
247 write(10,1000)
'ISMIP HEINO'
249 write(10,1000)
'North polar cap of Mars'
251 write(10,1000)
'South polar cap of Mars'
253 stop
' sico_init: Subroutine sico_init: No valid domain specified!'
257 write(10,1001)
'imax =', imax
258 write(10,1001)
'jmax =', jmax
259 write(10,1001)
'kcmax =', kcmax
260 write(10,1001)
'ktmax =', ktmax
261 write(10,1001)
'krmax =', krmax
264 write(10,1002)
'a =', deform
267 #if (GRID==0 || GRID==1)
268 write(10,1002)
'x0 =', x0
269 write(10,1002)
'y0 =', y0
270 write(10,1002)
'dx =', dx
272 write(10,1002)
'dlambda =', dlambda
273 write(10,1002)
'dphi =', dphi
277 write(10,1002)
'year_zero =', year_zero
278 write(10,1002)
'time_init =', time_init0
279 write(10,1002)
'time_end =', time_end0
280 write(10,1002)
'dtime =', dtime0
281 write(10,1002)
'dtime_temp =', dtime_temp0
282 #if ( OUTPUT==1 || OUTPUT==3 )
283 write(10,1002)
'dtime_out =', dtime_out0
285 write(10,1002)
'dtime_ser =', dtime_ser0
288 write(10,1000)
'mask_present file = '//mask_present_file
291 write(10,1000)
'Physical-parameter file = '//phys_para_file
294 #if (CALCZS==3 || CALCZS==4)
295 write(10,1002)
'ovi_weight =', ovi_weight
297 write(10,1002)
'omega_sor =', omega_sor
302 write(10,1002)
'temp_min =', temp_min
303 write(10,1002)
's_t =', s_t
304 write(10,1002)
'x_hat =', x_hat
305 write(10,1002)
'y_hat =', y_hat
306 write(10,1002)
'rad =', rad
307 write(10,1002)
'b_min =', b_min
308 write(10,1002)
'b_max =', b_max
312 write(10,1002)
'delta_ts0 =', delta_ts0
314 write(10,1002)
'sine_amplit =', sine_amplit
315 write(10,1002)
'sine_period =', sine_period
317 write(10,1000)
'GRIP file = '//grip_temp_file
318 write(10,1002)
'grip_temp_fact =', grip_temp_fact
322 write(10,1002)
'z_sl0 =', z_sl0
324 write(10,1000)
'sea-level file = '//sea_level_file
329 #if ( MARINE_ICE_CALVING==2 || MARINE_ICE_CALVING==3 )
330 write(10,1002)
'z_mar =', z_mar
332 #elif ( MARINE_ICE_CALVING==4 || MARINE_ICE_CALVING==5 \
333 || marine_ice_calving==6 || marine_ice_calving==7 )
334 write(10,1002)
'fact_z_mar =', fact_z_mar
336 #elif ( ( MARINE_ICE_FORMATION==2 ) && ( MARINE_ICE_CALVING==9 ) )
337 write(10,1002)
'calv_uw_coeff =', calv_uw_coeff
338 write(10,1002)
'r1_calv_uw =', r1_calv_uw
339 write(10,1002)
'r2_calv_uw =', r2_calv_uw
343 #if ICE_SHELF_CALVING==2
344 write(10,1002)
'H_calv =', h_calv
349 write(10,1000)
'Sediment-mask file = '//mask_sedi_file
352 write(10,1002)
'c_slide =', c_slide
353 write(10,1002)
'gamma_slide =', gamma_slide
354 write(10,1001)
'p_weert =', p_weert
355 write(10,1001)
'q_weert =', q_weert
357 write(10,1002)
'red_pres_limit_fact =', red_pres_limit_fact
361 write(10,1002)
'c_slide_sedi =', c_slide_sedi
362 write(10,1002)
'gamma_slide_sedi =', gamma_slide_sedi
363 write(10,1001)
'p_weert_sedi =', p_weert_sedi
364 write(10,1001)
'q_weert_sedi =', q_weert_sedi
368 write(10,1002)
'q_geo =', q_geo
373 write(10,1002)
'frac_llra =', frac_llra
378 write(10,1002)
'gr_size =', gr_size
382 write(10,1002)
'sigma_res =', sigma_res
386 write(10,1001)
'ENHMOD =', enhmod
387 write(10,1002)
'enh_fact =', enh_fact
388 #if ( ENHMOD==2 || ENHMOD==3 )
389 write(10,1002)
'enh_intg =', enh_intg
392 write(10,1002)
'age_trans =', age_trans_0
395 write(10,1002)
'date_trans1 =', date_trans1_0
396 write(10,1002)
'date_trans2 =', date_trans2_0
397 write(10,1002)
'date_trans3 =', date_trans3_0
400 write(10,1002)
'enh_shelf =', enh_shelf
404 write(10,1002)
'numdiff_H_t =', numdiff_h_t
405 write(10,1002)
'tau_cts =', tau_cts
406 write(10,1002)
'H_min =', h_min
407 write(10,1002)
'vh_max =', vh_max
408 write(10,1002)
'hd_min =', hd_min
409 write(10,1002)
'hd_max =', hd_max
411 write(10,1002)
'qbm_min =', qbm_min
412 #elif defined(QB_MIN) /* obsolete */
413 write(10,1002)
'qb_min =', qb_min
416 write(10,1002)
'qbm_max =', qbm_max
417 #elif defined(QB_MAX) /* obsolete */
418 write(10,1002)
'qb_max =', qb_max
420 write(10,1002)
'age_min =', age_min
421 write(10,1002)
'age_max =', age_max
422 write(10,1002)
'mean_accum =', mean_accum
424 write(10,1002)
'age_diff =', agediff
425 write(10,1002)
'm_age =', m_age
429 write(10,1001)
'GRID =', grid
430 write(10,1001)
'CALCMOD =', calcmod
431 write(10,1001)
'FLOW_LAW =', flow_law
432 write(10,1001)
'FIN_VISC =', fin_visc
433 write(10,1001)
'MARGIN =', margin
435 write(10,1001)
'MARINE_ICE_FORMATION =', marine_ice_formation
436 write(10,1001)
'MARINE_ICE_CALVING =', marine_ice_calving
438 write(10,1001)
'ICE_SHELF_CALVING =', ice_shelf_calving
440 write(10,1001)
'ANF_DAT =', anf_dat
441 write(10,1001)
'REBOUND =', rebound
442 write(10,1001)
'Q_LITHO =', q_litho
443 write(10,1001)
'ZS_EVOL =', zs_evol
444 write(10,1001)
'CALCZS =', calczs
445 write(10,1001)
'ADV_HOR =', adv_hor
446 write(10,1001)
'ADV_VERT =', adv_vert
447 write(10,1001)
'TOPOGRAD =', topograd
448 write(10,1001)
'TSURFACE =', tsurface
449 write(10,1001)
'SEA_LEVEL =', sea_level
450 write(10,1001)
'SLIDE_LAW =', slide_law
451 write(10,1001)
'Q_GEO_MOD =', q_geo_mod
454 #if defined(OUT_TIMES)
455 write(10,1001)
'OUT_TIMES =', out_times
457 write(10,1001)
'OUTPUT =', output
458 write(10,1001)
'OUTSER =', outser
459 #if defined(OUTSER_V_A)
460 write(10,1001)
'OUTSER_V_A =', outser_v_a
462 #if ( OUTPUT==1 || OUTPUT==2 )
463 write(10,1001)
'ERGDAT =', ergdat
465 write(10,1001)
'NETCDF =', netcdf
467 #if ( OUTPUT==2 || OUTPUT==3 )
468 write(10,1001)
'n_output =', n_output
470 write(10,1002)
'time_output =', time_output0(n)
475 write(10,1000)
'Program version and date: '//version//
' / '//date
479 1002 format(a,es12.4)
481 close(10, status=
'keep')
485 year_zero = year_zero*year_sec
486 time_init = time_init0*year_sec
487 time_end = time_end0*year_sec
488 dtime = dtime0*year_sec
489 dtime_temp = dtime_temp0*year_sec
490 dtime_ser = dtime_ser0*year_sec
491 #if ( OUTPUT==1 || OUTPUT==3 )
492 dtime_out = dtime_out0*year_sec
494 #if ( OUTPUT==2 || OUTPUT==3 )
496 time_output(n) = time_output0(n)*year_sec
500 if (abs(dtime_temp/dtime-nint(dtime_temp/dtime)) > eps) &
501 stop
' sico_init: dtime_temp must be a multiple of dtime!'
505 mean_accum = mean_accum*(1.0e-03_dp/year_sec)*(rho_w/rho)
508 mean_accum_inv = 1.0_dp/mean_accum
512 open(24, iostat=ios, &
513 file=inpath//
'/heino/'//mask_present_file, &
514 recl=8192, status=
'old')
516 if (ios /= 0) stop
' sico_init: Error when opening the mask file!'
518 do n=1, 6;
read(24,
'(a)') ch_dummy;
end do
521 read(24,2300) (maske_help(j,i), i=0,imax)
524 close(24, status=
'keep')
528 open(24, iostat=ios, &
529 file=inpath//
'/heino/'//mask_sedi_file, &
530 recl=8192, status=
'old')
532 if (ios /= 0) stop
' sico_init: Error when opening the rock/sediment mask file!'
534 do n=1, 6;
read(24,
'(a)') ch_dummy;
end do
537 read(24,2300) (maske_sedi(j,i), i=0,imax)
540 close(24, status=
'keep')
542 2300 format(imax(i1),i1)
548 open(21, iostat=ios, &
549 file=inpath//
'/general/'//grip_temp_file, &
551 if (ios /= 0) stop
' sico_init: Error when opening the data file for delta_ts!'
553 read(21,*) ch_dummy, grip_time_min, grip_time_stp, grip_time_max
555 if (ch_dummy /=
'#')
then
556 write(6,*)
' sico_init: grip_time_min, grip_time_stp, grip_time_max'
557 write(6,*)
' not defined in data file for delta_ts!'
561 ndata_grip = (grip_time_max-grip_time_min)/grip_time_stp
563 allocate(griptemp(0:ndata_grip))
566 read(21,*) d_dummy, griptemp(n)
569 close(21, status=
'keep')
577 open(21, iostat=ios, &
578 file=inpath//
'/general/'//sea_level_file, &
580 if (ios /= 0) stop
' sico_init: Error when opening the data file for z_sl!'
582 read(21,*) ch_dummy, specmap_time_min, specmap_time_stp, specmap_time_max
584 if (ch_dummy /=
'#')
then
585 write(6,*)
' sico_init: specmap_time_min, specmap_time_stp, specmap_time_max'
586 write(6,*)
' not defined in data file for z_sl!'
590 ndata_specmap = (specmap_time_max-specmap_time_min)/specmap_time_stp
592 allocate(specmap_zsl(0:ndata_specmap))
594 do n=0, ndata_specmap
595 read(21,*) d_dummy, specmap_zsl(n)
598 close(21, status=
'keep')
610 q_geo(j,i) = q_geo *1.0e-03_dp
616 stop
' sico_init: Option Q_GEO_MOD==2 not available for this application!'
630 call
boundary(time_init, dtime, dxi, deta, &
631 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
638 q_b_tot(j,i) = 0.0_dp
644 temp_c(kc,j,i) = temp_s(j,i)
645 age_c(kc,j,i) = 15000.0_dp*year_sec
649 omega_t(kt,j,i) = 0.0_dp
650 age_t(kt,j,i) = 15000.0_dp*year_sec
654 temp_r(kr,j,i) = temp_s(j,i)+q_geo(j,i)*h_r/kappa_r &
655 *(1.0_dp-
real(kr,dp)/
real(krmax,dp))
673 call
boundary(time_init, dtime, dxi, deta, &
674 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
681 q_b_tot(j,i) = 0.0_dp
687 temp_c(kc,j,i) = temp_s(j,i)
688 age_c(kc,j,i) = 15000.0_dp*year_sec
692 omega_t(kt,j,i) = 0.0_dp
693 age_t(kt,j,i) = 15000.0_dp*year_sec
697 temp_r(kr,j,i) = temp_s(j,i)+q_geo(j,i)*h_r/kappa_r &
698 *(1.0_dp-
real(kr,dp)/
real(krmax,dp))
717 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
720 call
boundary(time_init, dtime, dxi, deta, &
721 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
723 q_b_tot = q_bm + q_tld
731 #if (GRID==0 || GRID==1)
735 dist_dxdy(jr,ir) = sqrt( (
real(ir,dp)*dxi)**2 + (
real(jr,dp)*deta)**2 )
747 zeta_c(kc) = kc*dzeta_c
748 eaz_c(kc) = exp(deform*zeta_c(kc))
749 eaz_c_quotient(kc) = (eaz_c(kc)-1.0_dp)/(ea-1.0_dp)
753 zeta_t(kt) = kt*dzeta_t
777 open(12, iostat=ios, &
778 file=outpath//
'/'//trim(runname)//
'.ser', &
780 if (ios /= 0) stop
' sico_init: Error when opening the ser file!'
785 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
787 1102 format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
788 ' H_max(m) zs_max(m) V_g(m^3)', &
789 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
790 ' A_g(m^2) A_t(m^2) V_bm(m^3/a)', &
791 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
792 1103 format(
'----------------------------------------------------', &
793 '---------------------------------------')
797 1102 format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
798 ' V(m^3) V_g(m^3) V_f(m^3)', &
799 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
800 ' H_max(m) zs_max(m)', &
801 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
802 ' A_t(m^2) V_bm(m^3/a)', &
803 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
804 1103 format(
'----------------------------------------------------', &
805 '---------------------------------------')
808 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
813 open(15, iostat=ios, &
814 file=outpath//
'/'//trim(runname)//
'.sed', &
816 if (ios /= 0) stop
' sico_init: Error when opening the sed file!'
821 1108 format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
822 ' H_ave(m) Tbh_ave(C) Atb(m^2)')
823 1109 format(
'----------------------------------------------------')
829 open(13, iostat=ios, &
830 file=outpath//
'/'//trim(runname)//
'.thk', &
832 if (ios /= 0) stop
' sico_init: Error when opening the thk file!'
837 1104 format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
838 ' H(m): JMAX+1 records [j = JMAX (-1) 0] with',/, &
839 ' IMAX+1 values [i = 0 (1) IMAX] in each record')
840 1105 format(
'----------------------------------------------------')
850 allocate(lambda_core(n_core), phi_core(n_core), &
851 x_core(n_core), y_core(n_core))
853 lambda_core(1) = 0.0_dp
855 x_core(1) = 3900.0_dp *1.0e+03_dp
856 y_core(1) = 2000.0_dp *1.0e+03_dp
858 lambda_core(2) = 0.0_dp
860 x_core(2) = 3800.0_dp *1.0e+03_dp
861 y_core(2) = 2000.0_dp *1.0e+03_dp
863 lambda_core(3) = 0.0_dp
865 x_core(3) = 3700.0_dp *1.0e+03_dp
866 y_core(3) = 2000.0_dp *1.0e+03_dp
868 lambda_core(4) = 0.0_dp
870 x_core(4) = 3500.0_dp *1.0e+03_dp
871 y_core(4) = 2000.0_dp *1.0e+03_dp
873 lambda_core(5) = 0.0_dp
875 x_core(5) = 3200.0_dp *1.0e+03_dp
876 y_core(5) = 2000.0_dp *1.0e+03_dp
878 lambda_core(6) = 0.0_dp
880 x_core(6) = 2900.0_dp *1.0e+03_dp
881 y_core(6) = 2000.0_dp *1.0e+03_dp
883 lambda_core(7) = 0.0_dp
885 x_core(7) = 2600.0_dp *1.0e+03_dp
886 y_core(7) = 2000.0_dp *1.0e+03_dp
888 open(14, iostat=ios, &
889 file=outpath//
'/'//trim(runname)//
'.core', &
891 if (ios /= 0) stop
' sico_init: Error when opening the core file!'
893 if (forcing_flag == 1)
then
898 1106 format(
' t(a) D_Ts(C) z_sl(m)',/, &
899 ' H_P1(m) H_P2(m) H_P3(m) H_P4(m)', &
900 ' H_P5(m) H_P6(m) H_P7(m)',/, &
901 ' v_P1(m/a) v_P2(m/a) v_P3(m/a) v_P4(m/a)', &
902 ' v_P5(m/a) v_P6(m/a) v_P7(m/a)',/, &
903 ' T_P1(C) T_P2(C) T_P3(C) T_P4(C)', &
904 ' T_P5(C) T_P6(C) T_P7(C)',/, &
905 ' Rb_P1(W/m2) Rb_P2(W/m2) Rb_P3(W/m2) Rb_P4(W/m2)', &
906 ' Rb_P5(W/m2) Rb_P6(W/m2) Rb_P7(W/m2)')
907 1107 format(
'-----------------------------------------------------------------', &
908 '---------------------------------------')
919 flag_3d_output = .false.
921 flag_3d_output = .true.
923 stop
' sico_init: ERGDAT must be either 0 or 1!'
927 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
928 flag_3d_output, ndat2d, ndat3d)
930 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
931 flag_3d_output, ndat2d, ndat3d)
933 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
938 if (time_output(1) <= time_init+eps)
then
941 flag_3d_output = .false.
943 flag_3d_output = .true.
945 stop
' sico_init: ERGDAT must be either 0 or 1!'
949 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
950 flag_3d_output, ndat2d, ndat3d)
952 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
953 flag_3d_output, ndat2d, ndat3d)
955 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
962 flag_3d_output = .false.
965 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
966 flag_3d_output, ndat2d, ndat3d)
968 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
969 flag_3d_output, ndat2d, ndat3d)
971 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
974 if (time_output(1) <= time_init+eps)
then
976 flag_3d_output = .true.
979 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
980 flag_3d_output, ndat2d, ndat3d)
982 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
983 flag_3d_output, ndat2d, ndat3d)
985 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
991 stop
' sico_init: OUTPUT must be either 1, 2 or 3!'
994 call
output2(time_init, dxi, deta, delta_ts, glac_index, z_sl)
996 call
output3(time_init, delta_ts, glac_index, z_sl)
999 call
output4(time_init, dxi, deta, delta_ts, glac_index, z_sl)