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 character(len=100) :: anfdatname, target_topo_dat_name
81 character(len=256) :: filename_with_path
82 character(len=256) :: shell_command
84 logical :: flag_3d_output
93 character(len=64),
parameter :: thisroutine =
'sico_init'
95 character(len=64),
parameter :: fmt1 =
'(a)', &
99 character(len= 8) :: ch_imax
100 character(len=128) :: fmt4
102 write(ch_imax, fmt=
'(i8)') imax
103 write(fmt4, fmt=
'(a)')
'('//trim(adjustl(ch_imax))//
'(i1),i1)'
108 ch_domain_long =
'Antarctica'
109 ch_domain_short =
'ant'
112 ch_domain_long =
'Austfonna'
113 ch_domain_short =
'asf'
115 #elif defined(EMTP2SGE)
116 ch_domain_long =
'EISMINT Phase 2 Simplified Geometry Experiment'
117 ch_domain_short =
'emtp2sge'
120 ch_domain_long =
'Greenland'
121 ch_domain_short =
'grl'
124 ch_domain_long =
'Northern hemisphere'
125 ch_domain_short =
'nhem'
128 ch_domain_long =
'Scandinavia and Eurasia'
129 ch_domain_short =
'scand'
132 ch_domain_long =
'Tibet'
133 ch_domain_short =
'tibet'
136 ch_domain_long =
'North polar cap of Mars'
137 ch_domain_short =
'nmars'
140 ch_domain_long =
'South polar cap of Mars'
141 ch_domain_short =
'smars'
144 ch_domain_long =
'XYZ'
145 ch_domain_short =
'xyz'
147 ch_domain_long = trim(ch_domain_long)//
'/ISMIP HEINO'
151 stop
' sico_init: No valid domain specified!'
172 #if (CALCZS==4 || MARGIN==3 || DYNAMICS==2)
175 call lis_initialize(ierr)
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!'
214 #if (GRID==0 || GRID==1)
216 if (abs(dx-20.0_dp) < eps)
then
218 if ( (imax /= 75).or.(jmax /= 140) )
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 /= 280) )
then
225 stop
' sico_init: IMAX and/or JMAX wrong!'
228 else if (abs(dx-5.0_dp) < eps)
then
230 if ( (imax /= 300).or.(jmax /= 560) )
then
231 stop
' sico_init: IMAX and/or JMAX wrong!'
235 stop
' sico_init: DX wrong!'
240 stop
' sico_init: GRID==2 not allowed for this application!'
248 #if (CALCMOD==0 || CALCMOD==2 || CALCMOD==3 || CALCMOD==-1)
251 write(6, fmt=
'(a)')
' sico_init: For options CALCMOD==0, 2, 3 or -1,'
252 write(6, fmt=
'(a)')
' the separate kt domain is redundant.'
253 write(6, fmt=
'(a)')
' Therefore, consider setting KTMAX to 1.'
254 write(6, fmt=
'(a)')
' '
262 #if ((TSURFACE == 5) && (ACCSURFACE != 5))
263 stop
' sico_init: Options TSURFACE==5 and ACCSURFACE==5 must be used together!'
266 #if ((TSURFACE != 5) && (ACCSURFACE == 5))
267 stop
' sico_init: Options TSURFACE==5 and ACCSURFACE==5 must be used together!'
271 #if (ACCSURFACE != 6)
272 write(6, fmt=
'(a)')
' sico_init: Options TSURFACE==6, ACCSURFACE==6'
273 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!'
276 write(6, fmt=
'(a)')
' sico_init: Options TSURFACE==6, ACCSURFACE==6'
277 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!'
282 #if (ACCSURFACE == 6)
284 write(6, fmt=
'(a)')
' sico_init: Options TSURFACE==6, ACCSURFACE==6'
285 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!'
288 write(6, fmt=
'(a)')
' sico_init: Options TSURFACE==6, ACCSURFACE==6'
289 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!'
298 stop
' sico_init: Option ADV_HOR==1 (central differences) not defined!'
306 #if ((MARGIN==3 && DYNAMICS==1) || DYNAMICS==2) /* requires SSA or SStA */
308 write(6, fmt=
'(a)')
' sico_init: Distortion correction not implemented'
309 write(6, fmt=
'(a)')
' for the shallow shelf approximation (SSA)'
310 write(6, fmt=
'(a)')
' or the shelfy stream approximation (SStA)'
311 write(6, fmt=
'(a)')
' -> GRID==0 required!'
322 #elif (TSURFACE == 5)
326 #elif (TSURFACE == 6)
336 dtime_temp0 = dtime_temp0
338 dtime_wss0 = dtime_wss0
343 dzeta_c = 1.0_dp/
real(kcmax,dp)
344 dzeta_t = 1.0_dp/
real(ktmax,dp)
345 dzeta_r = 1.0_dp/
real(krmax,dp)
354 if (deform >= eps)
then
356 flag_aa_nonzero = .true.
364 eaz_c_quotient(kc) = 0.0_dp
367 zeta_c(kc) = kc*dzeta_c
368 eaz_c(kc) = exp(aa*zeta_c(kc))
369 eaz_c_quotient(kc) = (eaz_c(kc)-1.0_dp)/(ea-1.0_dp)
375 eaz_c_quotient(kc) = 1.0_dp
379 flag_aa_nonzero = .false.
387 eaz_c_quotient(kc) = 0.0_dp
390 zeta_c(kc) = kc*dzeta_c
392 eaz_c_quotient(kc) = zeta_c(kc)
398 eaz_c_quotient(kc) = 1.0_dp
408 zeta_t(kt) = kt*dzeta_t
420 zeta_r(kr) = kr*dzeta_r
434 if ((i <= imax).and.(j <= jmax))
then
446 anfdatname = anfdatname
448 #if defined(YEAR_ZERO)
449 year_zero = year_zero
451 year_zero = 2000.0_dp
454 time_init0 = time_init0
455 time_end0 = time_end0
456 dtime_ser0 = dtime_ser0
458 #if ( OUTPUT==1 || OUTPUT==3 )
459 dtime_out0 = dtime_out0
462 #if ( OUTPUT==2 || OUTPUT==3 )
464 time_output0( 1) = time_out0_01
465 time_output0( 2) = time_out0_02
466 time_output0( 3) = time_out0_03
467 time_output0( 4) = time_out0_04
468 time_output0( 5) = time_out0_05
469 time_output0( 6) = time_out0_06
470 time_output0( 7) = time_out0_07
471 time_output0( 8) = time_out0_08
472 time_output0( 9) = time_out0_09
473 time_output0(10) = time_out0_10
474 time_output0(11) = time_out0_11
475 time_output0(12) = time_out0_12
476 time_output0(13) = time_out0_13
477 time_output0(14) = time_out0_14
478 time_output0(15) = time_out0_15
479 time_output0(16) = time_out0_16
480 time_output0(17) = time_out0_17
481 time_output0(18) = time_out0_18
482 time_output0(19) = time_out0_19
483 time_output0(20) = time_out0_20
488 shell_command =
'if [ ! -d'
489 shell_command = trim(shell_command)//
' '//outpath
490 shell_command = trim(shell_command)//
' '//
'] ; then mkdir'
491 shell_command = trim(shell_command)//
' '//outpath
492 shell_command = trim(shell_command)//
' '//
'; fi'
493 call system(trim(shell_command))
496 open(10, iostat=ios, &
497 file=outpath//
'/'//trim(runname)//
'.log', &
500 stop
' sico_init: Error when opening the log file!'
502 write(10, fmt=trim(fmt1))
'Computational domain:'
503 write(10, fmt=trim(fmt1)) trim(ch_domain_long)
504 write(10, fmt=trim(fmt1))
' '
506 write(10, fmt=trim(fmt2))
'imax =', imax
507 write(10, fmt=trim(fmt2))
'jmax =', jmax
508 write(10, fmt=trim(fmt2))
'kcmax =', kcmax
509 write(10, fmt=trim(fmt2))
'ktmax =', ktmax
510 write(10, fmt=trim(fmt2))
'krmax =', krmax
511 write(10, fmt=trim(fmt1))
' '
513 write(10, fmt=trim(fmt3))
'a =', aa
514 write(10, fmt=trim(fmt1))
' '
516 #if (GRID==0 || GRID==1)
517 write(10, fmt=trim(fmt3))
'x0 =', x0
518 write(10, fmt=trim(fmt3))
'y0 =', y0
519 write(10, fmt=trim(fmt3))
'dx =', dx
521 stop
' sico_init: GRID==2 not allowed for this application!'
523 write(10, fmt=trim(fmt1))
' '
525 write(10, fmt=trim(fmt3))
'year_zero =', year_zero
526 write(10, fmt=trim(fmt3))
'time_init =', time_init0
527 write(10, fmt=trim(fmt3))
'time_end =', time_end0
528 write(10, fmt=trim(fmt3))
'dtime =', dtime0
529 write(10, fmt=trim(fmt3))
'dtime_temp =', dtime_temp0
531 write(10, fmt=trim(fmt3))
'dtime_wss =', dtime_wss0
533 #if ( OUTPUT==1 || OUTPUT==3 )
534 write(10, fmt=trim(fmt3))
'dtime_out =', dtime_out0
536 write(10, fmt=trim(fmt3))
'dtime_ser =', dtime_ser0
537 write(10, fmt=trim(fmt1))
' '
539 write(10, fmt=trim(fmt2))
'ANF_DAT =', anf_dat
540 write(10, fmt=trim(fmt1))
'zs_present file = '//zs_present_file
542 write(10, fmt=trim(fmt1))
'zl_present file = '//zl_present_file
544 write(10, fmt=trim(fmt1))
'zl0 file = '//zl0_file
545 write(10, fmt=trim(fmt1))
'mask_present file = '//mask_present_file
546 #if (ANF_DAT==1 && defined(TEMP_INIT))
547 write(10, fmt=trim(fmt2))
'TEMP_INIT =', temp_init
550 write(10, fmt=trim(fmt1))
'Initial-value file = '//anfdatname
551 write(10, fmt=trim(fmt1))
'Path to initial-value file = '//anfdatpath
553 write(10, fmt=trim(fmt1))
' '
556 write(10, fmt=trim(fmt3))
'time_target_topo_init =', time_target_topo_init0
557 write(10, fmt=trim(fmt3))
'time_target_topo_final =', time_target_topo_final0
558 write(10, fmt=trim(fmt1))
'Target-topography file = '//target_topo_dat_name
559 write(10, fmt=trim(fmt1))
'Path to target-topography file = '//target_topo_dat_path
560 write(10, fmt=trim(fmt1))
' '
564 write(10, fmt=trim(fmt1))
'Maximum ice extent mask file = '//mask_maxextent_file
565 write(10, fmt=trim(fmt1))
' '
568 write(10, fmt=trim(fmt1))
'Physical-parameter file = '//phys_para_file
569 write(10, fmt=trim(fmt1))
' '
571 #if (CALCZS==3 || CALCZS==4)
572 write(10, fmt=trim(fmt3))
'ovi_weight =', ovi_weight
574 write(10, fmt=trim(fmt3))
'omega_sor =', omega_sor
576 write(10, fmt=trim(fmt1))
' '
580 write(10, fmt=trim(fmt3))
'delta_ts0 =', delta_ts0
582 write(10, fmt=trim(fmt3))
'sine_amplit =', sine_amplit
583 write(10, fmt=trim(fmt3))
'sine_period =', sine_period
585 write(10, fmt=trim(fmt1))
'GRIP file = '//grip_temp_file
586 write(10, fmt=trim(fmt3))
'grip_temp_fact =', grip_temp_fact
588 write(10, fmt=trim(fmt1))
'Glacial-index file = '//glac_ind_file
589 write(10, fmt=trim(fmt1))
'temp_ma_anom file = '//temp_ma_anom_file
590 write(10, fmt=trim(fmt3))
'temp_ma_anom fact = ', temp_ma_anom_fact
591 write(10, fmt=trim(fmt1))
'temp_mj_anom file = '//temp_mj_anom_file
592 write(10, fmt=trim(fmt3))
'temp_mj_anom fact = ', temp_mj_anom_fact
594 write(10, fmt=trim(fmt1))
'temp_precip_anom file = '//temp_precip_anom_file
595 write(10, fmt=trim(fmt3))
'temp_ma_anom fact = ', temp_ma_anom_fact
596 write(10, fmt=trim(fmt3))
'temp_mj_anom fact = ', temp_mj_anom_fact
599 write(10, fmt=trim(fmt1))
'precip_present_file = '//precip_present_file
600 #if (defined(PRECIP_FACTOR_FILE))
601 if ( trim(adjustl(precip_factor_file)) /=
'none' ) &
602 write(10, fmt=trim(fmt1))
'precip_factor_file = '//precip_factor_file
605 write(10, fmt=trim(fmt3))
'accfact =', accfact
606 #elif (ACCSURFACE==2 || ACCSURFACE==3)
607 write(10, fmt=trim(fmt3))
'gamma_s =', gamma_s
608 #elif (ACCSURFACE==5)
609 write(10, fmt=trim(fmt1))
'precip_anom file = '//precip_anom_file
610 write(10, fmt=trim(fmt3))
'precip_anom fact = ', precip_anom_fact
611 #elif (ACCSURFACE==6)
612 write(10, fmt=trim(fmt1))
'temp_precip_anom file = '//temp_precip_anom_file
613 write(10, fmt=trim(fmt3))
'precip_anom fact = ', precip_anom_fact
615 #if (ACCSURFACE <= 3)
616 write(10, fmt=trim(fmt2))
'ELEV_DESERT =', elev_desert
617 #if (ELEV_DESERT == 1)
618 write(10, fmt=trim(fmt3))
'gamma_p =', gamma_p
619 write(10, fmt=trim(fmt3))
'zs_thresh =', zs_thresh
624 write(10, fmt=trim(fmt3))
'lambda_lti =', lambda_lti
625 write(10, fmt=trim(fmt3))
'temp_lti =', temp_lti
629 write(10, fmt=trim(fmt3))
'z_sl0 =', z_sl0
631 write(10, fmt=trim(fmt1))
'sea-level file = '//sea_level_file
633 write(10, fmt=trim(fmt1))
' '
636 #if ( MARINE_ICE_CALVING==2 || MARINE_ICE_CALVING==3 )
637 write(10, fmt=trim(fmt3))
'z_mar =', z_mar
638 write(10, fmt=trim(fmt1))
' '
639 #elif ( MARINE_ICE_CALVING==4 || MARINE_ICE_CALVING==5 \
640 || marine_ice_calving==6 || marine_ice_calving==7 )
641 write(10, fmt=trim(fmt3))
'fact_z_mar =', fact_z_mar
642 write(10, fmt=trim(fmt1))
' '
643 #elif ( ( MARINE_ICE_FORMATION==2 ) && ( MARINE_ICE_CALVING==9 ) )
644 write(10, fmt=trim(fmt3))
'calv_uw_coeff =', calv_uw_coeff
645 write(10, fmt=trim(fmt3))
'r1_calv_uw =', r1_calv_uw
646 write(10, fmt=trim(fmt3))
'r2_calv_uw =', r2_calv_uw
647 write(10, fmt=trim(fmt1))
' '
650 #if ICE_SHELF_CALVING==2
651 write(10, fmt=trim(fmt3))
'H_calv =', h_calv
652 write(10, fmt=trim(fmt1))
' '
656 write(10, fmt=trim(fmt3))
'c_slide =', c_slide
657 write(10, fmt=trim(fmt3))
'smw_coeff =', smw_coeff
658 write(10, fmt=trim(fmt2))
'r_smw =', r_smw
659 write(10, fmt=trim(fmt2))
's_smw =', s_smw
660 write(10, fmt=trim(fmt3))
'gamma_slide =', gamma_slide
661 write(10, fmt=trim(fmt2))
'p_weert =', p_weert
662 write(10, fmt=trim(fmt2))
'q_weert =', q_weert
664 write(10, fmt=trim(fmt3))
'red_pres_limit_fact =', red_pres_limit_fact
666 write(10, fmt=trim(fmt1))
' '
669 write(10, fmt=trim(fmt1))
'Sediment-mask file = '//mask_sedi_file
670 write(10, fmt=trim(fmt1))
' '
672 write(10, fmt=trim(fmt3))
'c_slide_sedi =', c_slide_sedi
673 write(10, fmt=trim(fmt3))
'smw_coeff_sedi =', smw_coeff_sedi
674 write(10, fmt=trim(fmt2))
'r_smw_sedi =', r_smw_sedi
675 write(10, fmt=trim(fmt2))
's_smw_sedi =', s_smw_sedi
676 write(10, fmt=trim(fmt3))
'gamma_slide_sedi =', gamma_slide_sedi
677 write(10, fmt=trim(fmt2))
'p_weert_sedi =', p_weert_sedi
678 write(10, fmt=trim(fmt2))
'q_weert_sedi =', q_weert_sedi
679 write(10, fmt=trim(fmt1))
' '
683 write(10, fmt=trim(fmt3))
'q_geo =', q_geo
685 write(10, fmt=trim(fmt1))
'q_geo file = '//q_geo_file
687 write(10, fmt=trim(fmt1))
' '
689 #if (defined(MARINE_ICE_BASAL_MELTING))
690 write(10, fmt=trim(fmt2))
'MARINE_ICE_BASAL_MELTING =', marine_ice_basal_melting
691 #if (MARINE_ICE_BASAL_MELTING==2 || MARINE_ICE_BASAL_MELTING==3)
692 write(10, fmt=trim(fmt3))
'qbm_marine =', qbm_marine
694 write(10, fmt=trim(fmt1))
' '
697 write(10, fmt=trim(fmt2))
'REBOUND =', rebound
699 write(10, fmt=trim(fmt3))
'frac_llra =', frac_llra
701 #if (REBOUND==1 || REBOUND==2)
702 write(10, fmt=trim(fmt2))
'TIME_LAG_MOD =', time_lag_mod
703 #if (TIME_LAG_MOD==1)
704 write(10, fmt=trim(fmt3))
'time_lag =', time_lag
705 #elif (TIME_LAG_MOD==2)
706 write(10, fmt=trim(fmt1))
'time_lag_file = '//time_lag_file
708 stop
' sico_init: TIME_LAG_MOD must be either 1 or 2!'
712 write(10, fmt=trim(fmt2))
'FLEX_RIG_MOD =', flex_rig_mod
713 #if (FLEX_RIG_MOD==1)
714 write(10, fmt=trim(fmt3))
'flex_rig =', flex_rig
715 #elif (FLEX_RIG_MOD==2)
716 write(10, fmt=trim(fmt1))
'flex_rig_file = '//flex_rig_file
718 stop
' sico_init: FLEX_RIG_MOD must be either 1 or 2!'
721 write(10, fmt=trim(fmt2))
'Q_LITHO =', q_litho
722 write(10, fmt=trim(fmt1))
' '
725 write(10, fmt=trim(fmt3))
'gr_size =', gr_size
726 write(10, fmt=trim(fmt1))
' '
729 write(10, fmt=trim(fmt3))
'sigma_res =', sigma_res
730 write(10, fmt=trim(fmt1))
' '
733 write(10, fmt=trim(fmt2))
'ENHMOD =', enhmod
734 #if (ENHMOD==1 || ENHMOD==2 || ENHMOD==3)
735 write(10, fmt=trim(fmt3))
'enh_fact =', enh_fact
737 #if (ENHMOD==2 || ENHMOD==3)
738 write(10, fmt=trim(fmt3))
'enh_intg =', enh_intg
741 write(10, fmt=trim(fmt3))
'age_trans =', age_trans_0
744 write(10, fmt=trim(fmt3))
'date_trans1 =', date_trans1_0
745 write(10, fmt=trim(fmt3))
'date_trans2 =', date_trans2_0
746 write(10, fmt=trim(fmt3))
'date_trans3 =', date_trans3_0
748 #if (ENHMOD==4 || ENHMOD==5)
749 write(10, fmt=trim(fmt3))
'enh_compr =', enh_compr
750 write(10, fmt=trim(fmt3))
'enh_shear =', enh_shear
752 #if ((ENHMOD==1 || ENHMOD==2 || ENHMOD==3 || ENHMOD==4) && MARGIN==3)
753 write(10, fmt=trim(fmt3))
'enh_shelf =', enh_shelf
755 write(10, fmt=trim(fmt1))
' '
757 write(10, fmt=trim(fmt3))
'numdiff_H_t =', numdiff_h_t
758 write(10, fmt=trim(fmt3))
'tau_cts =', tau_cts
759 write(10, fmt=trim(fmt3))
'H_min =', h_min
760 write(10, fmt=trim(fmt3))
'vh_max =', vh_max
761 write(10, fmt=trim(fmt3))
'hd_min =', hd_min
762 write(10, fmt=trim(fmt3))
'hd_max =', hd_max
764 write(10, fmt=trim(fmt3))
'qbm_min =', qbm_min
765 #elif defined(QB_MIN) /* obsolete */
766 write(10, fmt=trim(fmt3))
'qb_min =', qb_min
769 write(10, fmt=trim(fmt3))
'qbm_max =', qbm_max
770 #elif defined(QB_MAX) /* obsolete */
771 write(10, fmt=trim(fmt3))
'qb_max =', qb_max
773 write(10, fmt=trim(fmt3))
'age_min =', age_min
774 write(10, fmt=trim(fmt3))
'age_max =', age_max
775 write(10, fmt=trim(fmt3))
'mean_accum =', mean_accum
777 write(10, fmt=trim(fmt3))
'age_diff =', agediff
779 write(10, fmt=trim(fmt1))
' '
781 write(10, fmt=trim(fmt2))
'GRID =', grid
782 write(10, fmt=trim(fmt2))
'DYNAMICS =', dynamics
783 #if (DYNAMICS==2 && defined(RATIO_SL_THRESH))
784 write(10, fmt=trim(fmt3))
'ratio_sl_thresh =', ratio_sl_thresh
786 write(10, fmt=trim(fmt2))
'CALCMOD =', calcmod
787 #if ( CALCMOD==-1 && defined(TEMP_CONST) )
788 write(10, fmt=trim(fmt3))
'TEMP_CONST =', temp_const
790 #if ( CALCMOD==-1 && defined(AGE_CONST) )
791 write(10, fmt=trim(fmt3))
'AGE_CONST =', age_const
793 #if ( CALCMOD==1 && defined(CTS_MELTING_FREEZING) )
794 write(10, fmt=trim(fmt2))
'CTS_MELTING_FREEZING =', cts_melting_freezing
796 write(10, fmt=trim(fmt2))
'FLOW_LAW =', flow_law
797 write(10, fmt=trim(fmt2))
'FIN_VISC =', fin_visc
798 write(10, fmt=trim(fmt2))
'MARGIN =', margin
800 write(10, fmt=trim(fmt2))
'MARINE_ICE_FORMATION =', marine_ice_formation
801 write(10, fmt=trim(fmt2))
'MARINE_ICE_CALVING =', marine_ice_calving
803 write(10, fmt=trim(fmt2))
'ICE_SHELF_CALVING =', ice_shelf_calving
805 write(10, fmt=trim(fmt2))
'ZS_EVOL =', zs_evol
806 write(10, fmt=trim(fmt2))
'CALCZS =', calczs
807 write(10, fmt=trim(fmt2))
'ADV_HOR =', adv_hor
808 write(10, fmt=trim(fmt2))
'ADV_VERT =', adv_vert
809 write(10, fmt=trim(fmt2))
'TOPOGRAD =', topograd
810 write(10, fmt=trim(fmt1))
' '
811 write(10, fmt=trim(fmt2))
'TEMP_PRESENT_PARA =', temp_present_para
812 write(10, fmt=trim(fmt2))
'TSURFACE =', tsurface
813 write(10, fmt=trim(fmt2))
'ACCSURFACE =', accsurface
815 write(10, fmt=trim(fmt2))
'PRECIP_ANOM_INTERPOL =', precip_anom_interpol
817 write(10, fmt=trim(fmt2))
'SOLID_PRECIP =', solid_precip
818 write(10, fmt=trim(fmt2))
'ABLSURFACE =', ablsurface
819 #if ( ABLSURFACE==1 || ABLSURFACE==2 )
820 write(10, fmt=trim(fmt2))
'PDD_MODIFIER =', pdd_modifier
822 write(10, fmt=trim(fmt2))
'N_PDD_MOD =', n_pdd_mod
823 write(10, fmt=trim(fmt3))
'LON_W_E_SEP =', lon_w_e_sep
826 write(10, fmt=trim(fmt3))
'PDD_MOD_LAT_01 =', pdd_mod_lat_01
827 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_W_01 =', pdd_mod_fac_w_01
828 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_E_01 =', pdd_mod_fac_e_01
831 write(10, fmt=trim(fmt3))
'PDD_MOD_LAT_02 =', pdd_mod_lat_02
832 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_W_02 =', pdd_mod_fac_w_02
833 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_E_02 =', pdd_mod_fac_e_02
836 write(10, fmt=trim(fmt3))
'PDD_MOD_LAT_03 =', pdd_mod_lat_03
837 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_W_03 =', pdd_mod_fac_w_03
838 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_E_03 =', pdd_mod_fac_e_03
841 write(10, fmt=trim(fmt3))
'PDD_MOD_LAT_04 =', pdd_mod_lat_04
842 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_W_04 =', pdd_mod_fac_w_04
843 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_E_04 =', pdd_mod_fac_e_04
846 write(10, fmt=trim(fmt3))
'PDD_MOD_LAT_05 =', pdd_mod_lat_05
847 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_W_05 =', pdd_mod_fac_w_05
848 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_E_05 =', pdd_mod_fac_e_05
851 write(10, fmt=trim(fmt3))
'PDD_MOD_LAT_06 =', pdd_mod_lat_06
852 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_W_06 =', pdd_mod_fac_w_06
853 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_E_06 =', pdd_mod_fac_e_06
856 write(10, fmt=trim(fmt3))
'PDD_MOD_LAT_07 =', pdd_mod_lat_07
857 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_W_07 =', pdd_mod_fac_w_07
858 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_E_07 =', pdd_mod_fac_e_07
861 write(10, fmt=trim(fmt3))
'PDD_MOD_LAT_08 =', pdd_mod_lat_08
862 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_W_08 =', pdd_mod_fac_w_08
863 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_E_08 =', pdd_mod_fac_e_08
866 write(10, fmt=trim(fmt3))
'PDD_MOD_LAT_09 =', pdd_mod_lat_09
867 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_W_09 =', pdd_mod_fac_w_09
868 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_E_09 =', pdd_mod_fac_e_09
871 write(10, fmt=trim(fmt3))
'PDD_MOD_LAT_10 =', pdd_mod_lat_10
872 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_W_10 =', pdd_mod_fac_w_10
873 write(10, fmt=trim(fmt3))
'PDD_MOD_FAC_E_10 =', pdd_mod_fac_e_10
878 write(10, fmt=trim(fmt1))
' '
879 write(10, fmt=trim(fmt2))
'SEA_LEVEL =', sea_level
880 write(10, fmt=trim(fmt2))
'SLIDE_LAW =', slide_law
881 write(10, fmt=trim(fmt2))
'ICE_STREAM =', ice_stream
882 write(10, fmt=trim(fmt2))
'Q_GEO_MOD =', q_geo_mod
883 write(10, fmt=trim(fmt1))
' '
885 #if defined(OUT_TIMES)
886 write(10, fmt=trim(fmt2))
'OUT_TIMES =', out_times
888 write(10, fmt=trim(fmt2))
'OUTPUT =', output
889 write(10, fmt=trim(fmt2))
'OUTSER =', outser
890 #if defined(OUTSER_V_A)
891 write(10, fmt=trim(fmt2))
'OUTSER_V_A =', outser_v_a
893 #if ( OUTPUT==1 || OUTPUT==2 )
894 write(10, fmt=trim(fmt2))
'ERGDAT =', ergdat
896 write(10, fmt=trim(fmt2))
'NETCDF =', netcdf
897 write(10, fmt=trim(fmt1))
' '
898 #if ( OUTPUT==2 || OUTPUT==3 )
899 write(10, fmt=trim(fmt2))
'n_output =', n_output
901 write(10, fmt=trim(fmt3))
'time_output =', time_output0(n)
903 write(10, fmt=trim(fmt1))
' '
906 write(10, fmt=trim(fmt1))
'Program version and date: '//version//
' / '//date
908 close(10, status=
'keep')
912 year_zero = year_zero*year_sec
913 time_init = time_init0*year_sec
914 time_end = time_end0*year_sec
915 dtime = dtime0*year_sec
916 dtime_temp = dtime_temp0*year_sec
918 dtime_wss = dtime_wss0*year_sec
920 dtime_ser = dtime_ser0*year_sec
921 #if ( OUTPUT==1 || OUTPUT==3 )
922 dtime_out = dtime_out0*year_sec
924 #if ( OUTPUT==2 || OUTPUT==3 )
926 time_output(n) = time_output0(n)*year_sec
930 if (abs(dtime_temp/dtime-nint(dtime_temp/dtime)) > eps) &
931 stop
' sico_init: dtime_temp must be a multiple of dtime!'
934 if (abs(dtime_wss/dtime-nint(dtime_wss/dtime)) > eps) &
935 stop
' sico_init: dtime_wss must be a multiple of dtime!'
939 time_target_topo_init = time_target_topo_init0 *year_sec
940 time_target_topo_final = time_target_topo_final0*year_sec
947 #if (GRID==0 || GRID==1)
949 open(21, iostat=ios, &
950 file=inpath//
'/'//trim(ch_domain_short)//
'/'//precip_present_file, &
951 recl=8192, status=
'old')
955 stop
' sico_init: GRID==2 not allowed for this application!'
959 if (ios /= 0) stop
' sico_init: Error when opening the precip file!'
961 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
964 read(21, fmt=*) (precip_ma_present(j,i), i=0,imax)
967 close(21, status=
'keep')
969 precip_ma_present = precip_ma_present *(1.0e-03_dp/year_sec)*(rho_w/rho)
972 precip_factor = 1.0_dp
974 #if (defined(PRECIP_FACTOR_FILE))
976 if ( trim(adjustl(precip_factor_file)) /=
'none' )
then
978 open(21, iostat=ios, &
979 file=inpath//
'/'//trim(ch_domain_short)//
'/'//precip_factor_file, &
980 recl=8192, status=
'old')
982 if (ios /= 0) stop
' sico_init: Error when opening the precip factor file!'
984 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
987 read(21, fmt=*) (precip_factor(j,i), i=0,imax)
990 close(21, status=
'keep')
996 precip_ma_present = precip_ma_present * precip_factor
1004 precip_present(j,i,n) = precip_ma_present(j,i)
1013 #if (GRID==0 || GRID==1)
1015 open(21, iostat=ios, &
1016 file=inpath//
'/'//trim(ch_domain_short)//
'/'//precip_anom_file, &
1017 recl=8192, status=
'old')
1021 if (ios /= 0) stop
' sico_init: Error when opening the precip anomaly file!'
1023 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
1026 read(21, fmt=*) (precip_ma_lgm_anom(j,i), i=0,imax)
1029 close(21, status=
'keep')
1031 precip_ma_lgm_anom = precip_ma_lgm_anom * precip_anom_fact
1040 precip_lgm_anom(j,i,n) = max(precip_ma_lgm_anom(j,i), eps)
1043 #if (PRECIP_ANOM_INTERPOL==1)
1044 gamma_precip_lgm_anom(j,i,n) = 0.0_dp
1045 #elif (PRECIP_ANOM_INTERPOL==2)
1046 gamma_precip_lgm_anom(j,i,n) = -log(precip_lgm_anom(j,i,n))
1048 stop
' sico_init: Wrong value of switch PRECIP_ANOM_INTERPOL!'
1059 mean_accum = mean_accum*(1.0e-03_dp/year_sec)*(rho_w/rho)
1064 #if (GRID==0 || GRID==1)
1066 open(24, iostat=ios, &
1067 file=inpath//
'/'//trim(ch_domain_short)//
'/'//mask_present_file, &
1068 recl=2048, status=
'old')
1072 stop
' sico_init: GRID==2 not allowed for this application!'
1076 if (ios /= 0) stop
' sico_init: Error when opening the mask file!'
1078 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do
1081 read(24, fmt=trim(fmt4)) (maske_help(j,i), i=0,imax)
1084 close(24, status=
'keep')
1090 open(24, iostat=ios, &
1091 file=inpath//
'/'//trim(ch_domain_short)//
'/'//mask_sedi_file, &
1092 recl=2048, status=
'old')
1094 if (ios /= 0) stop
' sico_init: Error when opening the rock/sediment mask file!'
1096 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do
1099 read(24, fmt=trim(fmt4)) (maske_sedi(j,i), i=0,imax)
1102 close(24, status=
'keep')
1108 #if (GRID==0 || GRID==1)
1110 open(21, iostat=ios, &
1111 file=inpath//
'/'//trim(ch_domain_short)//
'/'//zs_present_file, &
1112 recl=8192, status=
'old')
1116 stop
' sico_init: GRID==2 not allowed for this application!'
1120 if (ios /= 0) stop
' sico_init: Error when opening the zs file!'
1122 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
1125 read(21, fmt=*) (zs_ref(j,i), i=0,imax)
1128 close(21, status=
'keep')
1135 if (maske_help(j,i) >= 2) zs_ref(j,i) = 0.0_dp
1143 target_topo_dat_name = trim(target_topo_dat_name)
1146 write(6, fmt=
'(a)')
' sico_init: Reading of target topography'
1147 write(6, fmt=
'(a)')
' only implemented for NetCDF files (NETCDF==2)!'
1152 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
1161 #if (GRID==0 || GRID==1)
1163 open(24, iostat=ios, &
1164 file=inpath//
'/'//trim(ch_domain_short)//
'/'//mask_maxextent_file, &
1165 recl=2048, status=
'old')
1169 stop
' sico_init: GRID==2 not allowed for this application!'
1174 stop
' sico_init: Error when opening the maximum ice extent mask file!'
1176 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do
1179 read(24, fmt=trim(fmt4)) (maske_maxextent(j,i), i=0,imax)
1182 close(24, status=
'keep')
1191 #if (GRID==0 || GRID==1)
1193 open(21, iostat=ios, &
1194 file=inpath//
'/'//trim(ch_domain_short)//
'/'//temp_ma_anom_file, &
1195 recl=8192, status=
'old')
1199 if (ios /= 0) stop
' sico_init: Error when opening the temp_ma anomaly file!'
1201 #if (GRID==0 || GRID==1)
1203 open(22, iostat=ios, &
1204 file=inpath//
'/'//trim(ch_domain_short)//
'/'//temp_mj_anom_file, &
1205 recl=8192, status=
'old')
1209 if (ios /= 0) stop
' sico_init: Error when opening the temp_mj anomaly file!'
1211 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
1212 do n=1, 6;
read(22, fmt=
'(a)') ch_dummy;
end do
1215 read(21, fmt=*) (temp_ma_lgm_anom(j,i), i=0,imax)
1216 read(22, fmt=*) (temp_mj_lgm_anom(j,i), i=0,imax)
1219 close(21, status=
'keep')
1220 close(22, status=
'keep')
1222 temp_ma_lgm_anom = temp_ma_lgm_anom * temp_ma_anom_fact
1223 temp_mj_lgm_anom = temp_mj_lgm_anom * temp_mj_anom_fact
1231 open(21, iostat=ios, &
1232 file=inpath//
'/general/'//grip_temp_file, &
1235 stop
' sico_init: Error when opening the data file for delta_ts!'
1237 read(21, fmt=*) ch_dummy, grip_time_min, grip_time_stp, grip_time_max
1239 if (ch_dummy /=
'#')
then
1240 write(6, fmt=*)
' sico_init: grip_time_min, grip_time_stp, grip_time_max'
1241 write(6, fmt=*)
' not defined in data file for delta_ts!'
1245 ndata_grip = (grip_time_max-grip_time_min)/grip_time_stp
1247 allocate(griptemp(0:ndata_grip))
1250 read(21, fmt=*) d_dummy, griptemp(n)
1253 close(21, status=
'keep')
1261 open(21, iostat=ios, &
1262 file=inpath//
'/general/'//glac_ind_file, status=
'old')
1263 if (ios /= 0) stop
' sico_init: Error when opening the glacial-index file!'
1265 read(21, fmt=*) ch_dummy, gi_time_min, gi_time_stp, gi_time_max
1267 if (ch_dummy /=
'#')
then
1268 write(6, fmt=*)
' sico_init: gi_time_min, gi_time_stp, gi_time_max'
1269 write(6, fmt=*)
' not defined in glacial-index file!'
1273 ndata_gi = (gi_time_max-gi_time_min)/gi_time_stp
1275 allocate(glacial_index(0:ndata_gi))
1278 read(21, fmt=*) d_dummy, glacial_index(n)
1281 close(21, status=
'keep')
1288 #if ( (TSURFACE==6) && (ACCSURFACE==6) )
1290 filename_with_path = trim(inpath)//
'/'//trim(ch_domain_short)// &
1291 '/'//trim(temp_precip_anom_file)
1293 call
check( nf90_open(trim(filename_with_path), nf90_nowrite, &
1294 ncid_temp_precip), thisroutine )
1296 call
check( nf90_inquire(ncid_temp_precip, unlimiteddimid = dimid), &
1299 call
check( nf90_inquire_dimension(ncid_temp_precip, dimid, &
1300 len = ndata_temp_precip), thisroutine )
1302 ndata_temp_precip = ndata_temp_precip-1
1304 allocate(temp_precip_time(0:ndata_temp_precip))
1306 call
check( nf90_inq_varid(ncid_temp_precip,
'time', ncv), thisroutine )
1307 call
check( nf90_get_var(ncid_temp_precip, ncv, temp_precip_time), thisroutine )
1310 temp_precip_time_min = temp_precip_time(0)
1311 temp_precip_time_stp = temp_precip_time(1)-temp_precip_time(0)
1313 temp_precip_time_max = temp_precip_time(ndata_temp_precip)
1321 open(21, iostat=ios, &
1322 file=inpath//
'/general/'//sea_level_file, &
1325 stop
' sico_init: Error when opening the data file for z_sl!'
1327 read(21, fmt=*) ch_dummy, specmap_time_min, specmap_time_stp, specmap_time_max
1329 if (ch_dummy /=
'#')
then
1330 write(6, fmt=*)
' sico_init: specmap_time_min, specmap_time_stp, specmap_time_max'
1331 write(6, fmt=*)
' not defined in data file for z_sl!'
1335 ndata_specmap = (specmap_time_max-specmap_time_min)/specmap_time_stp
1337 allocate(specmap_zsl(0:ndata_specmap))
1339 do n=0, ndata_specmap
1340 read(21, fmt=*) d_dummy, specmap_zsl(n)
1343 close(21, status=
'keep')
1355 q_geo(j,i) = q_geo *1.0e-03_dp
1363 open(21, iostat=ios, &
1364 file=inpath//
'/'//trim(ch_domain_short)//
'/'//q_geo_file, &
1365 recl=8192, status=
'old')
1367 if (ios /= 0) stop
' sico_init: Error when opening the qgeo file!'
1369 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
1372 read(21, fmt=*) (q_geo(j,i), i=0,imax)
1375 close(21, status=
'keep')
1379 q_geo(j,i) = q_geo(j,i) *1.0e-03_dp
1387 #if (REBOUND==0 || REBOUND==1)
1389 kei = 0.0_dp; n_data_kei = 0; kei_r_max = 0.0_dp; kei_r_incr = 0.0_dp
1400 #if (REBOUND==1 || REBOUND==2)
1402 #if (TIME_LAG_MOD==1)
1404 time_lag_asth = time_lag*year_sec
1406 #elif (TIME_LAG_MOD==2)
1408 open(29, iostat=ios, &
1409 file=inpath//
'/'//trim(ch_domain_short)//
'/'//time_lag_file, &
1410 recl=8192, status=
'old')
1412 if (ios /= 0) stop
' sico_init: Error when opening the time-lag file!'
1414 do n=1, 6;
read(29, fmt=
'(a)') ch_dummy;
end do
1417 read(29, fmt=*) (time_lag_asth(j,i), i=0,imax)
1420 close(29, status=
'keep')
1422 time_lag_asth = time_lag_asth*year_sec
1428 time_lag_asth = 0.0_dp
1436 #if (FLEX_RIG_MOD==1)
1438 flex_rig_lith = flex_rig
1440 #elif (FLEX_RIG_MOD==2)
1442 open(29, iostat=ios, &
1443 file=inpath//
'/'//trim(ch_domain_short)//
'/'//flex_rig_file, &
1444 recl=8192, status=
'old')
1446 if (ios /= 0) stop
' sico_init: Error when opening the flex-rig file!'
1448 do n=1, 6;
read(29, fmt=
'(a)') ch_dummy;
end do
1451 read(29, fmt=*) (flex_rig_lith(j,i), i=0,imax)
1454 close(29, status=
'keep')
1458 #elif (REBOUND==0 || REBOUND==1)
1460 flex_rig_lith = 0.0_dp
1474 call
boundary(time_init, dtime, dxi, deta, &
1475 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1496 call
boundary(time_init, dtime, dxi, deta, &
1497 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1519 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
1522 call
boundary(time_init, dtime, dxi, deta, &
1523 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1525 q_b_tot = q_bm + q_tld
1531 flag_grounding_line_1 = .false.
1532 flag_grounding_line_2 = .false.
1534 flag_calving_front_1 = .false.
1535 flag_calving_front_2 = .false.
1537 #if (MARGIN==1 || MARGIN==2)
1546 if ( (maske(j,i)==0_i2b) &
1548 ( (maske(j,i+1)==3_i2b) &
1549 .or.(maske(j,i-1)==3_i2b) &
1550 .or.(maske(j+1,i)==3_i2b) &
1551 .or.(maske(j-1,i)==3_i2b) ) &
1553 flag_grounding_line_1(j,i) = .true.
1555 if ( (maske(j,i)==3_i2b) &
1557 ( (maske(j,i+1)==0_i2b) &
1558 .or.(maske(j,i-1)==0_i2b) &
1559 .or.(maske(j+1,i)==0_i2b) &
1560 .or.(maske(j-1,i)==0_i2b) ) &
1562 flag_grounding_line_2(j,i) = .true.
1564 if ( (maske(j,i)==3_i2b) &
1566 ( (maske(j,i+1)==2_i2b) &
1567 .or.(maske(j,i-1)==2_i2b) &
1568 .or.(maske(j+1,i)==2_i2b) &
1569 .or.(maske(j-1,i)==2_i2b) ) &
1571 flag_calving_front_1(j,i) = .true.
1573 if ( (maske(j,i)==2_i2b) &
1575 ( (maske(j,i+1)==3_i2b) &
1576 .or.(maske(j,i-1)==3_i2b) &
1577 .or.(maske(j+1,i)==3_i2b) &
1578 .or.(maske(j-1,i)==3_i2b) ) &
1580 flag_calving_front_2(j,i) = .true.
1588 if ( (maske(j,i)==2_i2b) &
1589 .and. (maske(j+1,i)==3_i2b) &
1591 flag_calving_front_2(j,i) = .true.
1594 if ( (maske(j,i)==2_i2b) &
1595 .and. (maske(j-1,i)==3_i2b) &
1597 flag_calving_front_2(j,i) = .true.
1604 if ( (maske(j,i)==2_i2b) &
1605 .and. (maske(j,i+1)==3_i2b) &
1607 flag_calving_front_2(j,i) = .true.
1610 if ( (maske(j,i)==2_i2b) &
1611 .and. (maske(j,i-1)==3_i2b) &
1613 flag_calving_front_2(j,i) = .true.
1618 stop
' sico_init: MARGIN must be either 1, 2 or 3!'
1623 #if (GRID==0 || GRID==1)
1627 dist_dxdy(jr,ir) = sqrt( (
real(ir,dp)*dxi)**2 + (
real(jr,dp)*deta)**2 )
1638 #if (DYNAMICS==1 || DYNAMICS==2)
1643 #if (MARGIN==3 || DYNAMICS==2)
1644 call
calc_vxy_ssa(z_sl, dxi, deta, dzeta_c, dzeta_t, ii, jj, nn)
1659 stop
' sico_init: DYNAMICS must be either 0, 1 or 2!'
1662 call
calc_dxyz(dxi, deta, dzeta_c, dzeta_t)
1666 #if (CALCMOD==0 || CALCMOD==-1)
1676 enth_t(kt,j,i) = enth_c(0,j,i)
1691 if ( (maske(j,i) == 0_i2b).and.(n_cts(j,i) == 1_i2b) )
then
1697 enth_t(kt,j,i) = enth_c(0,j,i)
1704 #elif (CALCMOD==2 || CALCMOD==3)
1714 enth_t(kt,j,i) = enth_c(0,j,i)
1722 stop
' sico_init: Parameter CALCMOD must be either -1, 0, 1, 2 or 3!'
1730 open(12, iostat=ios, &
1731 file=outpath//
'/'//trim(runname)//
'.ser', &
1734 stop
' sico_init: Error when opening the ser file!'
1736 if (forcing_flag == 1)
then
1741 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
1743 1102
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
1744 ' H_max(m) zs_max(m) V_g(m^3)', &
1745 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
1746 ' A_g(m^2) A_t(m^2) V_bm(m^3/a)', &
1747 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
1748 1103
format(
'----------------------------------------------------', &
1749 '---------------------------------------')
1753 1102
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
1754 ' V(m^3) V_g(m^3) V_f(m^3)', &
1755 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
1756 ' H_max(m) zs_max(m)', &
1757 ' V_t(m^3) V_fw(m^3/a) V_sle(m)',/, &
1758 ' A_t(m^2) V_bm(m^3/a)', &
1759 ' V_tld(m^3/a) H_t_max(m) vs_max(m/a)')
1760 1103
format(
'----------------------------------------------------', &
1761 '---------------------------------------')
1764 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
1767 else if (forcing_flag == 2)
then
1772 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
1774 1112
format(
' t(a) glac_ind(1) 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 1113
format(
'----------------------------------------------------', &
1780 '---------------------------------------')
1784 1112
format(
' t(a) glac_ind(1) 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 1113
format(
'----------------------------------------------------', &
1792 '---------------------------------------')
1795 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
1798 else if (forcing_flag == 3)
then
1803 #if ( !defined(OUTSER_V_A) || OUTSER_V_A==1 )
1805 1122
format(
' t(a) (Dummy)(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 1123
format(
'----------------------------------------------------', &
1811 '---------------------------------------')
1815 1122
format(
' t(a) (Dummy)(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 1123
format(
'----------------------------------------------------', &
1823 '---------------------------------------')
1826 stop
' sico_init: OUTSER_V_A must be either 1 or 2!'
1835 open(13, iostat=ios, &
1836 file=outpath//
'/'//trim(runname)//
'.thk', &
1838 if (ios /= 0) stop
' sico_init: Error when opening the thk file!'
1840 if (forcing_flag == 1)
then
1845 1104
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
1846 ' H(m): JMAX+1 records [j = JMAX (-1) 0] with',/, &
1847 ' IMAX+1 values [i = 0 (1) IMAX] in each record')
1848 1105
format(
'----------------------------------------------------')
1850 else if (forcing_flag == 2)
then
1855 1114
format(
' t(a) glac_ind(1) z_sl(m)',/, &
1856 ' H(m): JMAX+1 records [j = JMAX (-1) 0] with',/, &
1857 ' IMAX+1 values [i = 0 (1) IMAX] in each record')
1858 1115
format(
'----------------------------------------------------')
1860 else if (forcing_flag == 3)
then
1865 1124
format(
' t(a) (Dummy)(1) z_sl(m)',/, &
1866 ' H(m): JMAX+1 records [j = JMAX (-1) 0] with',/, &
1867 ' IMAX+1 values [i = 0 (1) IMAX] in each record')
1868 1125
format(
'----------------------------------------------------')
1880 allocate(lambda_core(n_core), phi_core(n_core), &
1881 x_core(n_core), y_core(n_core))
1883 phi_core(1) = 72.58722_dp *pi_180
1884 lambda_core(1) = -37.64222_dp *pi_180
1885 call
num_coord(lambda_core(1), phi_core(1), x_core(1), y_core(1))
1887 phi_core(2) = 72.58833_dp *pi_180
1888 lambda_core(2) = -38.45750_dp *pi_180
1889 call
num_coord(lambda_core(2), phi_core(2), x_core(2), y_core(2))
1891 phi_core(3) = 65.15139_dp *pi_180
1892 lambda_core(3) = -43.81722_dp *pi_180
1893 call
num_coord(lambda_core(3), phi_core(3), x_core(3), y_core(3))
1895 phi_core(4) = 77.17970_dp *pi_180
1896 lambda_core(4) = -61.10975_dp *pi_180
1897 call
num_coord(lambda_core(4), phi_core(4), x_core(4), y_core(4))
1899 phi_core(5) = 75.09694_dp *pi_180
1900 lambda_core(5) = -42.31956_dp *pi_180
1901 call
num_coord(lambda_core(5), phi_core(5), x_core(5), y_core(5))
1903 phi_core(6) = 77.5_dp *pi_180
1904 lambda_core(6) = -50.9_dp *pi_180
1905 call
num_coord(lambda_core(6), phi_core(6), x_core(6), y_core(6))
1907 open(14, iostat=ios, &
1908 file=outpath//
'/'//trim(runname)//
'.core', &
1910 if (ios /= 0) stop
' sico_init: Error when opening the core file!'
1912 if (forcing_flag == 1)
then
1917 1106
format(
' t(a) D_Ts(C) z_sl(m)',/, &
1918 ' H_GR(m) H_G2(m) H_D3(m)', &
1919 ' H_CC(m) H_NG(m) H_NE(m)',/, &
1920 ' v_GR(m/a) v_G2(m/a) v_D3(m/a)', &
1921 ' v_CC(m/a) v_NG(m/a) v_NE(m/a)',/, &
1922 ' T_GR(C) T_G2(C) T_D3(C)', &
1923 ' T_CC(C) T_NG(C) T_NE(C)',/, &
1924 ' Rb_GR(W/m2) Rb_G2(W/m2) Rb_D3(W/m2)', &
1925 ' Rb_CC(W/m2) Rb_NG(W/m2) Rb_NE(W/m2)')
1926 1107
format(
'----------------------------------------------------', &
1927 '---------------------------------------')
1929 else if (forcing_flag == 2)
then
1934 1116
format(
' t(a) glac_ind(1) z_sl(m)',/, &
1935 ' H_GR(m) H_G2(m) H_D3(m)', &
1936 ' H_CC(m) H_NG(m) H_NE(m)',/, &
1937 ' v_GR(m/a) v_G2(m/a) v_D3(m/a)', &
1938 ' v_CC(m/a) v_NG(m/a) v_NE(m/a)',/, &
1939 ' T_GR(C) T_G2(C) T_D3(C)', &
1940 ' T_CC(C) T_NG(C) T_NE(C)',/, &
1941 ' Rb_GR(W/m2) Rb_G2(W/m2) Rb_D3(W/m2)', &
1942 ' Rb_CC(W/m2) Rb_NG(W/m2) Rb_NE(W/m2)')
1943 1117
format(
'----------------------------------------------------', &
1944 '---------------------------------------')
1946 else if (forcing_flag == 3)
then
1951 1126
format(
' t(a) (Dummy)(1) z_sl(m)',/, &
1952 ' H_GR(m) H_G2(m) H_D3(m)', &
1953 ' H_CC(m) H_NG(m) H_NE(m)',/, &
1954 ' v_GR(m/a) v_G2(m/a) v_D3(m/a)', &
1955 ' v_CC(m/a) v_NG(m/a) v_NE(m/a)',/, &
1956 ' T_GR(C) T_G2(C) T_D3(C)', &
1957 ' T_CC(C) T_NG(C) T_NE(C)',/, &
1958 ' Rb_GR(W/m2) Rb_G2(W/m2) Rb_D3(W/m2)', &
1959 ' Rb_CC(W/m2) Rb_NG(W/m2) Rb_NE(W/m2)')
1960 1127
format(
'----------------------------------------------------', &
1961 '---------------------------------------')
1972 flag_3d_output = .false.
1974 flag_3d_output = .true.
1976 stop
' sico_init: ERGDAT must be either 0 or 1!'
1980 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
1981 flag_3d_output, ndat2d, ndat3d)
1983 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
1984 flag_3d_output, ndat2d, ndat3d)
1986 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
1991 if (time_output(1) <= time_init+eps)
then
1994 flag_3d_output = .false.
1996 flag_3d_output = .true.
1998 stop
' sico_init: ERGDAT must be either 0 or 1!'
2002 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
2003 flag_3d_output, ndat2d, ndat3d)
2005 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
2006 flag_3d_output, ndat2d, ndat3d)
2008 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
2015 flag_3d_output = .false.
2018 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
2019 flag_3d_output, ndat2d, ndat3d)
2021 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
2022 flag_3d_output, ndat2d, ndat3d)
2024 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
2027 if (time_output(1) <= time_init+eps)
then
2029 flag_3d_output = .true.
2032 call
output1(runname, time_init, delta_ts, glac_index, z_sl, &
2033 flag_3d_output, ndat2d, ndat3d)
2035 call
output_nc(runname, time_init, delta_ts, glac_index, z_sl, &
2036 flag_3d_output, ndat2d, ndat3d)
2038 stop
' sico_init: Parameter NETCDF must be either 1 or 2!'
2044 stop
' sico_init: OUTPUT must be either 1, 2 or 3!'
2047 call
output2(time_init, dxi, deta, delta_ts, glac_index, z_sl)
2049 call
output3(time_init, delta_ts, glac_index, z_sl)
2052 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.