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, &
54 integer(i4b),
intent(out) :: ii((imax+1)*(jmax+1)), &
55 jj((imax+1)*(jmax+1)), &
57 integer(i4b),
intent(out) :: ndat2d, ndat3d
58 integer(i4b),
intent(out) :: n_output
59 real(dp),
intent(out) :: delta_ts, glac_index
60 real(dp),
intent(out) :: mean_accum
61 real(dp),
intent(out) :: dtime, dtime_temp, dtime_wss, &
63 real(dp),
intent(out) :: time, time_init, time_end, time_output(100)
64 real(dp),
intent(out) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
65 real(dp),
intent(out) :: z_sl, dzsl_dtau, z_mar
66 character(len=100),
intent(out) :: runname
68 integer(i4b) :: i, j, kc, kt, kr, m, n, ir, jr
69 integer(i4b) :: ios, ios1, ios2, ios3, ios4
71 real(dp) :: dtime0, dtime_temp0, dtime_wss0, dtime_out0, dtime_ser0
72 real(dp) :: time_init0, time_end0, time_output0(100)
74 character (len=100) :: anfdatname
75 character (len=256) :: shell_command
77 logical :: flag_3d_output
79 character(len=64),
parameter :: fmt1 =
'(a)', &
86 ch_domain_long =
'Antarctica'
87 ch_domain_short =
'ant'
90 ch_domain_long =
'Austfonna'
91 ch_domain_short =
'asf'
93 #elif defined(EMTP2SGE)
94 ch_domain_long =
'EISMINT Phase 2 Simplified Geometry Experiment'
95 ch_domain_short =
'emtp2sge'
98 ch_domain_long =
'Greenland'
99 ch_domain_short =
'grl'
102 ch_domain_long =
'Northern hemisphere'
103 ch_domain_short =
'nhem'
106 ch_domain_long =
'Scandinavia and Eurasia'
107 ch_domain_short =
'scand'
110 ch_domain_long =
'Tibet'
111 ch_domain_short =
'tibet'
114 ch_domain_long =
'North polar cap of Mars'
115 ch_domain_short =
'nmars'
118 ch_domain_long =
'South polar cap of Mars'
119 ch_domain_short =
'smars'
122 ch_domain_long =
'XYZ'
123 ch_domain_short =
'xyz'
125 ch_domain_long = trim(ch_domain_long)//
'/ISMIP HEINO'
129 stop
' sico_init: No valid domain specified!'
150 #if (CALCZS==4 || MARGIN==3 || DYNAMICS==2)
153 call lis_initialize(ierr)
163 #if (!defined(SURFACE_FORCING) || SURFACE_FORCING==1)
166 s_t = s_t *1.0e-03_dp
167 x_hat = x_hat *1.0e+03_dp
168 y_hat = y_hat *1.0e+03_dp
169 b_max = b_max /year_sec
170 s_b = s_b *1.0e-03_dp/year_sec
171 eld = eld *1.0e+03_dp
173 #elif (SURFACE_FORCING==2)
176 gamma_t = gamma_t *1.0e-03_dp
178 m_0 = m_0 *1.0e-03_dp/year_sec
179 ela = ela *1.0e+03_dp
182 stop
' sico_init: SURFACE_FORCING must be either 1 or 2!'
192 if ( trim(version) /= trim(sico_version) ) &
193 stop
' sico_init: SICOPOLIS version not compatible with header file!'
197 #if ( !defined(DYNAMICS) )
198 stop
' sico_init: DYNAMICS not defined in the header file!'
201 #if ( !defined(CALCMOD) )
202 stop
' sico_init: CALCMOD not defined in the header file!'
205 #if ( defined(ENTHMOD) )
206 write(6, fmt=
'(a)')
' sico_init: ENTHMOD must not be defined any more.'
207 write(6, fmt=
'(a)')
' Please update your header file!'
216 if (abs(dx-5.0_dp) < eps)
then
218 if ((imax /= 300).or.(jmax /= 300))
then
219 stop
' sico_init: IMAX and/or JMAX wrong!'
222 else if (abs(dx-10.0_dp) < eps)
then
224 if ((imax /= 150).or.(jmax /= 150))
then
225 stop
' sico_init: IMAX and/or JMAX wrong!'
228 else if (abs(dx-25.0_dp) < eps)
then
230 if ((imax /= 60).or.(jmax /= 60))
then
231 stop
' sico_init: IMAX and/or JMAX wrong!'
234 else if (abs(dx-75.0_dp) < eps)
then
236 if ((imax /= 20).or.(jmax /= 20))
then
237 stop
' sico_init: IMAX and/or JMAX wrong!'
241 stop
' sico_init: DX wrong!'
246 stop
' sico_init: GRID==1 not allowed for this application!'
250 stop
' sico_init: GRID==2 not allowed for this application!'
258 #if (CALCMOD==0 || CALCMOD==2 || CALCMOD==3 || CALCMOD==-1)
261 write(6, fmt=
'(a)')
' sico_init: For options CALCMOD==0, 2, 3 or -1,'
262 write(6, fmt=
'(a)')
' the separate kt domain is redundant.'
263 write(6, fmt=
'(a)')
' Therefore, consider setting KTMAX to 1.'
264 write(6, fmt=
'(a)')
' '
273 stop
' sico_init: Option ADV_HOR==1 (central differences) not defined!'
281 #if ((MARGIN==3 && DYNAMICS==1) || DYNAMICS==2) /* requires SSA or SStA */
283 write(6, fmt=
'(a)')
' sico_init: Distortion correction not implemented'
284 write(6, fmt=
'(a)')
' for the shallow shelf approximation (SSA)'
285 write(6, fmt=
'(a)')
' or the shelfy stream approximation (SStA)'
286 write(6, fmt=
'(a)')
' -> GRID==0 required!'
298 dtime_temp0 = dtime_temp0
302 dzeta_c = 1.0_dp/
real(kcmax,dp)
303 dzeta_t = 1.0_dp/
real(ktmax,dp)
304 dzeta_r = 1.0_dp/
real(krmax,dp)
313 if (deform >= eps)
then
315 flag_aa_nonzero = .true.
323 eaz_c_quotient(kc) = 0.0_dp
326 zeta_c(kc) = kc*dzeta_c
327 eaz_c(kc) = exp(aa*zeta_c(kc))
328 eaz_c_quotient(kc) = (eaz_c(kc)-1.0_dp)/(ea-1.0_dp)
334 eaz_c_quotient(kc) = 1.0_dp
338 flag_aa_nonzero = .false.
346 eaz_c_quotient(kc) = 0.0_dp
349 zeta_c(kc) = kc*dzeta_c
351 eaz_c_quotient(kc) = zeta_c(kc)
357 eaz_c_quotient(kc) = 1.0_dp
367 zeta_t(kt) = kt*dzeta_t
379 zeta_r(kr) = kr*dzeta_r
393 if ((i <= imax).and.(j <= jmax))
then
405 anfdatname = anfdatname
407 #if defined(YEAR_ZERO)
408 year_zero = year_zero
410 year_zero = 2000.0_dp
413 time_init0 = time_init0
414 time_end0 = time_end0
415 dtime_ser0 = dtime_ser0
417 #if ( OUTPUT==1 || OUTPUT==3 )
418 dtime_out0 = dtime_out0
421 #if ( OUTPUT==2 || OUTPUT==3 )
423 time_output0( 1) = time_out0_01
424 time_output0( 2) = time_out0_02
425 time_output0( 3) = time_out0_03
426 time_output0( 4) = time_out0_04
427 time_output0( 5) = time_out0_05
428 time_output0( 6) = time_out0_06
429 time_output0( 7) = time_out0_07
430 time_output0( 8) = time_out0_08
431 time_output0( 9) = time_out0_09
432 time_output0(10) = time_out0_10
433 time_output0(11) = time_out0_11
434 time_output0(12) = time_out0_12
435 time_output0(13) = time_out0_13
436 time_output0(14) = time_out0_14
437 time_output0(15) = time_out0_15
438 time_output0(16) = time_out0_16
439 time_output0(17) = time_out0_17
440 time_output0(18) = time_out0_18
441 time_output0(19) = time_out0_19
442 time_output0(20) = time_out0_20
447 shell_command =
'if [ ! -d'
448 shell_command = trim(shell_command)//
' '//outpath
449 shell_command = trim(shell_command)//
' '//
'] ; then mkdir'
450 shell_command = trim(shell_command)//
' '//outpath
451 shell_command = trim(shell_command)//
' '//
'; fi'
452 call system(trim(shell_command))
455 open(10, iostat=ios, &
456 file=outpath//
'/'//trim(runname)//
'.log', &
459 stop
' sico_init: Error when opening the log file!'
461 write(10, fmt=trim(fmt1))
'Computational domain:'
462 write(10, fmt=trim(fmt1)) trim(ch_domain_long)
463 write(10, fmt=trim(fmt1))
' '
465 write(10, fmt=trim(fmt2))
'imax =', imax
466 write(10, fmt=trim(fmt2))
'jmax =', jmax
467 write(10, fmt=trim(fmt2))
'kcmax =', kcmax
468 write(10, fmt=trim(fmt2))
'ktmax =', ktmax
469 write(10, fmt=trim(fmt2))
'krmax =', krmax
470 write(10, fmt=trim(fmt1))
' '
472 write(10, fmt=trim(fmt3))
'a =', aa
473 write(10, fmt=trim(fmt1))
' '
475 #if (GRID==0 || GRID==1)
476 write(10, fmt=trim(fmt3))
'x0 =', x0
477 write(10, fmt=trim(fmt3))
'y0 =', y0
478 write(10, fmt=trim(fmt3))
'dx =', dx
480 write(10, fmt=trim(fmt3))
'dlambda =', dlambda
481 write(10, fmt=trim(fmt3))
'dphi =', dphi
483 write(10, fmt=trim(fmt1))
' '
485 write(10, fmt=trim(fmt3))
'year_zero =', year_zero
486 write(10, fmt=trim(fmt3))
'time_init =', time_init0
487 write(10, fmt=trim(fmt3))
'time_end =', time_end0
488 write(10, fmt=trim(fmt3))
'dtime =', dtime0
489 write(10, fmt=trim(fmt3))
'dtime_temp =', dtime_temp0
490 #if ( OUTPUT==1 || OUTPUT==3 )
491 write(10, fmt=trim(fmt3))
'dtime_out =', dtime_out0
493 write(10, fmt=trim(fmt3))
'dtime_ser =', dtime_ser0
494 write(10, fmt=trim(fmt1))
' '
496 write(10, fmt=trim(fmt2))
'ANF_DAT =', anf_dat
497 #if (ANF_DAT==1 && defined(TEMP_INIT))
498 write(10, fmt=trim(fmt2))
'TEMP_INIT =', temp_init
501 write(10, fmt=trim(fmt1))
'Initial-value file = '//anfdatname
502 write(10, fmt=trim(fmt1))
'Path to initial-value file = '//anfdatpath
504 write(10, fmt=trim(fmt1))
' '
506 write(10, fmt=trim(fmt1))
'Physical-parameter file = '//phys_para_file
507 write(10, fmt=trim(fmt1))
' '
509 #if (CALCZS==3 || CALCZS==4)
510 write(10, fmt=trim(fmt3))
'ovi_weight =', ovi_weight
512 write(10, fmt=trim(fmt3))
'omega_sor =', omega_sor
514 write(10, fmt=trim(fmt1))
' '
517 #if (defined(SURFACE_FORCING))
518 write(10, fmt=trim(fmt2))
'SURFACE_FORCING =', surface_forcing
520 #if (!defined(SURFACE_FORCING) || SURFACE_FORCING==1)
521 write(10, fmt=trim(fmt3))
'temp_min =', temp_min
522 write(10, fmt=trim(fmt3))
's_t =', s_t
523 write(10, fmt=trim(fmt3))
'x_hat =', x_hat
524 write(10, fmt=trim(fmt3))
'y_hat =', y_hat
525 write(10, fmt=trim(fmt3))
'b_max =', b_max
526 write(10, fmt=trim(fmt3))
's_b =', s_b
527 write(10, fmt=trim(fmt3))
'eld =', eld
528 #elif (SURFACE_FORCING==2)
529 write(10, fmt=trim(fmt3))
'temp_0 =', temp_0
530 write(10, fmt=trim(fmt3))
'gamma_t =', gamma_t
531 write(10, fmt=trim(fmt3))
's_0 =', s_0
532 write(10, fmt=trim(fmt3))
'm_0 =', m_0
533 write(10, fmt=trim(fmt3))
'ela =', ela
535 write(10, fmt=trim(fmt1))
' '
538 write(10, fmt=trim(fmt3))
'delta_ts0 =', delta_ts0
540 write(10, fmt=trim(fmt3))
'sine_amplit =', sine_amplit
541 write(10, fmt=trim(fmt3))
'sine_period =', sine_period
543 write(10, fmt=trim(fmt1))
'GRIP file = '//grip_temp_file
544 write(10, fmt=trim(fmt3))
'grip_temp_fact =', grip_temp_fact
548 write(10, fmt=trim(fmt3))
'z_sl0 =', z_sl0
550 write(10, fmt=trim(fmt1))
'sea-level file = '//sea_level_file
552 write(10, fmt=trim(fmt1))
' '
555 #if ( MARINE_ICE_CALVING==2 || MARINE_ICE_CALVING==3 )
556 write(10, fmt=trim(fmt3))
'z_mar =', z_mar
557 write(10, fmt=trim(fmt1))
' '
558 #elif ( MARINE_ICE_CALVING==4 || MARINE_ICE_CALVING==5 \
559 || marine_ice_calving==6 || marine_ice_calving==7 )
560 write(10, fmt=trim(fmt3))
'fact_z_mar =', fact_z_mar
561 write(10, fmt=trim(fmt1))
' '
562 #elif ( ( MARINE_ICE_FORMATION==2 ) && ( MARINE_ICE_CALVING==9 ) )
563 write(10, fmt=trim(fmt3))
'calv_uw_coeff =', calv_uw_coeff
564 write(10, fmt=trim(fmt3))
'r1_calv_uw =', r1_calv_uw
565 write(10, fmt=trim(fmt3))
'r2_calv_uw =', r2_calv_uw
566 write(10, fmt=trim(fmt1))
' '
569 #if ICE_SHELF_CALVING==2
570 write(10, fmt=trim(fmt3))
'H_calv =', h_calv
571 write(10, fmt=trim(fmt1))
' '
575 write(10, fmt=trim(fmt3))
'c_slide =', c_slide
576 write(10, fmt=trim(fmt3))
'gamma_slide =', gamma_slide
577 write(10, fmt=trim(fmt2))
'p_weert =', p_weert
578 write(10, fmt=trim(fmt2))
'q_weert =', q_weert
580 write(10, fmt=trim(fmt3))
'red_pres_limit_fact =', red_pres_limit_fact
582 write(10, fmt=trim(fmt1))
' '
585 write(10, fmt=trim(fmt3))
'q_geo =', q_geo
586 write(10, fmt=trim(fmt1))
' '
589 write(10, fmt=trim(fmt2))
'REBOUND =', rebound
591 write(10, fmt=trim(fmt3))
'frac_llra =', frac_llra
593 #if (REBOUND==1 || REBOUND==2)
594 write(10, fmt=trim(fmt2))
'TIME_LAG_MOD =', time_lag_mod
595 #if (TIME_LAG_MOD==1)
596 write(10, fmt=trim(fmt3))
'time_lag =', time_lag
597 #elif (TIME_LAG_MOD==2)
598 write(10, fmt=trim(fmt1))
'time_lag_file = '//time_lag_file
600 stop
' sico_init: TIME_LAG_MOD must be either 1 or 2!'
604 write(10, fmt=trim(fmt2))
'FLEX_RIG_MOD =', flex_rig_mod
605 #if (FLEX_RIG_MOD==1)
606 write(10, fmt=trim(fmt3))
'flex_rig =', flex_rig
607 #elif (FLEX_RIG_MOD==2)
608 write(10, fmt=trim(fmt1))
'flex_rig_file = '//flex_rig_file
610 stop
' sico_init: FLEX_RIG_MOD must be either 1 or 2!'
613 write(10, fmt=trim(fmt2))
'Q_LITHO =', q_litho
614 write(10, fmt=trim(fmt1))
' '
617 write(10, fmt=trim(fmt3))
'gr_size =', gr_size
618 write(10, fmt=trim(fmt1))
' '
621 write(10, fmt=trim(fmt3))
'sigma_res =', sigma_res
622 write(10, fmt=trim(fmt1))
' '
625 write(10, fmt=trim(fmt2))
'ENHMOD =', enhmod
626 #if (ENHMOD==1 || ENHMOD==2 || ENHMOD==3)
627 write(10, fmt=trim(fmt3))
'enh_fact =', enh_fact
629 #if (ENHMOD==2 || ENHMOD==3)
630 write(10, fmt=trim(fmt3))
'enh_intg =', enh_intg
633 write(10, fmt=trim(fmt3))
'age_trans =', age_trans_0
636 write(10, fmt=trim(fmt3))
'date_trans1 =', date_trans1_0
637 write(10, fmt=trim(fmt3))
'date_trans2 =', date_trans2_0
638 write(10, fmt=trim(fmt3))
'date_trans3 =', date_trans3_0
640 #if (ENHMOD==4 || ENHMOD==5)
641 write(10, fmt=trim(fmt3))
'enh_compr =', enh_compr
642 write(10, fmt=trim(fmt3))
'enh_shear =', enh_shear
644 #if ((ENHMOD==1 || ENHMOD==2 || ENHMOD==3 || ENHMOD==4) && MARGIN==3)
645 write(10, fmt=trim(fmt3))
'enh_shelf =', enh_shelf
647 write(10, fmt=trim(fmt1))
' '
649 write(10, fmt=trim(fmt3))
'numdiff_H_t =', numdiff_h_t
650 write(10, fmt=trim(fmt3))
'tau_cts =', tau_cts
651 write(10, fmt=trim(fmt3))
'H_min =', h_min
652 write(10, fmt=trim(fmt3))
'vh_max =', vh_max
653 write(10, fmt=trim(fmt3))
'hd_min =', hd_min
654 write(10, fmt=trim(fmt3))
'hd_max =', hd_max
656 write(10, fmt=trim(fmt3))
'qbm_min =', qbm_min
657 #elif defined(QB_MIN) /* obsolete */
658 write(10, fmt=trim(fmt3))
'qb_min =', qb_min
661 write(10, fmt=trim(fmt3))
'qbm_max =', qbm_max
662 #elif defined(QB_MAX) /* obsolete */
663 write(10, fmt=trim(fmt3))
'qb_max =', qb_max
665 write(10, fmt=trim(fmt3))
'age_min =', age_min
666 write(10, fmt=trim(fmt3))
'age_max =', age_max
667 write(10, fmt=trim(fmt3))
'mean_accum =', mean_accum
669 write(10, fmt=trim(fmt3))
'age_diff =', agediff
671 write(10, fmt=trim(fmt1))
' '
673 write(10, fmt=trim(fmt2))
'GRID =', grid
674 write(10, fmt=trim(fmt2))
'DYNAMICS =', dynamics
675 #if (DYNAMICS==2 && defined(RATIO_SL_THRESH))
676 write(10, fmt=trim(fmt3))
'ratio_sl_thresh =', ratio_sl_thresh
678 write(10, fmt=trim(fmt2))
'CALCMOD =', calcmod
679 #if ( CALCMOD==-1 && defined(TEMP_CONST) )
680 write(10, fmt=trim(fmt3))
'TEMP_CONST =', temp_const
682 #if ( CALCMOD==-1 && defined(AGE_CONST) )
683 write(10, fmt=trim(fmt3))
'AGE_CONST =', age_const
685 #if ( CALCMOD==1 && defined(CTS_MELTING_FREEZING) )
686 write(10, fmt=trim(fmt2))
'CTS_MELTING_FREEZING =', cts_melting_freezing
688 write(10, fmt=trim(fmt2))
'FLOW_LAW =', flow_law
689 write(10, fmt=trim(fmt2))
'FIN_VISC =', fin_visc
690 write(10, fmt=trim(fmt2))
'MARGIN =', margin
692 write(10, fmt=trim(fmt2))
'MARINE_ICE_FORMATION =', marine_ice_formation
693 write(10, fmt=trim(fmt2))
'MARINE_ICE_CALVING =', marine_ice_calving
695 write(10, fmt=trim(fmt2))
'ICE_SHELF_CALVING =', ice_shelf_calving
697 write(10, fmt=trim(fmt2))
'ZS_EVOL =', zs_evol
698 write(10, fmt=trim(fmt2))
'CALCZS =', calczs
699 write(10, fmt=trim(fmt2))
'ADV_HOR =', adv_hor
700 write(10, fmt=trim(fmt2))
'ADV_VERT =', adv_vert
701 write(10, fmt=trim(fmt2))
'TOPOGRAD =', topograd
702 write(10, fmt=trim(fmt2))
'TSURFACE =', tsurface
703 write(10, fmt=trim(fmt2))
'SEA_LEVEL =', sea_level
704 write(10, fmt=trim(fmt2))
'SLIDE_LAW =', slide_law
705 write(10, fmt=trim(fmt2))
'Q_GEO_MOD =', q_geo_mod
706 write(10, fmt=trim(fmt1))
' '
708 #if defined(OUT_TIMES)
709 write(10, fmt=trim(fmt2))
'OUT_TIMES =', out_times
711 write(10, fmt=trim(fmt2))
'OUTPUT =', output
712 write(10, fmt=trim(fmt2))
'OUTSER =', outser
713 #if defined(OUTSER_V_A)
714 write(10, fmt=trim(fmt2))
'OUTSER_V_A =', outser_v_a
716 #if ( OUTPUT==1 || OUTPUT==2 )
717 write(10, fmt=trim(fmt2))
'ERGDAT =', ergdat
719 write(10, fmt=trim(fmt2))
'NETCDF =', netcdf
720 write(10, fmt=trim(fmt1))
' '
721 #if ( OUTPUT==2 || OUTPUT==3 )
722 write(10, fmt=trim(fmt2))
'n_output =', n_output
724 write(10, fmt=trim(fmt3))
'time_output =', time_output0(n)
726 write(10, fmt=trim(fmt1))
' '
729 write(10, fmt=trim(fmt1))
'Program version and date: '//version//
' / '//date
731 close(10, status=
'keep')
735 year_zero = year_zero*year_sec
736 time_init = time_init0*year_sec
737 time_end = time_end0*year_sec
738 dtime = dtime0*year_sec
739 dtime_temp = dtime_temp0*year_sec
740 dtime_ser = dtime_ser0*year_sec
741 #if ( OUTPUT==1 || OUTPUT==3 )
742 dtime_out = dtime_out0*year_sec
744 #if ( OUTPUT==2 || OUTPUT==3 )
746 time_output(n) = time_output0(n)*year_sec
750 if (abs(dtime_temp/dtime-nint(dtime_temp/dtime)) > eps) &
751 stop
' sico_init: dtime_temp must be a multiple of dtime!'
757 mean_accum = mean_accum*(1.0e-03_dp/year_sec)*(rho_w/rho)
765 maske_help(jmax,:) = 2
768 maske_help(:,imax) = 2
774 open(21, iostat=ios, &
775 file=inpath//
'/general/'//grip_temp_file, &
778 stop
' sico_init: Error when opening the data file for delta_ts!'
780 read(21, fmt=*) ch_dummy, grip_time_min, grip_time_stp, grip_time_max
782 if (ch_dummy /=
'#')
then
783 write(6, fmt=*)
' sico_init: grip_time_min, grip_time_stp, grip_time_max'
784 write(6, fmt=*)
' not defined in data file for delta_ts!'
788 ndata_grip = (grip_time_max-grip_time_min)/grip_time_stp
790 allocate(griptemp(0:ndata_grip))
793 read(21, fmt=*) d_dummy, griptemp(n)
796 close(21, status=
'keep')
804 open(21, iostat=ios, &
805 file=inpath//
'/general/'//sea_level_file, &
808 stop
' sico_init: Error when opening the data file for z_sl!'
810 read(21, fmt=*) ch_dummy, specmap_time_min, specmap_time_stp, specmap_time_max
812 if (ch_dummy /=
'#')
then
813 write(6, fmt=*)
' sico_init: specmap_time_min, specmap_time_stp, specmap_time_max'
814 write(6, fmt=*)
' not defined in data file for z_sl!'
818 ndata_specmap = (specmap_time_max-specmap_time_min)/specmap_time_stp
820 allocate(specmap_zsl(0:ndata_specmap))
822 do n=0, ndata_specmap
823 read(21, fmt=*) d_dummy, specmap_zsl(n)
826 close(21, status=
'keep')
838 q_geo(j,i) = q_geo *1.0e-03_dp
844 stop
' sico_init: Option Q_GEO_MOD==2 not available for this application!'
851 #if (REBOUND==1 || REBOUND==2)
853 #if (TIME_LAG_MOD==1)
855 time_lag_asth = time_lag*year_sec
857 #elif (TIME_LAG_MOD==2)
859 open(29, iostat=ios, &
860 file=inpath//
'/'//trim(ch_domain_short)//
'/'//time_lag_file, &
861 recl=8192, status=
'old')
863 if (ios /= 0) stop
' sico_init: Error when opening the time-lag file!'
865 do n=1, 6;
read(29, fmt=
'(a)') ch_dummy;
end do
868 read(29, fmt=*) (time_lag_asth(j,i), i=0,imax)
871 close(29, status=
'keep')
873 time_lag_asth = time_lag_asth*year_sec
879 time_lag_asth = 0.0_dp
887 #if (FLEX_RIG_MOD==1)
889 flex_rig_lith = flex_rig
891 #elif (FLEX_RIG_MOD==2)
893 open(29, iostat=ios, &
894 file=inpath//
'/'//trim(ch_domain_short)//
'/'//flex_rig_file, &
895 recl=8192, status=
'old')
897 if (ios /= 0) stop
' sico_init: Error when opening the flex-rig file!'
899 do n=1, 6;
read(29, fmt=
'(a)') ch_dummy;
end do
902 read(29, fmt=*) (flex_rig_lith(j,i), i=0,imax)
905 close(29, status=
'keep')
909 #elif (REBOUND==0 || REBOUND==1)
911 flex_rig_lith = 0.0_dp
921 stop
' sico_init: ANF_DAT==1 not allowed for this application!'
931 call
boundary(time_init, dtime, dxi, deta, &
932 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
954 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
957 call
boundary(time_init, dtime, dxi, deta, &
958 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
960 q_b_tot = q_bm + q_tld
966 flag_grounding_line_1 = .false.
967 flag_grounding_line_2 = .false.
969 flag_calving_front_1 = .false.
970 flag_calving_front_2 = .false.
972 #if (MARGIN==1 || MARGIN==2)
981 if ( (maske(j,i)==0_i2b) &
983 ( (maske(j,i+1)==3_i2b) &
984 .or.(maske(j,i-1)==3_i2b) &
985 .or.(maske(j+1,i)==3_i2b) &
986 .or.(maske(j-1,i)==3_i2b) ) &
988 flag_grounding_line_1(j,i) = .true.
990 if ( (maske(j,i)==3_i2b) &
992 ( (maske(j,i+1)==0_i2b) &
993 .or.(maske(j,i-1)==0_i2b) &
994 .or.(maske(j+1,i)==0_i2b) &
995 .or.(maske(j-1,i)==0_i2b) ) &
997 flag_grounding_line_2(j,i) = .true.
999 if ( (maske(j,i)==3_i2b) &
1001 ( (maske(j,i+1)==2_i2b) &
1002 .or.(maske(j,i-1)==2_i2b) &
1003 .or.(maske(j+1,i)==2_i2b) &
1004 .or.(maske(j-1,i)==2_i2b) ) &
1006 flag_calving_front_1(j,i) = .true.
1008 if ( (maske(j,i)==2_i2b) &
1010 ( (maske(j,i+1)==3_i2b) &
1011 .or.(maske(j,i-1)==3_i2b) &
1012 .or.(maske(j+1,i)==3_i2b) &
1013 .or.(maske(j-1,i)==3_i2b) ) &
1015 flag_calving_front_2(j,i) = .true.
1023 if ( (maske(j,i)==2_i2b) &
1024 .and. (maske(j+1,i)==3_i2b) &
1026 flag_calving_front_2(j,i) = .true.
1029 if ( (maske(j,i)==2_i2b) &
1030 .and. (maske(j-1,i)==3_i2b) &
1032 flag_calving_front_2(j,i) = .true.
1039 if ( (maske(j,i)==2_i2b) &
1040 .and. (maske(j,i+1)==3_i2b) &
1042 flag_calving_front_2(j,i) = .true.
1045 if ( (maske(j,i)==2_i2b) &
1046 .and. (maske(j,i-1)==3_i2b) &
1048 flag_calving_front_2(j,i) = .true.
1053 stop
' sico_init: MARGIN must be either 1, 2 or 3!'
1058 #if (GRID==0 || GRID==1)
1062 dist_dxdy(jr,ir) = sqrt( (
real(ir,dp)*dxi)**2 + (
real(jr,dp)*deta)**2 )
1073 #if (DYNAMICS==1 || DYNAMICS==2)
1078 #if (MARGIN==3 || DYNAMICS==2)
1079 call
calc_vxy_ssa(z_sl, dxi, deta, dzeta_c, dzeta_t, ii, jj, nn)
1094 stop
' sico_init: DYNAMICS must be either 0, 1 or 2!'
1097 call
calc_dxyz(dxi, deta, dzeta_c, dzeta_t)
1101 #if (CALCMOD==0 || CALCMOD==-1)
1111 enth_t(kt,j,i) = enth_c(0,j,i)
1126 if ( (maske(j,i) == 0_i2b).and.(n_cts(j,i) == 1_i2b) )
then
1132 enth_t(kt,j,i) = enth_c(0,j,i)
1139 #elif (CALCMOD==2 || CALCMOD==3)
1149 enth_t(kt,j,i) = enth_c(0,j,i)
1157 stop
' sico_init: Parameter CALCMOD must be either -1, 0, 1, 2 or 3!'
1165 open(12, iostat=ios, &
1166 file=outpath//
'/'//trim(runname)//
'.ser', &
1169 stop
' sico_init: Error when opening the ser file!'
1174 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
1176 1102
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
1177 ' H_max(m) zs_max(m) V_g(m^3)', &
1178 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
1179 ' A_g(m^2) A_t(m^2) V_bm(m^3/a)', &
1180 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
1181 1103
format(
'----------------------------------------------------', &
1182 '---------------------------------------')
1186 1102
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
1187 ' V(m^3) V_g(m^3) V_f(m^3)', &
1188 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
1189 ' H_max(m) zs_max(m)', &
1190 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
1191 ' A_t(m^2) V_bm(m^3/a)', &
1192 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
1193 1103
format(
'----------------------------------------------------', &
1194 '---------------------------------------')
1197 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
1204 open(13, iostat=ios, &
1205 file=outpath//
'/'//trim(runname)//
'.thk', &
1207 if (ios /= 0) stop
' sico_init: Error when opening the thk file!'
1212 1104
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
1213 ' H(m): JMAX+1 records [j = JMAX (-1) 0] with',/, &
1214 ' IMAX+1 values [i = 0 (1) IMAX] in each record')
1215 1105
format(
'----------------------------------------------------')
1225 allocate(lambda_core(n_core), phi_core(n_core), &
1226 x_core(n_core), y_core(n_core))
1228 lambda_core(1) = 0.0_dp
1229 phi_core(1) = 0.0_dp
1230 x_core(1) = 750.0_dp *1.0e+03_dp
1231 y_core(1) = 750.0_dp *1.0e+03_dp
1234 lambda_core(2) = 0.0_dp
1235 phi_core(2) = 0.0_dp
1236 x_core(2) = 750.0_dp *1.0e+03_dp
1237 y_core(2) = 1125.0_dp *1.0e+03_dp
1240 open(14, iostat=ios, &
1241 file=outpath//
'/'//trim(runname)//
'.core', &
1243 if (ios /= 0) stop
' sico_init: Error when opening the core file!'
1245 if (forcing_flag == 1)
then
1250 1106
format(
' t(a) D_Ts(C) z_sl(m)',/, &
1251 ' H_P1(m) H_P2(m)',/, &
1252 ' v_P1(m/a) v_P2(m/a)',/, &
1253 ' T_P1(C) T_P2(C)',/, &
1254 ' Rb_P1(W/m2) Rb_P2(W/m2)')
1255 1107
format(
'---------------------------------------')
1266 flag_3d_output = .false.
1268 flag_3d_output = .true.
1270 stop
' sico_init: ERGDAT must be either 0 or 1!'
1274 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
1275 flag_3d_output, ndat2d, ndat3d)
1277 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
1278 flag_3d_output, ndat2d, ndat3d)
1280 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
1285 if (time_output(1) <= time_init+eps)
then
1288 flag_3d_output = .false.
1290 flag_3d_output = .true.
1292 stop
' sico_init: ERGDAT must be either 0 or 1!'
1296 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
1297 flag_3d_output, ndat2d, ndat3d)
1299 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
1300 flag_3d_output, ndat2d, ndat3d)
1302 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
1309 flag_3d_output = .false.
1312 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
1313 flag_3d_output, ndat2d, ndat3d)
1315 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
1316 flag_3d_output, ndat2d, ndat3d)
1318 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
1321 if (time_output(1) <= time_init+eps)
then
1323 flag_3d_output = .true.
1326 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
1327 flag_3d_output, ndat2d, ndat3d)
1329 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
1330 flag_3d_output, ndat2d, ndat3d)
1332 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
1338 stop
' sico_init: OUTPUT must be either 1, 2 or 3!'
1341 call
output2(time_init, dxi, deta, delta_ts, glac_index, z_sl)
1343 call
output3(time_init, delta_ts, glac_index, z_sl)
1346 call
output4(time_init, 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_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, public ice_mat_eqs_pars(RF_table, R_T_val, KAPPA_table, C_table, n_temp_min, n_temp_max, RHO_I_val, RHO_C_val, KAPPA_C_val, C_C_val)
Setting of required physical parameters.
subroutine output2(time, dxi, deta, delta_ts, glac_index, z_sl)
Writing of time-series data on file in ASCII format.
subroutine phys_para()
Reading of physical parameters.
Declarations of kind types for SICOPOLIS.
subroutine topography3(dxi, deta, z_sl, anfdatname)
Definition of the initial surface and bedrock topography (including gradients) and of the horizontal ...
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 topography3_nc(dxi, deta, z_sl, anfdatname)
Definition of the initial surface and bedrock topography (including gradients) and of the horizontal ...
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 ...
Declarations of global variables for SICOPOLIS (for the ANT domain).
subroutine topography2(dxi, deta)
Definition of the initial surface and bedrock topography (including gradients) and of the horizontal ...
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, public calc_c_int_table(c_table, n_tmp_min, n_tmp_max, L_val)
Computation of the temperature integral of the specific heat of ice as a table (c_int_table). Further, definition of the latent heat of ice.
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_init(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)
Initialisations for 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 init_temp_water_age()
Initial temperature, water content and age.
Material quantities of ice: Rate factor, heat conductivity, specific heat (heat capacity).
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, public calc_c_int_inv_table()
Computation of the inverse of the temperature integral of the specific heat of ice as a table (c_int_...
Conversion from temperature (temp) and water content (omega) to enthalpy (enth) and vice versa...
subroutine calc_vz_sia(dxi, deta, dzeta_c, dzeta_t)
Computation of the vertical velocity vz in the shallow ice approximation.
subroutine output1(runname, time, delta_ts, glac_index, z_sl, flag_3d_output, ndat2d, ndat3d)
Writing of time-slice files in binary format.
real(dp) function, public enth_fct_temp_omega(temp_val, omega_val)
Enthalpy as a function of temperature and water content.