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, &
59 integer(i4b),
intent(out) :: ii((imax+1)*(jmax+1)), &
60 jj((imax+1)*(jmax+1)), &
62 integer(i4b),
intent(out) :: ndat2d, ndat3d
63 integer(i4b),
intent(out) :: n_output
64 real(dp),
intent(out) :: delta_ts, glac_index
65 real(dp),
intent(out) :: mean_accum
66 real(dp),
intent(out) :: dtime, dtime_temp, dtime_wss, &
68 real(dp),
intent(out) :: time, time_init, time_end, time_output(100)
69 real(dp),
intent(out) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
70 real(dp),
intent(out) :: z_sl, dzsl_dtau, z_mar
71 character(len=100),
intent(out) :: runname
73 integer(i4b) :: i, j, kc, kt, kr, m, n, ir, jr
74 integer(i4b) :: ios, ios1, ios2, ios3, ios4
76 real(dp) :: dtime0, dtime_temp0, dtime_wss0, dtime_out0, dtime_ser0
77 real(dp) :: time_init0, time_end0, time_output0(100)
78 real(dp),
dimension(0:JMAX,0:IMAX) :: precip_factor
80 real(dp) :: transition_length_sliding, quasi_time, d_quasi_time
81 real(dp),
dimension(0:JMAX,0:IMAX) :: r_mask_sedi_new
82 character(len=100) :: anfdatname, target_topo_dat_name
83 character(len=256) :: filename_with_path
84 character(len=256) :: shell_command
86 logical :: flag_3d_output
95 character(len=64),
parameter :: thisroutine =
'sico_init'
97 character(len=64),
parameter :: fmt1 =
'(a)', &
101 character(len= 8) :: ch_imax
102 character(len=128) :: fmt4
104 write(ch_imax, fmt=
'(i8)') imax
105 write(fmt4, fmt=
'(a)')
'('//trim(adjustl(ch_imax))//
'(i1),i1)'
110 ch_domain_long =
'Antarctica'
111 ch_domain_short =
'ant'
114 ch_domain_long =
'Austfonna'
115 ch_domain_short =
'asf'
117 #elif defined(EMTP2SGE)
118 ch_domain_long =
'EISMINT Phase 2 Simplified Geometry Experiment'
119 ch_domain_short =
'emtp2sge'
122 ch_domain_long =
'Greenland'
123 ch_domain_short =
'grl'
126 ch_domain_long =
'Northern hemisphere'
127 ch_domain_short =
'nhem'
130 ch_domain_long =
'Scandinavia and Eurasia'
131 ch_domain_short =
'scand'
134 ch_domain_long =
'Tibet'
135 ch_domain_short =
'tibet'
138 ch_domain_long =
'North polar cap of Mars'
139 ch_domain_short =
'nmars'
142 ch_domain_long =
'South polar cap of Mars'
143 ch_domain_short =
'smars'
146 ch_domain_long =
'XYZ'
147 ch_domain_short =
'xyz'
149 ch_domain_long = trim(ch_domain_long)//
'/ISMIP HEINO'
153 stop
' sico_init: No valid domain specified!'
174 #if (CALCZS==4 || MARGIN==3 || DYNAMICS==2)
177 call lis_initialize(ierr)
194 if ( trim(version) /= trim(sico_version) ) &
195 stop
' sico_init: SICOPOLIS version not compatible with header file!'
199 #if ( !defined(DYNAMICS) )
200 stop
' sico_init: DYNAMICS not defined in the header file!'
203 #if ( !defined(CALCMOD) )
204 stop
' sico_init: CALCMOD not defined in the header file!'
207 #if ( defined(ENTHMOD) )
208 write(6, fmt=
'(a)')
' sico_init: ENTHMOD must not be defined any more.'
209 write(6, fmt=
'(a)')
' Please update your header file!'
216 #if (GRID==0 || GRID==1)
218 if (abs(dx-40.0_dp) < eps)
then
220 if ( (imax /= 150).or.(jmax /= 150) )
then
221 stop
' sico_init: IMAX and/or JMAX wrong!'
224 else if (abs(dx-20.0_dp) < eps)
then
226 if ( (imax /= 300).or.(jmax /= 300) )
then
227 stop
' sico_init: IMAX and/or JMAX wrong!'
230 else if (abs(dx-10.0_dp) < eps)
then
232 if ( (imax /= 600).or.(jmax /= 600) )
then
233 stop
' sico_init: IMAX and/or JMAX wrong!'
237 stop
' sico_init: DX wrong!'
242 stop
' sico_init: GRID==2 not allowed for this application!'
250 #if (CALCMOD==0 || CALCMOD==2 || CALCMOD==3 || CALCMOD==-1)
253 write(6, fmt=
'(a)')
' sico_init: For options CALCMOD==0, 2, 3 or -1,'
254 write(6, fmt=
'(a)')
' the separate kt domain is redundant.'
255 write(6, fmt=
'(a)')
' Therefore, consider setting KTMAX to 1.'
256 write(6, fmt=
'(a)')
' '
264 #if ((TSURFACE == 5) && (ACCSURFACE != 5))
265 stop
' sico_init: Options TSURFACE==5 and ACCSURFACE==5 must be used together!'
268 #if ((TSURFACE != 5) && (ACCSURFACE == 5))
269 stop
' sico_init: Options TSURFACE==5 and ACCSURFACE==5 must be used together!'
273 #if (ACCSURFACE != 6)
274 write(6, fmt=
'(a)')
' sico_init: Options TSURFACE==6, ACCSURFACE==6'
275 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!'
278 write(6, fmt=
'(a)')
' sico_init: Options TSURFACE==6, ACCSURFACE==6'
279 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!'
284 #if (ACCSURFACE == 6)
286 write(6, fmt=
'(a)')
' sico_init: Options TSURFACE==6, ACCSURFACE==6'
287 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!'
290 write(6, fmt=
'(a)')
' sico_init: Options TSURFACE==6, ACCSURFACE==6'
291 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!'
300 stop
' sico_init: Option ADV_HOR==1 (central differences) not defined!'
308 #if ((MARGIN==3 && DYNAMICS==1) || DYNAMICS==2) /* requires SSA or SStA */
310 write(6, fmt=
'(a)')
' sico_init: Distortion correction not implemented'
311 write(6, fmt=
'(a)')
' for the shallow shelf approximation (SSA)'
312 write(6, fmt=
'(a)')
' or the shelfy stream approximation (SStA)'
313 write(6, fmt=
'(a)')
' -> GRID==0 required!'
324 #elif (TSURFACE == 5)
328 #elif (TSURFACE == 6)
338 dtime_temp0 = dtime_temp0
340 dtime_wss0 = dtime_wss0
345 dzeta_c = 1.0_dp/
real(kcmax,dp)
346 dzeta_t = 1.0_dp/
real(ktmax,dp)
347 dzeta_r = 1.0_dp/
real(krmax,dp)
356 if (deform >= eps)
then
358 flag_aa_nonzero = .true.
366 eaz_c_quotient(kc) = 0.0_dp
369 zeta_c(kc) = kc*dzeta_c
370 eaz_c(kc) = exp(aa*zeta_c(kc))
371 eaz_c_quotient(kc) = (eaz_c(kc)-1.0_dp)/(ea-1.0_dp)
377 eaz_c_quotient(kc) = 1.0_dp
381 flag_aa_nonzero = .false.
389 eaz_c_quotient(kc) = 0.0_dp
392 zeta_c(kc) = kc*dzeta_c
394 eaz_c_quotient(kc) = zeta_c(kc)
400 eaz_c_quotient(kc) = 1.0_dp
410 zeta_t(kt) = kt*dzeta_t
422 zeta_r(kr) = kr*dzeta_r
436 if ((i <= imax).and.(j <= jmax))
then
448 anfdatname = anfdatname
450 #if defined(YEAR_ZERO)
451 year_zero = year_zero
453 year_zero = 2000.0_dp
456 time_init0 = time_init0
457 time_end0 = time_end0
458 dtime_ser0 = dtime_ser0
460 #if ( OUTPUT==1 || OUTPUT==3 )
461 dtime_out0 = dtime_out0
464 #if ( OUTPUT==2 || OUTPUT==3 )
466 time_output0( 1) = time_out0_01
467 time_output0( 2) = time_out0_02
468 time_output0( 3) = time_out0_03
469 time_output0( 4) = time_out0_04
470 time_output0( 5) = time_out0_05
471 time_output0( 6) = time_out0_06
472 time_output0( 7) = time_out0_07
473 time_output0( 8) = time_out0_08
474 time_output0( 9) = time_out0_09
475 time_output0(10) = time_out0_10
476 time_output0(11) = time_out0_11
477 time_output0(12) = time_out0_12
478 time_output0(13) = time_out0_13
479 time_output0(14) = time_out0_14
480 time_output0(15) = time_out0_15
481 time_output0(16) = time_out0_16
482 time_output0(17) = time_out0_17
483 time_output0(18) = time_out0_18
484 time_output0(19) = time_out0_19
485 time_output0(20) = time_out0_20
490 shell_command =
'if [ ! -d'
491 shell_command = trim(shell_command)//
' '//outpath
492 shell_command = trim(shell_command)//
' '//
'] ; then mkdir'
493 shell_command = trim(shell_command)//
' '//outpath
494 shell_command = trim(shell_command)//
' '//
'; fi'
495 call system(trim(shell_command))
498 open(10, iostat=ios, &
499 file=outpath//
'/'//trim(runname)//
'.log', &
502 stop
' sico_init: Error when opening the log file!'
504 write(10, fmt=trim(fmt1))
'Computational domain:'
505 write(10, fmt=trim(fmt1)) trim(ch_domain_long)
506 write(10, fmt=trim(fmt1))
' '
508 write(10, fmt=trim(fmt2))
'imax =', imax
509 write(10, fmt=trim(fmt2))
'jmax =', jmax
510 write(10, fmt=trim(fmt2))
'kcmax =', kcmax
511 write(10, fmt=trim(fmt2))
'ktmax =', ktmax
512 write(10, fmt=trim(fmt2))
'krmax =', krmax
513 write(10, fmt=trim(fmt1))
' '
515 write(10, fmt=trim(fmt3))
'a =', aa
516 write(10, fmt=trim(fmt1))
' '
518 #if (GRID==0 || GRID==1)
519 write(10, fmt=trim(fmt3))
'x0 =', x0
520 write(10, fmt=trim(fmt3))
'y0 =', y0
521 write(10, fmt=trim(fmt3))
'dx =', dx
523 stop
' sico_init: GRID==2 not allowed for this application!'
525 write(10, fmt=trim(fmt1))
' '
527 write(10, fmt=trim(fmt3))
'year_zero =', year_zero
528 write(10, fmt=trim(fmt3))
'time_init =', time_init0
529 write(10, fmt=trim(fmt3))
'time_end =', time_end0
530 write(10, fmt=trim(fmt3))
'dtime =', dtime0
531 write(10, fmt=trim(fmt3))
'dtime_temp =', dtime_temp0
533 write(10, fmt=trim(fmt3))
'dtime_wss =', dtime_wss0
535 #if ( OUTPUT==1 || OUTPUT==3 )
536 write(10, fmt=trim(fmt3))
'dtime_out =', dtime_out0
538 write(10, fmt=trim(fmt3))
'dtime_ser =', dtime_ser0
539 write(10, fmt=trim(fmt1))
' '
541 write(10, fmt=trim(fmt2))
'ANF_DAT =', anf_dat
542 write(10, fmt=trim(fmt1))
'zs_present file = '//zs_present_file
544 write(10, fmt=trim(fmt1))
'zl_present file = '//zl_present_file
546 write(10, fmt=trim(fmt1))
'zl0 file = '//zl0_file
547 write(10, fmt=trim(fmt1))
'mask_present file = '//mask_present_file
548 #if (ANF_DAT==1 && defined(TEMP_INIT))
549 write(10, fmt=trim(fmt2))
'TEMP_INIT =', temp_init
552 write(10, fmt=trim(fmt1))
'Initial-value file = '//anfdatname
553 write(10, fmt=trim(fmt1))
'Path to initial-value file = '//anfdatpath
555 write(10, fmt=trim(fmt1))
' '
558 write(10, fmt=trim(fmt3))
'time_target_topo_init =', time_target_topo_init0
559 write(10, fmt=trim(fmt3))
'time_target_topo_final =', time_target_topo_final0
560 write(10, fmt=trim(fmt1))
'Target-topography file = '//target_topo_dat_name
561 write(10, fmt=trim(fmt1))
'Path to target-topography file = '//target_topo_dat_path
562 write(10, fmt=trim(fmt1))
' '
566 write(10, fmt=trim(fmt1))
'Maximum ice extent mask file = '//mask_maxextent_file
567 write(10, fmt=trim(fmt1))
' '
570 write(10, fmt=trim(fmt1))
'Physical-parameter file = '//phys_para_file
571 write(10, fmt=trim(fmt1))
' '
573 #if (CALCZS==3 || CALCZS==4)
574 write(10, fmt=trim(fmt3))
'ovi_weight =', ovi_weight
576 write(10, fmt=trim(fmt3))
'omega_sor =', omega_sor
578 write(10, fmt=trim(fmt1))
' '
582 write(10, fmt=trim(fmt3))
'delta_ts0 =', delta_ts0
584 write(10, fmt=trim(fmt3))
'sine_amplit =', sine_amplit
585 write(10, fmt=trim(fmt3))
'sine_period =', sine_period
587 write(10, fmt=trim(fmt1))
'GRIP file = '//grip_temp_file
588 write(10, fmt=trim(fmt3))
'grip_temp_fact =', grip_temp_fact
590 write(10, fmt=trim(fmt1))
'Glacial-index file = '//glac_ind_file
591 write(10, fmt=trim(fmt1))
'temp_ma_anom file = '//temp_ma_anom_file
592 write(10, fmt=trim(fmt3))
'temp_ma_anom fact = ', temp_ma_anom_fact
593 write(10, fmt=trim(fmt1))
'temp_mj_anom file = '//temp_mj_anom_file
594 write(10, fmt=trim(fmt3))
'temp_mj_anom fact = ', temp_mj_anom_fact
596 write(10, fmt=trim(fmt1))
'temp_precip_anom file = '//temp_precip_anom_file
597 write(10, fmt=trim(fmt3))
'temp_ma_anom fact = ', temp_ma_anom_fact
598 write(10, fmt=trim(fmt3))
'temp_mj_anom fact = ', temp_mj_anom_fact
601 write(10, fmt=trim(fmt1))
'precip_present_file = '//precip_present_file
602 #if (defined(PRECIP_FACTOR_FILE))
603 if ( trim(adjustl(precip_factor_file)) /=
'none' ) &
604 write(10, fmt=trim(fmt1))
'precip_factor_file = '//precip_factor_file
607 write(10, fmt=trim(fmt3))
'accfact =', accfact
608 #elif (ACCSURFACE==2 || ACCSURFACE==3)
609 write(10, fmt=trim(fmt3))
'gamma_s =', gamma_s
610 #elif (ACCSURFACE==5)
611 write(10, fmt=trim(fmt1))
'precip_anom file = '//precip_anom_file
612 write(10, fmt=trim(fmt3))
'precip_anom fact = ', precip_anom_fact
613 #elif (ACCSURFACE==6)
614 write(10, fmt=trim(fmt1))
'temp_precip_anom file = '//temp_precip_anom_file
615 write(10, fmt=trim(fmt3))
'precip_anom fact = ', precip_anom_fact
617 #if (ACCSURFACE <= 3)
618 write(10, fmt=trim(fmt2))
'ELEV_DESERT =', elev_desert
619 #if (ELEV_DESERT == 1)
620 write(10, fmt=trim(fmt3))
'gamma_p =', gamma_p
621 write(10, fmt=trim(fmt3))
'zs_thresh =', zs_thresh
626 write(10, fmt=trim(fmt3))
'lambda_lti =', lambda_lti
627 write(10, fmt=trim(fmt3))
'temp_lti =', temp_lti
631 write(10, fmt=trim(fmt3))
'z_sl0 =', z_sl0
633 write(10, fmt=trim(fmt1))
'sea-level file = '//sea_level_file
635 write(10, fmt=trim(fmt1))
' '
638 #if ( MARINE_ICE_CALVING==2 || MARINE_ICE_CALVING==3 )
639 write(10, fmt=trim(fmt3))
'z_mar =', z_mar
640 write(10, fmt=trim(fmt1))
' '
641 #elif ( MARINE_ICE_CALVING==4 || MARINE_ICE_CALVING==5 \
642 || marine_ice_calving==6 || marine_ice_calving==7 )
643 write(10, fmt=trim(fmt3))
'fact_z_mar =', fact_z_mar
644 write(10, fmt=trim(fmt1))
' '
645 #elif ( ( MARINE_ICE_FORMATION==2 ) && ( MARINE_ICE_CALVING==9 ) )
646 write(10, fmt=trim(fmt3))
'calv_uw_coeff =', calv_uw_coeff
647 write(10, fmt=trim(fmt3))
'r1_calv_uw =', r1_calv_uw
648 write(10, fmt=trim(fmt3))
'r2_calv_uw =', r2_calv_uw
649 write(10, fmt=trim(fmt1))
' '
652 #if ICE_SHELF_CALVING==2
653 write(10, fmt=trim(fmt3))
'H_calv =', h_calv
654 write(10, fmt=trim(fmt1))
' '
658 write(10, fmt=trim(fmt3))
'c_slide =', c_slide
659 write(10, fmt=trim(fmt3))
'gamma_slide =', gamma_slide
660 write(10, fmt=trim(fmt2))
'p_weert =', p_weert
661 write(10, fmt=trim(fmt2))
'q_weert =', q_weert
663 write(10, fmt=trim(fmt3))
'red_pres_limit_fact =', red_pres_limit_fact
665 write(10, fmt=trim(fmt1))
' '
667 #if ( defined(SEDI_SLIDE) && SEDI_SLIDE==2 )
668 write(10, fmt=trim(fmt1))
'Sediment-mask file = '//mask_sedi_file
669 write(10, fmt=trim(fmt1))
' '
671 write(10, fmt=trim(fmt3))
'c_slide_sedi =', c_slide_sedi
672 write(10, fmt=trim(fmt3))
'gamma_slide_sedi =', gamma_slide_sedi
673 write(10, fmt=trim(fmt2))
'p_weert_sedi =', p_weert_sedi
674 write(10, fmt=trim(fmt2))
'q_weert_sedi =', q_weert_sedi
675 #if ( defined(TRANS_LENGTH_SL) )
676 write(10, fmt=trim(fmt3))
'trans_length_sl =', trans_length_sl
678 write(10, fmt=trim(fmt1))
' '
682 write(10, fmt=trim(fmt3))
'q_geo =', q_geo
684 write(10, fmt=trim(fmt1))
'q_geo file = '//q_geo_file
686 write(10, fmt=trim(fmt1))
' '
688 #if (defined(MARINE_ICE_BASAL_MELTING))
689 write(10, fmt=trim(fmt2))
'MARINE_ICE_BASAL_MELTING =', marine_ice_basal_melting
690 #if (MARINE_ICE_BASAL_MELTING==2 || MARINE_ICE_BASAL_MELTING==3)
691 write(10, fmt=trim(fmt3))
'qbm_marine =', qbm_marine
693 write(10, fmt=trim(fmt1))
' '
697 write(10, fmt=trim(fmt2))
'FLOATING_ICE_BASAL_MELTING =', floating_ice_basal_melting
698 #if (FLOATING_ICE_BASAL_MELTING<=3)
699 write(10, fmt=trim(fmt3))
'qbm_float_1 =', qbm_float_1
700 write(10, fmt=trim(fmt3))
'qbm_float_2 =', qbm_float_2
702 write(10, fmt=trim(fmt3))
'qbm_float_3 =', qbm_float_3
703 write(10, fmt=trim(fmt3))
'z_abyss =', z_abyss
704 #if (FLOATING_ICE_BASAL_MELTING==4)
706 write(10, fmt=trim(fmt3))
'H_w_0 =', h_w_0
709 write(10, fmt=trim(fmt1))
' '
712 write(10, fmt=trim(fmt2))
'REBOUND =', rebound
714 write(10, fmt=trim(fmt3))
'frac_llra =', frac_llra
716 #if (REBOUND==1 || REBOUND==2)
717 write(10, fmt=trim(fmt2))
'TIME_LAG_MOD =', time_lag_mod
718 #if (TIME_LAG_MOD==1)
719 write(10, fmt=trim(fmt3))
'time_lag =', time_lag
720 #elif (TIME_LAG_MOD==2)
721 write(10, fmt=trim(fmt1))
'time_lag_file = '//time_lag_file
723 stop
' sico_init: TIME_LAG_MOD must be either 1 or 2!'
727 write(10, fmt=trim(fmt2))
'FLEX_RIG_MOD =', flex_rig_mod
728 #if (FLEX_RIG_MOD==1)
729 write(10, fmt=trim(fmt3))
'flex_rig =', flex_rig
730 #elif (FLEX_RIG_MOD==2)
731 write(10, fmt=trim(fmt1))
'flex_rig_file = '//flex_rig_file
733 stop
' sico_init: FLEX_RIG_MOD must be either 1 or 2!'
736 write(10, fmt=trim(fmt2))
'Q_LITHO =', q_litho
737 write(10, fmt=trim(fmt1))
' '
740 write(10, fmt=trim(fmt3))
'gr_size =', gr_size
741 write(10, fmt=trim(fmt1))
' '
744 write(10, fmt=trim(fmt3))
'sigma_res =', sigma_res
745 write(10, fmt=trim(fmt1))
' '
748 write(10, fmt=trim(fmt2))
'ENHMOD =', enhmod
749 #if (ENHMOD==1 || ENHMOD==2 || ENHMOD==3)
750 write(10, fmt=trim(fmt3))
'enh_fact =', enh_fact
752 #if (ENHMOD==2 || ENHMOD==3)
753 write(10, fmt=trim(fmt3))
'enh_intg =', enh_intg
756 write(10, fmt=trim(fmt3))
'age_trans =', age_trans_0
759 write(10, fmt=trim(fmt3))
'date_trans1 =', date_trans1_0
760 write(10, fmt=trim(fmt3))
'date_trans2 =', date_trans2_0
761 write(10, fmt=trim(fmt3))
'date_trans3 =', date_trans3_0
763 #if (ENHMOD==4 || ENHMOD==5)
764 write(10, fmt=trim(fmt3))
'enh_compr =', enh_compr
765 write(10, fmt=trim(fmt3))
'enh_shear =', enh_shear
767 #if ((ENHMOD==1 || ENHMOD==2 || ENHMOD==3 || ENHMOD==4) && MARGIN==3)
768 write(10, fmt=trim(fmt3))
'enh_shelf =', enh_shelf
770 write(10, fmt=trim(fmt1))
' '
772 write(10, fmt=trim(fmt3))
'numdiff_H_t =', numdiff_h_t
773 write(10, fmt=trim(fmt3))
'tau_cts =', tau_cts
774 write(10, fmt=trim(fmt3))
'H_min =', h_min
775 write(10, fmt=trim(fmt3))
'vh_max =', vh_max
776 write(10, fmt=trim(fmt3))
'hd_min =', hd_min
777 write(10, fmt=trim(fmt3))
'hd_max =', hd_max
779 write(10, fmt=trim(fmt3))
'qbm_min =', qbm_min
780 #elif defined(QB_MIN) /* obsolete */
781 write(10, fmt=trim(fmt3))
'qb_min =', qb_min
784 write(10, fmt=trim(fmt3))
'qbm_max =', qbm_max
785 #elif defined(QB_MAX) /* obsolete */
786 write(10, fmt=trim(fmt3))
'qb_max =', qb_max
788 write(10, fmt=trim(fmt3))
'age_min =', age_min
789 write(10, fmt=trim(fmt3))
'age_max =', age_max
790 write(10, fmt=trim(fmt3))
'mean_accum =', mean_accum
792 write(10, fmt=trim(fmt3))
'age_diff =', agediff
794 write(10, fmt=trim(fmt1))
' '
796 write(10, fmt=trim(fmt2))
'GRID =', grid
797 write(10, fmt=trim(fmt2))
'DYNAMICS =', dynamics
798 #if (DYNAMICS==2 && defined(RATIO_SL_THRESH))
799 write(10, fmt=trim(fmt3))
'ratio_sl_thresh =', ratio_sl_thresh
801 write(10, fmt=trim(fmt2))
'CALCMOD =', calcmod
802 #if ( CALCMOD==-1 && defined(TEMP_CONST) )
803 write(10, fmt=trim(fmt3))
'TEMP_CONST =', temp_const
805 #if ( CALCMOD==-1 && defined(AGE_CONST) )
806 write(10, fmt=trim(fmt3))
'AGE_CONST =', age_const
808 #if ( CALCMOD==1 && defined(CTS_MELTING_FREEZING) )
809 write(10, fmt=trim(fmt2))
'CTS_MELTING_FREEZING =', cts_melting_freezing
811 write(10, fmt=trim(fmt2))
'FLOW_LAW =', flow_law
812 write(10, fmt=trim(fmt2))
'FIN_VISC =', fin_visc
813 write(10, fmt=trim(fmt2))
'MARGIN =', margin
815 write(10, fmt=trim(fmt2))
'MARINE_ICE_FORMATION =', marine_ice_formation
816 write(10, fmt=trim(fmt2))
'MARINE_ICE_CALVING =', marine_ice_calving
818 write(10, fmt=trim(fmt2))
'ICE_SHELF_CALVING =', ice_shelf_calving
820 write(10, fmt=trim(fmt2))
'ZS_EVOL =', zs_evol
821 write(10, fmt=trim(fmt2))
'CALCZS =', calczs
822 write(10, fmt=trim(fmt2))
'ADV_HOR =', adv_hor
823 write(10, fmt=trim(fmt2))
'ADV_VERT =', adv_vert
824 write(10, fmt=trim(fmt2))
'TOPOGRAD =', topograd
825 write(10, fmt=trim(fmt2))
'TEMP_PRESENT_PARA =', temp_present_para
826 write(10, fmt=trim(fmt2))
'TSURFACE =', tsurface
827 write(10, fmt=trim(fmt2))
'ACCSURFACE =', accsurface
829 write(10, fmt=trim(fmt2))
'PRECIP_ANOM_INTERPOL =', precip_anom_interpol
831 write(10, fmt=trim(fmt2))
'SOLID_PRECIP =', solid_precip
832 write(10, fmt=trim(fmt2))
'ABLSURFACE =', ablsurface
833 write(10, fmt=trim(fmt2))
'SEA_LEVEL =', sea_level
834 write(10, fmt=trim(fmt2))
'SLIDE_LAW =', slide_law
835 #if defined(SEDI_SLIDE)
836 write(10, fmt=trim(fmt2))
'SEDI_SLIDE =', sedi_slide
838 write(10, fmt=trim(fmt2))
'Q_GEO_MOD =', q_geo_mod
839 write(10, fmt=trim(fmt1))
' '
841 #if defined(OUT_TIMES)
842 write(10, fmt=trim(fmt2))
'OUT_TIMES =', out_times
844 write(10, fmt=trim(fmt2))
'OUTPUT =', output
845 write(10, fmt=trim(fmt2))
'OUTSER =', outser
846 #if defined(OUTSER_V_A)
847 write(10, fmt=trim(fmt2))
'OUTSER_V_A =', outser_v_a
849 #if ( OUTPUT==1 || OUTPUT==2 )
850 write(10, fmt=trim(fmt2))
'ERGDAT =', ergdat
852 write(10, fmt=trim(fmt2))
'NETCDF =', netcdf
853 write(10, fmt=trim(fmt1))
' '
854 #if ( OUTPUT==2 || OUTPUT==3 )
855 write(10, fmt=trim(fmt2))
'n_output =', n_output
857 write(10, fmt=trim(fmt3))
'time_output =', time_output0(n)
859 write(10, fmt=trim(fmt1))
' '
862 write(10, fmt=trim(fmt1))
'Program version and date: '//version//
' / '//date
864 close(10, status=
'keep')
868 year_zero = year_zero*year_sec
869 time_init = time_init0*year_sec
870 time_end = time_end0*year_sec
871 dtime = dtime0*year_sec
872 dtime_temp = dtime_temp0*year_sec
874 dtime_wss = dtime_wss0*year_sec
876 dtime_ser = dtime_ser0*year_sec
877 #if ( OUTPUT==1 || OUTPUT==3 )
878 dtime_out = dtime_out0*year_sec
880 #if ( OUTPUT==2 || OUTPUT==3 )
882 time_output(n) = time_output0(n)*year_sec
886 if (abs(dtime_temp/dtime-nint(dtime_temp/dtime)) > eps) &
887 stop
' sico_init: dtime_temp must be a multiple of dtime!'
890 if (abs(dtime_wss/dtime-nint(dtime_wss/dtime)) > eps) &
891 stop
' sico_init: dtime_wss must be a multiple of dtime!'
895 time_target_topo_init = time_target_topo_init0 *year_sec
896 time_target_topo_final = time_target_topo_final0*year_sec
903 #if (GRID==0 || GRID==1)
905 open(21, iostat=ios, &
906 file=inpath//
'/'//trim(ch_domain_short)//
'/'//precip_present_file, &
907 recl=8192, status=
'old')
911 stop
' sico_init: GRID==2 not allowed for this application!'
915 if (ios /= 0) stop
' sico_init: Error when opening the precip file!'
917 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
920 read(21, fmt=*) (precip_ma_present(j,i), i=0,imax)
923 close(21, status=
'keep')
925 precip_ma_present = precip_ma_present *(1.0e-03_dp/year_sec)*(rho_w/rho)
928 precip_factor = 1.0_dp
930 #if (defined(PRECIP_FACTOR_FILE))
932 if ( trim(adjustl(precip_factor_file)) /=
'none' )
then
934 open(21, iostat=ios, &
935 file=inpath//
'/'//trim(ch_domain_short)//
'/'//precip_factor_file, &
936 recl=8192, status=
'old')
938 if (ios /= 0) stop
' sico_init: Error when opening the precip factor file!'
940 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
943 read(21, fmt=*) (precip_factor(j,i), i=0,imax)
946 close(21, status=
'keep')
952 precip_ma_present = precip_ma_present * precip_factor
960 precip_present(j,i,n) = precip_ma_present(j,i)
969 #if (GRID==0 || GRID==1)
971 open(21, iostat=ios, &
972 file=inpath//
'/'//trim(ch_domain_short)//
'/'//precip_anom_file, &
973 recl=8192, status=
'old')
977 if (ios /= 0) stop
' sico_init: Error when opening the precip anomaly file!'
979 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
982 read(21, fmt=*) (precip_ma_lgm_anom(j,i), i=0,imax)
985 close(21, status=
'keep')
987 precip_ma_lgm_anom = precip_ma_lgm_anom * precip_anom_fact
996 precip_lgm_anom(j,i,n) = max(precip_ma_lgm_anom(j,i), eps)
999 #if (PRECIP_ANOM_INTERPOL==1)
1000 gamma_precip_lgm_anom(j,i,n) = 0.0_dp
1001 #elif (PRECIP_ANOM_INTERPOL==2)
1002 gamma_precip_lgm_anom(j,i,n) = -log(precip_lgm_anom(j,i,n))
1004 stop
' sico_init: Wrong value of switch PRECIP_ANOM_INTERPOL!'
1015 mean_accum = mean_accum*(1.0e-03_dp/year_sec)*(rho_w/rho)
1020 #if (GRID==0 || GRID==1)
1022 open(24, iostat=ios, &
1023 file=inpath//
'/'//trim(ch_domain_short)//
'/'//mask_present_file, &
1024 recl=2048, status=
'old')
1028 stop
' sico_init: GRID==2 not allowed for this application!'
1032 if (ios /= 0) stop
' sico_init: Error when opening the mask file!'
1034 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do
1037 read(24, fmt=trim(fmt4)) (maske_help(j,i), i=0,imax)
1040 close(24, status=
'keep')
1044 #if ( defined(SEDI_SLIDE) && SEDI_SLIDE==2 )
1046 open(24, iostat=ios, &
1047 file=inpath//
'/'//trim(ch_domain_short)//
'/'//mask_sedi_file, &
1048 recl=2048, status=
'old')
1050 if (ios /= 0) stop
' sico_init: Error when opening the rock/sediment mask file!'
1052 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do
1055 read(24, fmt=trim(fmt4)) (maske_sedi(j,i), i=0,imax)
1058 close(24, status=
'keep')
1062 if (maske_sedi(j,i) == 2) maske_sedi(j,i) = 7
1076 #if (GRID==0 || GRID==1)
1078 open(21, iostat=ios, &
1079 file=inpath//
'/'//trim(ch_domain_short)//
'/'//zs_present_file, &
1080 recl=8192, status=
'old')
1084 stop
' sico_init: GRID==2 not allowed for this application!'
1088 if (ios /= 0) stop
' sico_init: Error when opening the zs file!'
1090 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
1093 read(21, fmt=*) (zs_ref(j,i), i=0,imax)
1096 close(21, status=
'keep')
1103 if (maske_help(j,i) >= 2) zs_ref(j,i) = 0.0_dp
1111 target_topo_dat_name = trim(target_topo_dat_name)
1114 write(6, fmt=
'(a)')
' sico_init: Reading of target topography'
1115 write(6, fmt=
'(a)')
' only implemented for NetCDF files (NETCDF==2)!'
1120 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
1129 #if (GRID==0 || GRID==1)
1131 open(24, iostat=ios, &
1132 file=inpath//
'/'//trim(ch_domain_short)//
'/'//mask_maxextent_file, &
1133 recl=2048, status=
'old')
1137 stop
' sico_init: GRID==2 not allowed for this application!'
1142 stop
' sico_init: Error when opening the maximum ice extent mask file!'
1144 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do
1147 read(24, fmt=trim(fmt4)) (maske_maxextent(j,i), i=0,imax)
1150 close(24, status=
'keep')
1159 #if (GRID==0 || GRID==1)
1161 open(21, iostat=ios, &
1162 file=inpath//
'/'//trim(ch_domain_short)//
'/'//temp_ma_anom_file, &
1163 recl=8192, status=
'old')
1167 if (ios /= 0) stop
' sico_init: Error when opening the temp_ma anomaly file!'
1169 #if (GRID==0 || GRID==1)
1171 open(22, iostat=ios, &
1172 file=inpath//
'/'//trim(ch_domain_short)//
'/'//temp_mj_anom_file, &
1173 recl=8192, status=
'old')
1177 if (ios /= 0) stop
' sico_init: Error when opening the temp_mj anomaly file!'
1179 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
1180 do n=1, 6;
read(22, fmt=
'(a)') ch_dummy;
end do
1183 read(21, fmt=*) (temp_ma_lgm_anom(j,i), i=0,imax)
1184 read(22, fmt=*) (temp_mj_lgm_anom(j,i), i=0,imax)
1187 close(21, status=
'keep')
1188 close(22, status=
'keep')
1190 temp_ma_lgm_anom = temp_ma_lgm_anom * temp_ma_anom_fact
1191 temp_mj_lgm_anom = temp_mj_lgm_anom * temp_mj_anom_fact
1199 open(21, iostat=ios, &
1200 file=inpath//
'/general/'//grip_temp_file, &
1203 stop
' sico_init: Error when opening the data file for delta_ts!'
1205 read(21, fmt=*) ch_dummy, grip_time_min, grip_time_stp, grip_time_max
1207 if (ch_dummy /=
'#')
then
1208 write(6, fmt=*)
' sico_init: grip_time_min, grip_time_stp, grip_time_max'
1209 write(6, fmt=*)
' not defined in data file for delta_ts!'
1213 ndata_grip = (grip_time_max-grip_time_min)/grip_time_stp
1215 allocate(griptemp(0:ndata_grip))
1218 read(21, fmt=*) d_dummy, griptemp(n)
1221 close(21, status=
'keep')
1229 open(21, iostat=ios, &
1230 file=inpath//
'/general/'//glac_ind_file, status=
'old')
1231 if (ios /= 0) stop
' sico_init: Error when opening the glacial-index file!'
1233 read(21, fmt=*) ch_dummy, gi_time_min, gi_time_stp, gi_time_max
1235 if (ch_dummy /=
'#')
then
1236 write(6, fmt=*)
' sico_init: gi_time_min, gi_time_stp, gi_time_max'
1237 write(6, fmt=*)
' not defined in glacial-index file!'
1241 ndata_gi = (gi_time_max-gi_time_min)/gi_time_stp
1243 allocate(glacial_index(0:ndata_gi))
1246 read(21, fmt=*) d_dummy, glacial_index(n)
1249 close(21, status=
'keep')
1256 #if ( (TSURFACE==6) && (ACCSURFACE==6) )
1258 filename_with_path = trim(inpath)//
'/'//trim(ch_domain_short)// &
1259 '/'//trim(temp_precip_anom_file)
1261 call
check( nf90_open(trim(filename_with_path), nf90_nowrite, &
1262 ncid_temp_precip), thisroutine )
1264 call
check( nf90_inquire(ncid_temp_precip, unlimiteddimid = dimid), &
1267 call
check( nf90_inquire_dimension(ncid_temp_precip, dimid, &
1268 len = ndata_temp_precip), thisroutine )
1270 ndata_temp_precip = ndata_temp_precip-1
1272 allocate(temp_precip_time(0:ndata_temp_precip))
1274 call
check( nf90_inq_varid(ncid_temp_precip,
'time', ncv), thisroutine )
1275 call
check( nf90_get_var(ncid_temp_precip, ncv, temp_precip_time), thisroutine )
1278 temp_precip_time_min = temp_precip_time(0)
1279 temp_precip_time_stp = temp_precip_time(1)-temp_precip_time(0)
1281 temp_precip_time_max = temp_precip_time(ndata_temp_precip)
1289 open(21, iostat=ios, &
1290 file=inpath//
'/general/'//sea_level_file, &
1293 stop
' sico_init: Error when opening the data file for z_sl!'
1295 read(21, fmt=*) ch_dummy, specmap_time_min, specmap_time_stp, specmap_time_max
1297 if (ch_dummy /=
'#')
then
1298 write(6, fmt=*)
' sico_init: specmap_time_min, specmap_time_stp, specmap_time_max'
1299 write(6, fmt=*)
' not defined in data file for z_sl!'
1303 ndata_specmap = (specmap_time_max-specmap_time_min)/specmap_time_stp
1305 allocate(specmap_zsl(0:ndata_specmap))
1307 do n=0, ndata_specmap
1308 read(21, fmt=*) d_dummy, specmap_zsl(n)
1311 close(21, status=
'keep')
1323 q_geo(j,i) = q_geo *1.0e-03_dp
1331 open(21, iostat=ios, &
1332 file=inpath//
'/'//trim(ch_domain_short)//
'/'//q_geo_file, &
1333 recl=8192, status=
'old')
1335 if (ios /= 0) stop
' sico_init: Error when opening the qgeo file!'
1337 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
1340 read(21, fmt=*) (q_geo(j,i), i=0,imax)
1343 close(21, status=
'keep')
1347 q_geo(j,i) = q_geo(j,i) *1.0e-03_dp
1355 #if (REBOUND==0 || REBOUND==1)
1357 kei = 0.0_dp; n_data_kei = 0; kei_r_max = 0.0_dp; kei_r_incr = 0.0_dp
1368 #if (REBOUND==1 || REBOUND==2)
1370 #if (TIME_LAG_MOD==1)
1372 time_lag_asth = time_lag*year_sec
1374 #elif (TIME_LAG_MOD==2)
1376 open(29, iostat=ios, &
1377 file=inpath//
'/'//trim(ch_domain_short)//
'/'//time_lag_file, &
1378 recl=8192, status=
'old')
1380 if (ios /= 0) stop
' sico_init: Error when opening the time-lag file!'
1382 do n=1, 6;
read(29, fmt=
'(a)') ch_dummy;
end do
1385 read(29, fmt=*) (time_lag_asth(j,i), i=0,imax)
1388 close(29, status=
'keep')
1390 time_lag_asth = time_lag_asth*year_sec
1396 time_lag_asth = 0.0_dp
1404 #if (FLEX_RIG_MOD==1)
1406 flex_rig_lith = flex_rig
1408 #elif (FLEX_RIG_MOD==2)
1410 open(29, iostat=ios, &
1411 file=inpath//
'/'//trim(ch_domain_short)//
'/'//flex_rig_file, &
1412 recl=8192, status=
'old')
1414 if (ios /= 0) stop
' sico_init: Error when opening the flex-rig file!'
1416 do n=1, 6;
read(29, fmt=
'(a)') ch_dummy;
end do
1419 read(29, fmt=*) (flex_rig_lith(j,i), i=0,imax)
1422 close(29, status=
'keep')
1426 #elif (REBOUND==0 || REBOUND==1)
1428 flex_rig_lith = 0.0_dp
1442 call
boundary(time_init, dtime, dxi, deta, &
1443 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1464 call
boundary(time_init, dtime, dxi, deta, &
1465 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1487 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
1490 call
boundary(time_init, dtime, dxi, deta, &
1491 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1493 q_b_tot = q_bm + q_tld
1499 flag_grounding_line_1 = .false.
1500 flag_grounding_line_2 = .false.
1502 flag_calving_front_1 = .false.
1503 flag_calving_front_2 = .false.
1505 #if (MARGIN==1 || MARGIN==2)
1514 if ( (maske(j,i)==0_i2b) &
1516 ( (maske(j,i+1)==3_i2b) &
1517 .or.(maske(j,i-1)==3_i2b) &
1518 .or.(maske(j+1,i)==3_i2b) &
1519 .or.(maske(j-1,i)==3_i2b) ) &
1521 flag_grounding_line_1(j,i) = .true.
1523 if ( (maske(j,i)==3_i2b) &
1525 ( (maske(j,i+1)==0_i2b) &
1526 .or.(maske(j,i-1)==0_i2b) &
1527 .or.(maske(j+1,i)==0_i2b) &
1528 .or.(maske(j-1,i)==0_i2b) ) &
1530 flag_grounding_line_2(j,i) = .true.
1532 if ( (maske(j,i)==3_i2b) &
1534 ( (maske(j,i+1)==2_i2b) &
1535 .or.(maske(j,i-1)==2_i2b) &
1536 .or.(maske(j+1,i)==2_i2b) &
1537 .or.(maske(j-1,i)==2_i2b) ) &
1539 flag_calving_front_1(j,i) = .true.
1541 if ( (maske(j,i)==2_i2b) &
1543 ( (maske(j,i+1)==3_i2b) &
1544 .or.(maske(j,i-1)==3_i2b) &
1545 .or.(maske(j+1,i)==3_i2b) &
1546 .or.(maske(j-1,i)==3_i2b) ) &
1548 flag_calving_front_2(j,i) = .true.
1556 if ( (maske(j,i)==2_i2b) &
1557 .and. (maske(j+1,i)==3_i2b) &
1559 flag_calving_front_2(j,i) = .true.
1562 if ( (maske(j,i)==2_i2b) &
1563 .and. (maske(j-1,i)==3_i2b) &
1565 flag_calving_front_2(j,i) = .true.
1572 if ( (maske(j,i)==2_i2b) &
1573 .and. (maske(j,i+1)==3_i2b) &
1575 flag_calving_front_2(j,i) = .true.
1578 if ( (maske(j,i)==2_i2b) &
1579 .and. (maske(j,i-1)==3_i2b) &
1581 flag_calving_front_2(j,i) = .true.
1586 stop
' sico_init: MARGIN must be either 1, 2 or 3!'
1591 #if ( defined(SEDI_SLIDE) && SEDI_SLIDE==2 && defined(TRANS_LENGTH_SL) )
1595 if (maske_sedi(j,i) /= 7)
then
1596 r_mask_sedi(j,i) = 0.0_dp
1598 r_mask_sedi(j,i) = 1.0_dp
1603 if (trans_length_sl > eps)
then
1605 if ((p_weert /= p_weert_sedi).or.(q_weert /= q_weert_sedi))
then
1606 write(6, fmt=
'(a)')
' sico_init: Specifying a transition length'
1607 write(6, fmt=
'(a)')
' TRANS_LENGTH_SL > 0 for the basal sliding'
1608 write(6, fmt=
'(a)')
' regimes requires P_WEERT==P_WEERT_SEDI'
1609 write(6, fmt=
'(a)')
' and Q_WEERT==Q_WEERT_SEDI!'
1613 transition_length_sliding = trans_length_sl *1.0e+03_dp
1615 quasi_time = 0.25_dp*transition_length_sliding**2
1618 d_quasi_time = 0.1_dp*quasi_time
1622 if ( d_quasi_time < 0.1_dp*min(dxi,deta)**2 )
exit
1624 d_quasi_time = 0.5_dp*d_quasi_time
1627 m = nint(quasi_time/d_quasi_time)
1631 r_mask_sedi_new = r_mask_sedi
1635 r_mask_sedi_new(j,i) = r_mask_sedi(j,i) &
1636 + d_quasi_time/dxi**2 &
1637 * (r_mask_sedi(j,i+1)-2.0_dp*r_mask_sedi(j,i)+r_mask_sedi(j,i-1)) &
1638 + d_quasi_time/deta**2 &
1639 * (r_mask_sedi(j+1,i)-2.0_dp*r_mask_sedi(j,i)+r_mask_sedi(j-1,i))
1644 r_mask_sedi = r_mask_sedi_new
1654 #if (GRID==0 || GRID==1)
1658 dist_dxdy(jr,ir) = sqrt( (
real(ir,dp)*dxi)**2 + (
real(jr,dp)*deta)**2 )
1669 #if (DYNAMICS==1 || DYNAMICS==2)
1674 #if (MARGIN==3 || DYNAMICS==2)
1675 call
calc_vxy_ssa(z_sl, dxi, deta, dzeta_c, dzeta_t, ii, jj, nn)
1690 stop
' sico_init: DYNAMICS must be either 0, 1 or 2!'
1693 call
calc_dxyz(dxi, deta, dzeta_c, dzeta_t)
1697 #if (CALCMOD==0 || CALCMOD==-1)
1707 enth_t(kt,j,i) = enth_c(0,j,i)
1722 if ( (maske(j,i) == 0_i2b).and.(n_cts(j,i) == 1_i2b) )
then
1728 enth_t(kt,j,i) = enth_c(0,j,i)
1735 #elif (CALCMOD==2 || CALCMOD==3)
1745 enth_t(kt,j,i) = enth_c(0,j,i)
1753 stop
' sico_init: Parameter CALCMOD must be either -1, 0, 1, 2 or 3!'
1761 open(12, iostat=ios, &
1762 file=outpath//
'/'//trim(runname)//
'.ser', &
1765 stop
' sico_init: Error when opening the ser file!'
1767 if (forcing_flag == 1)
then
1772 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
1774 1102
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
1775 ' H_max(m) zs_max(m) V_g(m^3)', &
1776 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
1777 ' A_g(m^2) A_t(m^2) V_bm(m^3/a)', &
1778 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
1779 1103
format(
'----------------------------------------------------', &
1780 '---------------------------------------')
1784 1102
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
1785 ' V(m^3) V_g(m^3) V_f(m^3)', &
1786 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
1787 ' H_max(m) zs_max(m)', &
1788 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
1789 ' A_t(m^2) V_bm(m^3/a)', &
1790 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
1791 1103
format(
'----------------------------------------------------', &
1792 '---------------------------------------')
1795 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
1798 else if (forcing_flag == 2)
then
1803 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
1805 1112
format(
' t(a) glac_ind(1) z_sl(m)',/, &
1806 ' H_max(m) zs_max(m) V_g(m^3)', &
1807 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
1808 ' A_g(m^2) A_t(m^2) V_bm(m^3/a)', &
1809 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
1810 1113
format(
'----------------------------------------------------', &
1811 '---------------------------------------')
1815 1112
format(
' t(a) glac_ind(1) z_sl(m)',/, &
1816 ' V(m^3) V_g(m^3) V_f(m^3)', &
1817 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
1818 ' H_max(m) zs_max(m)', &
1819 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
1820 ' A_t(m^2) V_bm(m^3/a)', &
1821 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
1822 1113
format(
'----------------------------------------------------', &
1823 '---------------------------------------')
1826 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
1829 else if (forcing_flag == 3)
then
1834 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
1836 1122
format(
' t(a) (Dummy)(1) z_sl(m)',/, &
1837 ' H_max(m) zs_max(m) V_g(m^3)', &
1838 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
1839 ' A_g(m^2) A_t(m^2) V_bm(m^3/a)', &
1840 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
1841 1123
format(
'----------------------------------------------------', &
1842 '---------------------------------------')
1846 1122
format(
' t(a) (Dummy)(1) z_sl(m)',/, &
1847 ' V(m^3) V_g(m^3) V_f(m^3)', &
1848 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
1849 ' H_max(m) zs_max(m)', &
1850 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
1851 ' A_t(m^2) V_bm(m^3/a)', &
1852 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
1853 1123
format(
'----------------------------------------------------', &
1854 '---------------------------------------')
1857 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
1866 open(13, iostat=ios, &
1867 file=outpath//
'/'//trim(runname)//
'.thk', &
1869 if (ios /= 0) stop
' sico_init: Error when opening the thk file!'
1871 if (forcing_flag == 1)
then
1876 1104
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
1877 ' H(m): JMAX+1 records [j = JMAX (-1) 0] with',/, &
1878 ' IMAX+1 values [i = 0 (1) IMAX] in each record')
1879 1105
format(
'----------------------------------------------------')
1881 else if (forcing_flag == 2)
then
1886 1114
format(
' t(a) glac_ind(1) z_sl(m)',/, &
1887 ' H(m): JMAX+1 records [j = JMAX (-1) 0] with',/, &
1888 ' IMAX+1 values [i = 0 (1) IMAX] in each record')
1889 1115
format(
'----------------------------------------------------')
1891 else if (forcing_flag == 3)
then
1896 1124
format(
' t(a) (Dummy)(1) z_sl(m)',/, &
1897 ' H(m): JMAX+1 records [j = JMAX (-1) 0] with',/, &
1898 ' IMAX+1 values [i = 0 (1) IMAX] in each record')
1899 1125
format(
'----------------------------------------------------')
1911 allocate(lambda_core(n_core), phi_core(n_core), &
1912 x_core(n_core), y_core(n_core))
1914 phi_core(1) = -78.467_dp *pi_180
1915 lambda_core(1) = 106.8_dp *pi_180
1916 call
num_coord(lambda_core(1), phi_core(1), x_core(1), y_core(1))
1918 phi_core(2) = -80.367_dp *pi_180
1919 lambda_core(2) = 77.35_dp *pi_180
1920 call
num_coord(lambda_core(2), phi_core(2), x_core(2), y_core(2))
1922 phi_core(3) = -75.1_dp *pi_180
1923 lambda_core(3) = 123.4_dp *pi_180
1924 call
num_coord(lambda_core(3), phi_core(3), x_core(3), y_core(3))
1926 phi_core(4) = -77.317_dp *pi_180
1927 lambda_core(4) = 39.7_dp *pi_180
1928 call
num_coord(lambda_core(4), phi_core(4), x_core(4), y_core(4))
1930 phi_core(5) = -75.0_dp *pi_180
1931 lambda_core(5) = 0.067_dp *pi_180
1932 call
num_coord(lambda_core(5), phi_core(5), x_core(5), y_core(5))
1934 phi_core(6) = -80.017_dp *pi_180
1935 lambda_core(6) = -119.517_dp *pi_180
1936 call
num_coord(lambda_core(6), phi_core(6), x_core(6), y_core(6))
1938 open(14, iostat=ios, &
1939 file=outpath//
'/'//trim(runname)//
'.core', &
1941 if (ios /= 0) stop
' sico_init: Error when opening the core file!'
1943 if (forcing_flag == 1)
then
1948 1106
format(
' t(a) D_Ts(C) z_sl(m)',/, &
1949 ' H_Vo(m) H_DA(m) H_DC(m)', &
1950 ' H_DF(m) H_Ko(m) H_By(m)',/, &
1951 ' v_Vo(m/a) v_DA(m/a) v_DC(m/a)', &
1952 ' v_DF(m/a) v_Ko(m/a) v_By(m/a)',/, &
1953 ' T_Vo(C) T_DA(C) T_DC(C)', &
1954 ' T_DF(C) T_Ko(C) T_By(C)',/, &
1955 ' Rb_Vo(W/m2) Rb_DA(W/m2) Rb_DC(W/m2)', &
1956 ' Rb_DF(W/m2) Rb_Ko(W/m2) Rb_By(W/m2)')
1957 1107
format(
'----------------------------------------------------', &
1958 '---------------------------------------')
1960 else if (forcing_flag == 2)
then
1965 1116
format(
' t(a) glac_ind(1) z_sl(m)',/, &
1966 ' H_Vo(m) H_DA(m) H_DC(m)', &
1967 ' H_DF(m) H_Ko(m) H_By(m)',/, &
1968 ' v_Vo(m/a) v_DA(m/a) v_DC(m/a)', &
1969 ' v_DF(m/a) v_Ko(m/a) v_By(m/a)',/, &
1970 ' T_Vo(C) T_DA(C) T_DC(C)', &
1971 ' T_DF(C) T_Ko(C) T_By(C)',/, &
1972 ' Rb_Vo(W/m2) Rb_DA(W/m2) Rb_DC(W/m2)', &
1973 ' Rb_DF(W/m2) Rb_Ko(W/m2) Rb_By(W/m2)')
1974 1117
format(
'----------------------------------------------------', &
1975 '---------------------------------------')
1977 else if (forcing_flag == 3)
then
1982 1126
format(
' t(a) (Dummy)(1) z_sl(m)',/, &
1983 ' H_Vo(m) H_DA(m) H_DC(m)', &
1984 ' H_DF(m) H_Ko(m) H_By(m)',/, &
1985 ' v_Vo(m/a) v_DA(m/a) v_DC(m/a)', &
1986 ' v_DF(m/a) v_Ko(m/a) v_By(m/a)',/, &
1987 ' T_Vo(C) T_DA(C) T_DC(C)', &
1988 ' T_DF(C) T_Ko(C) T_By(C)',/, &
1989 ' Rb_Vo(W/m2) Rb_DA(W/m2) Rb_DC(W/m2)', &
1990 ' Rb_DF(W/m2) Rb_Ko(W/m2) Rb_By(W/m2)')
1991 1127
format(
'----------------------------------------------------', &
1992 '---------------------------------------')
2003 flag_3d_output = .false.
2005 flag_3d_output = .true.
2007 stop
' sico_init: ERGDAT must be either 0 or 1!'
2011 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
2012 flag_3d_output, ndat2d, ndat3d)
2014 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
2015 flag_3d_output, ndat2d, ndat3d)
2017 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
2022 if (time_output(1) <= time_init+eps)
then
2025 flag_3d_output = .false.
2027 flag_3d_output = .true.
2029 stop
' sico_init: ERGDAT must be either 0 or 1!'
2033 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
2034 flag_3d_output, ndat2d, ndat3d)
2036 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
2037 flag_3d_output, ndat2d, ndat3d)
2039 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
2046 flag_3d_output = .false.
2049 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
2050 flag_3d_output, ndat2d, ndat3d)
2052 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
2053 flag_3d_output, ndat2d, ndat3d)
2055 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
2058 if (time_output(1) <= time_init+eps)
then
2060 flag_3d_output = .true.
2063 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
2064 flag_3d_output, ndat2d, ndat3d)
2066 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
2067 flag_3d_output, ndat2d, ndat3d)
2069 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
2075 stop
' sico_init: OUTPUT must be either 1, 2 or 3!'
2078 call
output2(time_init, dxi, deta, delta_ts, glac_index, z_sl)
2080 call
output3(time_init, delta_ts, glac_index, z_sl)
2083 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 topography1(dxi, deta)
Definition of the initial surface and bedrock topography (including gradients) and of the horizontal ...
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 num_coord(lambda_val, phi_val, x_val, y_val)
Computation of position (x,y) in the numerical domain for longitude lambda and latitude phi (in rad)...
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 ...
subroutine check(status, ch_calling_routine)
NetCDF error capturing.
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 read_kei()
Reading of the tabulated kei function.
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.
subroutine read_target_topo_nc(target_topo_dat_name)
Reading of the target-topography file (in NetCDF 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.