50 subroutine sico_init(delta_ts, glac_index, &
52 dtime, dtime_temp, dtime_wss, dtime_out, dtime_ser, &
53 time, time_init, time_end, time_output, &
54 dxi, deta, dzeta_c, dzeta_t, dzeta_r, &
55 z_sl, dzsl_dtau, z_mar, &
57 ndat2d, ndat3d, n_output, &
70 #if (GRID==0 || GRID==1) 88 integer(i4b),
intent(out) :: ii((imax+1)*(jmax+1)), &
89 jj((imax+1)*(jmax+1)), &
91 integer(i4b),
intent(out) :: ndat2d, ndat3d
92 integer(i4b),
intent(out) :: n_output
93 real(dp),
intent(out) :: delta_ts, glac_index
94 real(dp),
intent(out) :: mean_accum
95 real(dp),
intent(out) :: dtime, dtime_temp, dtime_wss, &
97 real(dp),
intent(out) :: time, time_init, time_end, time_output(100)
98 real(dp),
intent(out) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
99 real(dp),
intent(out) :: z_sl, dzsl_dtau, z_mar
101 character(len=100),
intent(out) :: runname
103 integer(i4b) :: i, j, kc, kt, kr, m, n, ir, jr
104 integer(i4b) :: ios, ios1, ios2, ios3, ios4
106 integer(i2b),
dimension(0:JMAX,0:IMAX) :: maske_ref
107 real(dp) :: dtime0, dtime_temp0, dtime_wss0, dtime_out0, dtime_ser0
108 real(dp) :: time_init0, time_end0, time_output0(100)
109 real(dp),
dimension(0:JMAX,0:IMAX) :: precip_factor
111 real(dp) :: transition_length_sliding, quasi_time, d_quasi_time
112 real(dp),
dimension(0:JMAX,0:IMAX) :: r_mask_sedi_new
113 character(len=100) :: anfdatname, target_topo_dat_name
114 character(len=256) :: filename_with_path
115 character(len=256) :: shell_command
116 character :: ch_dummy
117 logical :: flag_init_output, flag_3d_output
119 #if (defined(INITMIP_SMB_ANOM_FILE)) 120 real(sp),
dimension(0:IMAX,0:JMAX) :: as_anom_initmip_conv
123 #if (defined(INITMIP_BMB_ANOM_FILE)) 124 real(sp),
dimension(0:IMAX,0:JMAX) :: ab_anom_initmip_conv
128 integer(i4b) :: dimid, ncid, ncv
134 character(len=64),
parameter :: thisroutine =
'sico_init' 136 character(len=64),
parameter :: fmt1 =
'(a)', &
141 character(len= 8) :: ch_imax
142 character(len=128) :: fmt4
144 write(ch_imax, fmt=
'(i8)') imax
145 write(fmt4, fmt=
'(a)')
'('//trim(adjustl(ch_imax))//
'(i1),i1)' 147 write(unit=6, fmt=
'(a)')
' ' 148 write(unit=6, fmt=
'(a)')
' -------- sico_init --------' 149 write(unit=6, fmt=
'(a)')
' ' 161 #elif (defined(EMTP2SGE)) 169 #elif (defined(NHEM)) 173 #elif (defined(SCAND)) 177 #elif (defined(TIBET)) 181 #elif (defined(NMARS)) 185 #elif (defined(SMARS)) 197 stop
' >>> sico_init: No valid domain specified!' 218 #if (CALCTHK==3 || CALCTHK==6 || MARGIN==3 || DYNAMICS==2) 219 call lis_initialize(ierr)
235 if ( trim(version) /= trim(sico_version) ) &
236 stop
' >>> sico_init: SICOPOLIS version not compatible with header file!' 240 #if (!defined(DYNAMICS)) 241 stop
' >>> sico_init: DYNAMICS not defined in the header file!' 244 #if (!defined(CALCMOD)) 245 stop
' >>> sico_init: CALCMOD not defined in the header file!' 248 #if (defined(ENTHMOD)) 249 write(6, fmt=
'(a)')
' >>> sico_init: ENTHMOD must not be defined any more.' 250 write(6, fmt=
'(a)')
' Please update your header file!' 257 #if (GRID==0 || GRID==1) 259 if (approx_equal(dx, 64.0_dp,
eps_sp_dp))
then 261 if ( (imax /= 95).or.(jmax /= 95) )
then 262 stop
' >>> sico_init: IMAX and/or JMAX wrong!' 265 else if (approx_equal(dx, 40.0_dp,
eps_sp_dp))
then 267 if ( (imax /= 152).or.(jmax /= 152) )
then 268 stop
' >>> sico_init: IMAX and/or JMAX wrong!' 271 else if (approx_equal(dx, 32.0_dp,
eps_sp_dp))
then 273 if ( (imax /= 190).or.(jmax /= 190) )
then 274 stop
' >>> sico_init: IMAX and/or JMAX wrong!' 277 else if (approx_equal(dx, 20.0_dp,
eps_sp_dp))
then 279 if ( (imax /= 304).or.(jmax /= 304) )
then 280 stop
' >>> sico_init: IMAX and/or JMAX wrong!' 283 else if (approx_equal(dx, 16.0_dp,
eps_sp_dp))
then 285 if ( (imax /= 380).or.(jmax /= 380) )
then 286 stop
' >>> sico_init: IMAX and/or JMAX wrong!' 289 else if (approx_equal(dx, 10.0_dp,
eps_sp_dp))
then 291 if ( (imax /= 608).or.(jmax /= 608) )
then 292 stop
' >>> sico_init: IMAX and/or JMAX wrong!' 295 else if (approx_equal(dx, 8.0_dp,
eps_sp_dp))
then 297 if ( (imax /= 760).or.(jmax /= 760) )
then 298 stop
' >>> sico_init: IMAX and/or JMAX wrong!' 302 stop
' >>> sico_init: DX wrong!' 307 stop
' >>> sico_init: GRID==2 not allowed for this application!' 315 #if (CALCMOD==0 || CALCMOD==2 || CALCMOD==3 || CALCMOD==-1) 318 write(6, fmt=
'(a)')
' >>> sico_init: For options CALCMOD==0, 2, 3 or -1,' 319 write(6, fmt=
'(a)')
' the separate kt domain is redundant.' 320 write(6, fmt=
'(a)')
' Therefore, consider setting KTMAX to 2.' 321 write(6, fmt=
'(a)')
' ' 329 #if (TSURFACE == 5 && ACCSURFACE != 5) 330 stop
' >>> sico_init: Options TSURFACE==5 and ACCSURFACE==5 must be used together!' 333 #if (TSURFACE != 5 && ACCSURFACE == 5) 334 stop
' >>> sico_init: Options TSURFACE==5 and ACCSURFACE==5 must be used together!' 338 #if (ACCSURFACE != 6) 339 write(6, fmt=
'(a)')
' >>> sico_init: Options TSURFACE==6, ACCSURFACE==6' 340 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!' 343 write(6, fmt=
'(a)')
' >>> sico_init: Options TSURFACE==6, ACCSURFACE==6' 344 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!' 349 #if (ACCSURFACE == 6) 351 write(6, fmt=
'(a)')
' >>> sico_init: Options TSURFACE==6, ACCSURFACE==6' 352 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!' 355 write(6, fmt=
'(a)')
' >>> sico_init: Options TSURFACE==6, ACCSURFACE==6' 356 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!' 361 #if (defined(INITMIP_SMB_ANOM_FILE) && NETCDF != 2) 362 if ( trim(adjustl(initmip_smb_anom_file)) /=
'none' )
then 363 write(6, fmt=
'(a)')
' >>> sico_init: Defining INITMIP_SMB_ANOM_FILE' 364 write(6, fmt=
'(a)')
' must be used together with NETCDF==2!' 369 #if (defined(INITMIP_BMB_ANOM_FILE) && NETCDF != 2) 370 if ( trim(adjustl(initmip_bmb_anom_file)) /=
'none' )
then 371 write(6, fmt=
'(a)')
' >>> sico_init: Defining INITMIP_BMB_ANOM_FILE' 372 write(6, fmt=
'(a)')
' must be used together with NETCDF==2!' 381 stop
' >>> sico_init: Option ADV_HOR==1 (central differences) not defined!' 389 #if ((MARGIN==3 && DYNAMICS==1) || DYNAMICS==2) /* requires SSA or SStA */ 391 write(6, fmt=
'(a)')
' >>> sico_init: Distortion correction not implemented' 392 write(6, fmt=
'(a)')
' for the shallow shelf approximation (SSA)' 393 write(6, fmt=
'(a)')
' or the shelfy stream approximation (SStA)' 394 write(6, fmt=
'(a)')
' -> GRID==0 required!' 405 #elif (TSURFACE == 5) 409 #elif (TSURFACE == 6) 419 dtime_temp0 = dtime_temp0
421 dtime_wss0 = dtime_wss0
426 dzeta_c = 1.0_dp/
real(kcmax,dp)
427 dzeta_t = 1.0_dp/
real(ktmax,dp)
428 dzeta_r = 1.0_dp/
real(krmax,dp)
437 if (deform >=
eps)
then 517 if ((i <= imax).and.(j <= jmax))
then 529 anfdatname = anfdatname
531 #if (defined(YEAR_ZERO)) 537 time_init0 = time_init0
538 time_end0 = time_end0
539 dtime_ser0 = dtime_ser0
541 #if (OUTPUT==1 || OUTPUT==3) 542 dtime_out0 = dtime_out0
545 #if (OUTPUT==2 || OUTPUT==3) 547 time_output0( 1) = time_out0_01
548 time_output0( 2) = time_out0_02
549 time_output0( 3) = time_out0_03
550 time_output0( 4) = time_out0_04
551 time_output0( 5) = time_out0_05
552 time_output0( 6) = time_out0_06
553 time_output0( 7) = time_out0_07
554 time_output0( 8) = time_out0_08
555 time_output0( 9) = time_out0_09
556 time_output0(10) = time_out0_10
557 time_output0(11) = time_out0_11
558 time_output0(12) = time_out0_12
559 time_output0(13) = time_out0_13
560 time_output0(14) = time_out0_14
561 time_output0(15) = time_out0_15
562 time_output0(16) = time_out0_16
563 time_output0(17) = time_out0_17
564 time_output0(18) = time_out0_18
565 time_output0(19) = time_out0_19
566 time_output0(20) = time_out0_20
571 shell_command =
'if [ ! -d' 572 shell_command = trim(shell_command)//
' '//outpath
573 shell_command = trim(shell_command)//
' '//
'] ; then mkdir' 574 shell_command = trim(shell_command)//
' '//outpath
575 shell_command = trim(shell_command)//
' '//
'; fi' 576 call system(trim(shell_command))
579 filename_with_path = trim(outpath)//
'/'//trim(runname)//
'.log' 581 open(10, iostat=ios, file=trim(filename_with_path), status=
'new')
583 if (ios /= 0) stop
' >>> sico_init: Error when opening the log file!' 585 write(10, fmt=trim(fmt1))
'Computational domain:' 587 write(10, fmt=trim(fmt1))
' ' 589 write(10, fmt=trim(fmt2a))
'GRID = ', grid
590 write(10, fmt=trim(fmt1))
' ' 592 write(10, fmt=trim(fmt2))
'imax =', imax
593 write(10, fmt=trim(fmt2))
'jmax =', jmax
594 write(10, fmt=trim(fmt2))
'kcmax =', kcmax
595 write(10, fmt=trim(fmt2))
'ktmax =', ktmax
596 write(10, fmt=trim(fmt2))
'krmax =', krmax
597 write(10, fmt=trim(fmt1))
' ' 599 write(10, fmt=trim(fmt3))
'a =',
aa 600 write(10, fmt=trim(fmt1))
' ' 602 #if (GRID==0 || GRID==1) 603 write(10, fmt=trim(fmt3))
'x0 =', x0
604 write(10, fmt=trim(fmt3))
'y0 =', y0
605 write(10, fmt=trim(fmt3))
'dx =', dx
607 stop
' >>> sico_init: GRID==2 not allowed for this application!' 609 write(10, fmt=trim(fmt1))
' ' 611 write(10, fmt=trim(fmt3))
'year_zero =',
year_zero 612 write(10, fmt=trim(fmt3))
'time_init =', time_init0
613 write(10, fmt=trim(fmt3))
'time_end =', time_end0
614 write(10, fmt=trim(fmt3))
'dtime =', dtime0
615 write(10, fmt=trim(fmt3))
'dtime_temp =', dtime_temp0
617 write(10, fmt=trim(fmt3))
'dtime_wss =', dtime_wss0
619 write(10, fmt=trim(fmt1))
' ' 621 write(10, fmt=trim(fmt2))
'ANF_DAT =', anf_dat
622 write(10, fmt=trim(fmt1))
'zs_present file = '//zs_present_file
624 #if (defined(ZB_PRESENT_FILE)) 625 write(10, fmt=trim(fmt1))
'zb_present file = '//zb_present_file
627 write(10, fmt=trim(fmt1))
'zl_present file = '//zl_present_file
629 write(10, fmt=trim(fmt1))
'zl0 file = '//zl0_file
630 write(10, fmt=trim(fmt1))
'mask_present file = '//mask_present_file
631 #if (ANF_DAT==1 && defined(TEMP_INIT)) 632 write(10, fmt=trim(fmt2))
'TEMP_INIT =', temp_init
635 write(10, fmt=trim(fmt1))
'Initial-value file = '//anfdatname
636 write(10, fmt=trim(fmt1))
'Path to initial-value file = '//anfdatpath
638 write(10, fmt=trim(fmt1))
' ' 641 write(10, fmt=trim(fmt3))
'time_target_topo_init =', time_target_topo_init0
642 write(10, fmt=trim(fmt3))
'time_target_topo_final =', time_target_topo_final0
643 write(10, fmt=trim(fmt1))
'Target-topography file = '//target_topo_dat_name
644 write(10, fmt=trim(fmt1))
'Path to target-topography file = '//target_topo_dat_path
645 write(10, fmt=trim(fmt1))
' ' 649 write(10, fmt=trim(fmt3))
'target_topo_tau =', target_topo_tau0
650 write(10, fmt=trim(fmt1))
'Target-topography file = '//target_topo_dat_name
651 write(10, fmt=trim(fmt1))
'Path to target-topography file = '//target_topo_dat_path
652 write(10, fmt=trim(fmt1))
' ' 656 write(10, fmt=trim(fmt1))
'Maximum ice extent mask file = '//mask_maxextent_file
657 write(10, fmt=trim(fmt1))
' ' 660 write(10, fmt=trim(fmt1))
'Physical-parameter file = '//phys_para_file
661 write(10, fmt=trim(fmt1))
' ' 663 #if (CALCTHK==2 || CALCTHK==3 || CALCTHK==5 || CALCTHK==6) 664 write(10, fmt=trim(fmt3))
'ovi_weight =', ovi_weight
665 #if (CALCTHK==2 || CALCTHK==5) 666 write(10, fmt=trim(fmt3))
'omega_sor =', omega_sor
668 write(10, fmt=trim(fmt2a))
'iter_max_sor = ', iter_max_sor
671 write(10, fmt=trim(fmt1))
' ' 675 write(10, fmt=trim(fmt3))
'delta_ts0 =', delta_ts0
677 write(10, fmt=trim(fmt3))
'sine_amplit =', sine_amplit
678 write(10, fmt=trim(fmt3))
'sine_period =', sine_period
680 write(10, fmt=trim(fmt1))
'GRIP file = '//grip_temp_file
681 write(10, fmt=trim(fmt3))
'grip_temp_fact =', grip_temp_fact
683 write(10, fmt=trim(fmt1))
'Glacial-index file = '//glac_ind_file
684 write(10, fmt=trim(fmt1))
'temp_ma_anom file = '//temp_ma_anom_file
685 write(10, fmt=trim(fmt3))
'temp_ma_anom fact = ', temp_ma_anom_fact
686 write(10, fmt=trim(fmt1))
'temp_mj_anom file = '//temp_mj_anom_file
687 write(10, fmt=trim(fmt3))
'temp_mj_anom fact = ', temp_mj_anom_fact
689 write(10, fmt=trim(fmt1))
'temp_precip_anom file = '//temp_precip_anom_file
690 write(10, fmt=trim(fmt3))
'temp_ma_anom fact = ', temp_ma_anom_fact
691 write(10, fmt=trim(fmt3))
'temp_mj_anom fact = ', temp_mj_anom_fact
694 write(10, fmt=trim(fmt1))
'precip_present_file = '//precip_present_file
695 #if (defined(PRECIP_FACTOR_FILE)) 696 if ( trim(adjustl(precip_factor_file)) /=
'none' ) &
697 write(10, fmt=trim(fmt1))
'precip_factor_file = '//precip_factor_file
700 write(10, fmt=trim(fmt3))
'accfact =', accfact
701 #elif (ACCSURFACE==2 || ACCSURFACE==3) 702 write(10, fmt=trim(fmt3))
'gamma_s =', gamma_s
703 #elif (ACCSURFACE==5) 704 write(10, fmt=trim(fmt1))
'precip_anom file = '//precip_anom_file
705 write(10, fmt=trim(fmt3))
'precip_anom fact = ', precip_anom_fact
706 #elif (ACCSURFACE==6) 707 write(10, fmt=trim(fmt1))
'temp_precip_anom file = '//temp_precip_anom_file
708 write(10, fmt=trim(fmt3))
'precip_anom fact = ', precip_anom_fact
710 #if (ACCSURFACE <= 3) 711 write(10, fmt=trim(fmt2))
'ELEV_DESERT =', elev_desert
712 #if (ELEV_DESERT == 1) 713 write(10, fmt=trim(fmt3))
'gamma_p =', gamma_p
714 write(10, fmt=trim(fmt3))
'zs_thresh =', zs_thresh
719 write(10, fmt=trim(fmt3))
'lambda_lti =', lambda_lti
720 write(10, fmt=trim(fmt3))
'temp_lti =', temp_lti
723 write(10, fmt=trim(fmt1))
' ' 725 #if (defined(INITMIP_CONST_SMB)) 726 write(10, fmt=trim(fmt2a))
'INITMIP_CONST_SMB = ', initmip_const_smb
728 #if (defined(INITMIP_SMB_ANOM_FILE)) 729 if ( trim(adjustl(initmip_smb_anom_file)) /=
'none' )
then 730 write(10, fmt=trim(fmt1))
'initmip_smb_anom file = '//initmip_smb_anom_file
733 #if (defined(INITMIP_CONST_SMB) || defined(INITMIP_SMB_ANOM_FILE)) 734 write(10, fmt=trim(fmt1))
' ' 737 write(10, fmt=trim(fmt2a))
'SEA_LEVEL = ', sea_level
739 write(10, fmt=trim(fmt3))
'z_sl0 =', z_sl0
741 write(10, fmt=trim(fmt1))
'sea-level file = '//sea_level_file
743 write(10, fmt=trim(fmt1))
' ' 746 #if (MARINE_ICE_CALVING==2 || MARINE_ICE_CALVING==3) 747 write(10, fmt=trim(fmt3))
'z_mar =', z_mar
748 write(10, fmt=trim(fmt1))
' ' 749 #elif (MARINE_ICE_CALVING==4 || MARINE_ICE_CALVING==5 \ 750 || marine_ice_calving==6 || marine_ice_calving==7)
751 write(10, fmt=trim(fmt3))
'fact_z_mar =', fact_z_mar
752 write(10, fmt=trim(fmt1))
' ' 753 #elif (MARINE_ICE_FORMATION==2 && MARINE_ICE_CALVING==9) 754 write(10, fmt=trim(fmt3))
'calv_uw_coeff =', calv_uw_coeff
755 write(10, fmt=trim(fmt3))
'r1_calv_uw =', r1_calv_uw
756 write(10, fmt=trim(fmt3))
'r2_calv_uw =', r2_calv_uw
757 write(10, fmt=trim(fmt1))
' ' 760 #if (ICE_SHELF_CALVING==2) 761 write(10, fmt=trim(fmt3))
'H_calv =', h_calv
762 write(10, fmt=trim(fmt1))
' ' 766 #if (defined(BASAL_HYDROLOGY)) 767 write(10, fmt=trim(fmt2a))
'BASAL_HYDROLOGY = ', basal_hydrology
769 write(10, fmt=trim(fmt2a))
'SLIDE_LAW = ', slide_law
770 write(10, fmt=trim(fmt3))
'c_slide =',
c_slide 771 write(10, fmt=trim(fmt3))
'gamma_slide =', gamma_slide
772 write(10, fmt=trim(fmt2a))
'p_weert = ',
p_weert 773 write(10, fmt=trim(fmt2a))
'q_weert = ',
q_weert 774 #if (defined(TIME_RAMP_UP_SLIDE)) 775 write(10, fmt=trim(fmt3))
'time_ramp_up_slide =', time_ramp_up_slide
778 write(10, fmt=trim(fmt3))
'red_pres_limit_fact =', red_pres_limit_fact
780 #if (BASAL_HYDROLOGY==1) 781 write(10, fmt=trim(fmt3))
'c_Hw_slide =', c_hw_slide
782 write(10, fmt=trim(fmt3))
'Hw0_slide =', hw0_slide
784 #if (defined(SEDI_SLIDE)) 785 write(10, fmt=trim(fmt2a))
'SEDI_SLIDE = ', sedi_slide
787 #if (defined(SEDI_SLIDE) && SEDI_SLIDE==2) 788 write(10, fmt=trim(fmt1))
'Sediment-mask file = '//mask_sedi_file
789 write(10, fmt=trim(fmt3))
'c_slide_sedi =', c_slide_sedi
790 write(10, fmt=trim(fmt3))
'gamma_slide_sedi =', gamma_slide_sedi
791 write(10, fmt=trim(fmt2a))
'p_weert_sedi = ', p_weert_sedi
792 write(10, fmt=trim(fmt2a))
'q_weert_sedi = ', q_weert_sedi
793 #if (defined(TRANS_LENGTH_SL)) 794 write(10, fmt=trim(fmt3))
'trans_length_sl =', trans_length_sl
797 write(10, fmt=trim(fmt1))
' ' 799 write(10, fmt=trim(fmt2a))
'Q_GEO_MOD = ', q_geo_mod
801 write(10, fmt=trim(fmt3))
'q_geo =',
q_geo 803 write(10, fmt=trim(fmt1))
'q_geo file = '//q_geo_file
805 write(10, fmt=trim(fmt1))
' ' 807 #if (defined(MARINE_ICE_BASAL_MELTING)) 808 write(10, fmt=trim(fmt2))
'MARINE_ICE_BASAL_MELTING =', marine_ice_basal_melting
809 #if (MARINE_ICE_BASAL_MELTING==2 || MARINE_ICE_BASAL_MELTING==3) 810 write(10, fmt=trim(fmt3))
'qbm_marine =', qbm_marine
812 write(10, fmt=trim(fmt1))
' ' 816 write(10, fmt=trim(fmt2))
'FLOATING_ICE_BASAL_MELTING =', floating_ice_basal_melting
817 #if (FLOATING_ICE_BASAL_MELTING<=3) 818 write(10, fmt=trim(fmt3))
'qbm_float_1 =', qbm_float_1
819 write(10, fmt=trim(fmt3))
'qbm_float_2 =', qbm_float_2
821 write(10, fmt=trim(fmt3))
'qbm_float_3 =', qbm_float_3
822 write(10, fmt=trim(fmt3))
'z_abyss =', z_abyss
823 #if (FLOATING_ICE_BASAL_MELTING==4) 824 write(10, fmt=trim(fmt3))
'temp_ocean =', temp_ocean
825 write(10, fmt=trim(fmt3))
'Omega_qbm =', omega_qbm
826 write(10, fmt=trim(fmt3))
'alpha_qbm =', alpha_qbm
828 #if (FLOATING_ICE_BASAL_MELTING==4 || FLOATING_ICE_BASAL_MELTING==5) 829 write(10, fmt=trim(fmt3))
'H_w_0 =', h_w_0
831 #if (defined(INITMIP_BMB_ANOM_FILE)) 832 if ( trim(adjustl(initmip_bmb_anom_file)) /=
'none' )
then 833 write(10, fmt=trim(fmt1))
'initmip_bmb_anom file = '//initmip_bmb_anom_file
836 write(10, fmt=trim(fmt1))
' ' 839 write(10, fmt=trim(fmt2))
'REBOUND =', rebound
841 write(10, fmt=trim(fmt3))
'frac_llra =', frac_llra
843 #if (REBOUND==1 || REBOUND==2) 844 write(10, fmt=trim(fmt2))
'TIME_LAG_MOD =', time_lag_mod
845 #if (TIME_LAG_MOD==1) 846 write(10, fmt=trim(fmt3))
'time_lag =', time_lag
847 #elif (TIME_LAG_MOD==2) 848 write(10, fmt=trim(fmt1))
'time_lag_file = '//time_lag_file
850 stop
' >>> sico_init: TIME_LAG_MOD must be either 1 or 2!' 854 write(10, fmt=trim(fmt2))
'FLEX_RIG_MOD =', flex_rig_mod
855 #if (FLEX_RIG_MOD==1) 856 write(10, fmt=trim(fmt3))
'flex_rig =', flex_rig
857 #elif (FLEX_RIG_MOD==2) 858 write(10, fmt=trim(fmt1))
'flex_rig_file = '//flex_rig_file
860 stop
' >>> sico_init: FLEX_RIG_MOD must be either 1 or 2!' 863 write(10, fmt=trim(fmt2))
'Q_LITHO =', q_litho
864 write(10, fmt=trim(fmt1))
' ' 867 write(10, fmt=trim(fmt3))
'gr_size =', gr_size
868 write(10, fmt=trim(fmt1))
' ' 871 write(10, fmt=trim(fmt3))
'sigma_res =', sigma_res
872 write(10, fmt=trim(fmt1))
' ' 875 write(10, fmt=trim(fmt2))
'ENHMOD =', enhmod
876 #if (ENHMOD==1 || ENHMOD==2 || ENHMOD==3) 877 write(10, fmt=trim(fmt3))
'enh_fact =', enh_fact
879 #if (ENHMOD==2 || ENHMOD==3) 880 write(10, fmt=trim(fmt3))
'enh_intg =', enh_intg
883 write(10, fmt=trim(fmt3))
'age_trans =', age_trans_0
886 write(10, fmt=trim(fmt3))
'date_trans1 =', date_trans1_0
887 write(10, fmt=trim(fmt3))
'date_trans2 =', date_trans2_0
888 write(10, fmt=trim(fmt3))
'date_trans3 =', date_trans3_0
890 #if (ENHMOD==4 || ENHMOD==5) 891 write(10, fmt=trim(fmt3))
'enh_compr =', enh_compr
892 write(10, fmt=trim(fmt3))
'enh_shear =', enh_shear
894 #if ((ENHMOD==1 || ENHMOD==2 || ENHMOD==3 || ENHMOD==4) && MARGIN==3) 895 write(10, fmt=trim(fmt3))
'enh_shelf =', enh_shelf
897 write(10, fmt=trim(fmt1))
' ' 899 write(10, fmt=trim(fmt3))
'numdiff_H_t =', numdiff_h_t
900 write(10, fmt=trim(fmt3))
'tau_cts =', tau_cts
901 write(10, fmt=trim(fmt3))
'vh_max =', vh_max
902 write(10, fmt=trim(fmt3))
'hd_min =', hd_min
903 write(10, fmt=trim(fmt3))
'hd_max =', hd_max
904 #if (defined(QBM_MIN)) 905 write(10, fmt=trim(fmt3))
'qbm_min =', qbm_min
906 #elif (defined(QB_MIN)) /* obsolete */ 907 write(10, fmt=trim(fmt3))
'qb_min =', qb_min
909 #if (defined(QBM_MAX)) 910 write(10, fmt=trim(fmt3))
'qbm_max =', qbm_max
911 #elif (defined(QB_MAX)) /* obsolete */ 912 write(10, fmt=trim(fmt3))
'qb_max =', qb_max
914 write(10, fmt=trim(fmt3))
'age_min =', age_min
915 write(10, fmt=trim(fmt3))
'age_max =', age_max
916 write(10, fmt=trim(fmt3))
'mean_accum =', mean_accum
918 write(10, fmt=trim(fmt3))
'age_diff =', agediff
920 write(10, fmt=trim(fmt1))
' ' 922 write(10, fmt=trim(fmt2a))
'DYNAMICS = ', dynamics
923 #if ((DYNAMICS==1 && MARGIN==3) || DYNAMICS==2) 924 #if (defined(LIS_OPTS)) 925 write(10, fmt=trim(fmt1))
'lis_opts = '//lis_opts
927 #if (defined(N_ITER_SSA)) 928 write(10, fmt=trim(fmt2a))
'n_iter_ssa = ', n_iter_ssa
930 #if (defined(RELAX_FACT_SSA)) 931 write(10, fmt=trim(fmt3))
'relax_fact_ssa =', relax_fact_ssa
934 #if (DYNAMICS==2 && defined(RATIO_SL_THRESH)) 935 write(10, fmt=trim(fmt3))
'ratio_sl_thresh =', ratio_sl_thresh
937 #if (DYNAMICS==2 && defined(SSTA_SIA_WEIGH_FCT)) 938 write(10, fmt=trim(fmt2a))
'SSTA_SIA_WEIGH_FCT = ', ssta_sia_weigh_fct
940 write(10, fmt=trim(fmt1))
' ' 942 write(10, fmt=trim(fmt2))
'CALCMOD =', calcmod
943 #if (CALCMOD==-1 && defined(TEMP_CONST)) 944 write(10, fmt=trim(fmt3))
'TEMP_CONST =', temp_const
946 #if (CALCMOD==-1 && defined(AGE_CONST)) 947 write(10, fmt=trim(fmt3))
'AGE_CONST =', age_const
949 #if (CALCMOD==1 && defined(CTS_MELTING_FREEZING)) 950 write(10, fmt=trim(fmt2))
'CTS_MELTING_FREEZING =', cts_melting_freezing
952 write(10, fmt=trim(fmt2))
'FLOW_LAW =', flow_law
953 write(10, fmt=trim(fmt2))
'FIN_VISC =', fin_visc
954 write(10, fmt=trim(fmt2))
'MARGIN =', margin
956 write(10, fmt=trim(fmt2))
'MARINE_ICE_FORMATION =', marine_ice_formation
957 write(10, fmt=trim(fmt2))
'MARINE_ICE_CALVING =', marine_ice_calving
959 write(10, fmt=trim(fmt2))
'ICE_SHELF_CALVING =', ice_shelf_calving
961 #if (defined(THK_EVOL)) 962 write(10, fmt=trim(fmt2))
'THK_EVOL =', thk_evol
964 stop
' >>> sico_init: Define THK_EVOL in header file!' 966 #if (defined(CALCTHK)) 967 write(10, fmt=trim(fmt2))
'CALCTHK =', calcthk
969 stop
' >>> sico_init: Define CALCTHK in header file!' 971 write(10, fmt=trim(fmt2))
'ADV_HOR =', adv_hor
972 write(10, fmt=trim(fmt2))
'ADV_VERT =', adv_vert
973 write(10, fmt=trim(fmt2))
'TOPOGRAD =', topograd
974 write(10, fmt=trim(fmt2))
'TEMP_PRESENT_PARA =', temp_present_para
975 write(10, fmt=trim(fmt2))
'TSURFACE =', tsurface
976 write(10, fmt=trim(fmt2))
'ACCSURFACE =', accsurface
978 write(10, fmt=trim(fmt2))
'PRECIP_ANOM_INTERPOL =', precip_anom_interpol
980 write(10, fmt=trim(fmt2))
'SOLID_PRECIP =', solid_precip
981 write(10, fmt=trim(fmt2))
'ABLSURFACE =', ablsurface
982 #if (defined(MB_ACCOUNT)) 983 write(10, fmt=trim(fmt2a))
'MB_ACCOUNT = ', mb_account
985 write(10, fmt=trim(fmt1))
' ' 987 #if (defined(OUT_TIMES)) 988 write(10, fmt=trim(fmt2a))
'OUT_TIMES = ', out_times
990 #if (defined(OUTPUT_INIT)) 991 write(10, fmt=trim(fmt2a))
'OUTPUT_INIT = ', output_init
993 write(10, fmt=trim(fmt2a))
'OUTPUT = ', output
994 #if (OUTPUT==1 || OUTPUT==3) 995 write(10, fmt=trim(fmt3))
'dtime_out =' , dtime_out0
997 write(10, fmt=trim(fmt3))
'dtime_ser =' , dtime_ser0
998 #if (OUTPUT==1 || OUTPUT==2) 999 write(10, fmt=trim(fmt2a))
'ERGDAT = ', ergdat
1001 write(10, fmt=trim(fmt2a))
'NETCDF = ', netcdf
1002 #if (OUTPUT==2 || OUTPUT==3) 1003 write(10, fmt=trim(fmt2a))
'n_output = ', n_output
1005 write(10, fmt=trim(fmt3))
'time_output =' , time_output0(n)
1008 write(10, fmt=trim(fmt1))
' ' 1010 write(10, fmt=trim(fmt1))
'Program version and date: '//version//
' / '//date
1012 close(10, status=
'keep')
1017 time_init = time_init0*year_sec
1018 time_end = time_end0*year_sec
1019 dtime = dtime0*year_sec
1020 dtime_temp = dtime_temp0*year_sec
1022 dtime_wss = dtime_wss0*year_sec
1024 dtime_ser = dtime_ser0*year_sec
1025 #if (OUTPUT==1 || OUTPUT==3) 1026 dtime_out = dtime_out0*year_sec
1028 #if (OUTPUT==2 || OUTPUT==3) 1030 time_output(n) = time_output0(n)*year_sec
1034 if (.not.approx_integer_multiple(dtime_temp, dtime,
eps_sp_dp)) &
1035 stop
' >>> sico_init: dtime_temp must be a multiple of dtime!' 1038 if (.not.approx_integer_multiple(dtime_wss, dtime,
eps_sp_dp)) &
1039 stop
' >>> sico_init: dtime_wss must be a multiple of dtime!' 1042 if (.not.approx_integer_multiple(dtime_ser, dtime,
eps_sp_dp)) &
1043 stop
' >>> sico_init: dtime_ser must be a multiple of dtime!' 1045 #if (OUTPUT==1 || OUTPUT==3) 1046 if (.not.approx_integer_multiple(dtime_out, dtime,
eps_sp_dp)) &
1047 stop
' >>> sico_init: dtime_out must be a multiple of dtime!' 1064 #if (GRID==0 || GRID==1) 1066 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1067 trim(precip_present_file)
1069 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1073 stop
' >>> sico_init: GRID==2 not allowed for this application!' 1077 if (ios /= 0) stop
' >>> sico_init: Error when opening the precip file!' 1079 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1085 close(21, status=
'keep')
1090 precip_factor = 1.0_dp
1092 #if (defined(PRECIP_FACTOR_FILE)) 1094 if ( trim(adjustl(precip_factor_file)) /=
'none' )
then 1096 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1097 trim(precip_factor_file)
1099 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1101 if (ios /= 0) stop
' >>> sico_init: Error when opening the precip factor file!' 1103 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1106 read(21, fmt=*) (precip_factor(j,i), i=0,imax)
1109 close(21, status=
'keep')
1132 #if (GRID==0 || GRID==1) 1134 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1135 trim(precip_anom_file)
1137 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1141 if (ios /= 0) stop
' >>> sico_init: Error when opening the precip anomaly file!' 1143 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1149 close(21, status=
'keep')
1163 #if (PRECIP_ANOM_INTERPOL==1) 1165 #elif (PRECIP_ANOM_INTERPOL==2) 1168 stop
' >>> sico_init: Wrong value of switch PRECIP_ANOM_INTERPOL!' 1179 mean_accum = mean_accum*(1.0e-03_dp/year_sec)*(
rho_w/
rho)
1184 #if (GRID==0 || GRID==1) 1186 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1187 trim(mask_present_file)
1189 open(24, iostat=ios, file=trim(filename_with_path), recl=
rcl2, status=
'old')
1193 stop
' >>> sico_init: GRID==2 not allowed for this application!' 1197 if (ios /= 0) stop
' >>> sico_init: Error when opening the mask file!' 1199 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do 1202 read(24, fmt=trim(fmt4)) (maske_ref(j,i), i=0,imax)
1205 close(24, status=
'keep')
1209 #if (defined(SEDI_SLIDE) && SEDI_SLIDE==2) 1211 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1212 trim(mask_sedi_file)
1214 open(24, iostat=ios, file=trim(filename_with_path), recl=
rcl2, status=
'old')
1216 if (ios /= 0) stop
' >>> sico_init: Error when opening the rock/sediment mask file!' 1218 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do 1221 read(24, fmt=trim(fmt4)) (
maske_sedi(j,i), i=0,imax)
1224 close(24, status=
'keep')
1242 #if (GRID==0 || GRID==1) 1244 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1245 trim(zs_present_file)
1247 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1251 stop
' >>> sico_init: GRID==2 not allowed for this application!' 1255 if (ios /= 0) stop
' >>> sico_init: Error when opening the zs file!' 1257 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1260 read(21, fmt=*) (
zs_ref(j,i), i=0,imax)
1263 close(21, status=
'keep')
1270 if (maske_ref(j,i) >= 2)
zs_ref(j,i) = 0.0_dp
1276 #if ((THK_EVOL==2) || (THK_EVOL==3)) 1278 target_topo_dat_name = trim(target_topo_dat_name)
1281 write(6, fmt=
'(a)')
' >>> sico_init: Reading of target topography' 1282 write(6, fmt=
'(a)')
' only implemented for NetCDF files (NETCDF==2)!' 1287 stop
' >>> sico_init: Parameter NETCDF must be either 1 or 2!' 1296 #if (GRID==0 || GRID==1) 1298 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1299 trim(mask_maxextent_file)
1301 open(24, iostat=ios, file=trim(filename_with_path), recl=
rcl2, status=
'old')
1305 stop
' >>> sico_init: GRID==2 not allowed for this application!' 1310 stop
' >>> sico_init: Error when opening the maximum ice extent mask file!' 1312 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do 1318 close(24, status=
'keep')
1327 #if (GRID==0 || GRID==1) 1329 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1330 trim(temp_ma_anom_file)
1332 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1336 if (ios /= 0) stop
' >>> sico_init: Error when opening the temp_ma anomaly file!' 1338 #if (GRID==0 || GRID==1) 1340 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1341 trim(temp_mj_anom_file)
1343 open(22, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1347 if (ios /= 0) stop
' >>> sico_init: Error when opening the temp_mj anomaly file!' 1349 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1350 do n=1, 6;
read(22, fmt=
'(a)') ch_dummy;
end do 1357 close(21, status=
'keep')
1358 close(22, status=
'keep')
1369 filename_with_path = trim(inpath)//
'/general/'//trim(grip_temp_file)
1371 open(21, iostat=ios, file=trim(filename_with_path), status=
'old')
1373 if (ios /= 0) stop
' >>> sico_init: Error when opening the data file for delta_ts!' 1377 if (ch_dummy /=
'#')
then 1378 write(6, fmt=*)
' >>> sico_init: grip_time_min, grip_time_stp, grip_time_max' 1379 write(6, fmt=*)
' not defined in data file for delta_ts!' 1388 read(21, fmt=*) d_dummy,
griptemp(n)
1391 close(21, status=
'keep')
1399 filename_with_path = trim(inpath)//
'/general/'//trim(glac_ind_file)
1401 open(21, iostat=ios, file=trim(filename_with_path), status=
'old')
1403 if (ios /= 0) stop
' >>> sico_init: Error when opening the glacial-index file!' 1407 if (ch_dummy /=
'#')
then 1408 write(6, fmt=*)
' >>> sico_init: gi_time_min, gi_time_stp, gi_time_max' 1409 write(6, fmt=*)
' not defined in glacial-index file!' 1421 close(21, status=
'keep')
1428 #if (TSURFACE==6 && ACCSURFACE==6) 1431 '/'//trim(temp_precip_anom_file)
1433 call check( nf90_open(trim(filename_with_path), nf90_nowrite, &
1461 #if (defined(INITMIP_SMB_ANOM_FILE)) 1463 if ( trim(adjustl(initmip_smb_anom_file)) /=
'none' )
then 1466 '/'//trim(initmip_smb_anom_file)
1468 call check( nf90_open(trim(filename_with_path), nf90_nowrite, ncid), &
1471 call check( nf90_inq_varid(ncid,
'asmb', ncv) )
1472 call check( nf90_get_var(ncid, ncv, as_anom_initmip_conv) )
1474 call check( nf90_close(ncid) )
1478 as_anom_initmip(j,i) =
real(as_anom_initmip_conv(i,j),dp) /YEAR_SEC
1484 as_anom_initmip = 0.0_dp
1491 #if (defined(INITMIP_BMB_ANOM_FILE)) 1493 if ( trim(adjustl(initmip_bmb_anom_file)) /=
'none' )
then 1496 '/'//trim(initmip_bmb_anom_file)
1498 call check( nf90_open(trim(filename_with_path), nf90_nowrite, ncid), &
1501 call check( nf90_inq_varid(ncid,
'abmb', ncv) )
1502 call check( nf90_get_var(ncid, ncv, ab_anom_initmip_conv) )
1504 call check( nf90_close(ncid) )
1508 ab_anom_initmip(j,i) =
real(ab_anom_initmip_conv(i,j),dp) /YEAR_SEC
1514 ab_anom_initmip = 0.0_dp
1523 filename_with_path = trim(inpath)//
'/general/'//trim(sea_level_file)
1525 open(21, iostat=ios, file=trim(filename_with_path), status=
'old')
1527 if (ios /= 0) stop
' >>> sico_init: Error when opening the data file for z_sl!' 1531 if (ch_dummy /=
'#')
then 1532 write(6, fmt=*)
' >>> sico_init: specmap_time_min, specmap_time_stp, specmap_time_max' 1533 write(6, fmt=*)
' not defined in data file for z_sl!' 1545 close(21, status=
'keep')
1561 #elif (Q_GEO_MOD==2) 1565 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1568 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1570 if (ios /= 0) stop
' >>> sico_init: Error when opening the qgeo file!' 1572 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1575 read(21, fmt=*) (
q_geo(j,i), i=0,imax)
1578 close(21, status=
'keep')
1590 #if (REBOUND==0 || REBOUND==1) 1603 #if (REBOUND==1 || REBOUND==2) 1605 #if (TIME_LAG_MOD==1) 1609 #elif (TIME_LAG_MOD==2) 1611 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1614 open(29, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1616 if (ios /= 0) stop
' >>> sico_init: Error when opening the time-lag file!' 1618 do n=1, 6;
read(29, fmt=
'(a)') ch_dummy;
end do 1624 close(29, status=
'keep')
1640 #if (FLEX_RIG_MOD==1) 1644 #elif (FLEX_RIG_MOD==2) 1646 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1649 open(29, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1651 if (ios /= 0) stop
' >>> sico_init: Error when opening the flex-rig file!' 1653 do n=1, 6;
read(29, fmt=
'(a)') ch_dummy;
end do 1659 close(29, status=
'keep')
1663 #elif (REBOUND==0 || REBOUND==1) 1679 call boundary(time_init, dtime, dxi, deta, &
1680 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1696 #if (!defined(TEMP_INIT) || TEMP_INIT==1) 1698 #elif (TEMP_INIT==2) 1700 #elif (TEMP_INIT==3) 1702 #elif (TEMP_INIT==4) 1705 write(6, fmt=
'(a)')
' >>> sico_init:' 1706 write(6, fmt=
'(a)')
' TEMP_INIT must be set to either 1, 2, 3 or 4!' 1721 stop
' >>> sico_init: Parameter ENHMOD must be between 1 and 5!' 1732 call boundary(time_init, dtime, dxi, deta, &
1733 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1757 stop
' >>> sico_init: Parameter ENHMOD must be between 1 and 5!' 1766 call boundary(time_init, dtime, dxi, deta, &
1767 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1798 #if (MARGIN==1 || MARGIN==2) 1807 if ( (
maske(j,i)==0_i2b) &
1809 ( (
maske(j,i+1)==3_i2b) &
1810 .or.(
maske(j,i-1)==3_i2b) &
1811 .or.(
maske(j+1,i)==3_i2b) &
1812 .or.(
maske(j-1,i)==3_i2b) ) &
1816 if ( (
maske(j,i)==3_i2b) &
1818 ( (
maske(j,i+1)==0_i2b) &
1819 .or.(
maske(j,i-1)==0_i2b) &
1820 .or.(
maske(j+1,i)==0_i2b) &
1821 .or.(
maske(j-1,i)==0_i2b) ) &
1825 if ( (
maske(j,i)==3_i2b) &
1827 ( (
maske(j,i+1)==2_i2b) &
1828 .or.(
maske(j,i-1)==2_i2b) &
1829 .or.(
maske(j+1,i)==2_i2b) &
1830 .or.(
maske(j-1,i)==2_i2b) ) &
1834 if ( (
maske(j,i)==2_i2b) &
1836 ( (
maske(j,i+1)==3_i2b) &
1837 .or.(
maske(j,i-1)==3_i2b) &
1838 .or.(
maske(j+1,i)==3_i2b) &
1839 .or.(
maske(j-1,i)==3_i2b) ) &
1849 if ( (
maske(j,i)==2_i2b) &
1850 .and. (
maske(j+1,i)==3_i2b) &
1855 if ( (
maske(j,i)==2_i2b) &
1856 .and. (
maske(j-1,i)==3_i2b) &
1865 if ( (
maske(j,i)==2_i2b) &
1866 .and. (
maske(j,i+1)==3_i2b) &
1871 if ( (
maske(j,i)==2_i2b) &
1872 .and. (
maske(j,i-1)==3_i2b) &
1879 stop
' >>> sico_init: MARGIN must be either 1, 2 or 3!' 1884 #if (defined(SEDI_SLIDE) && SEDI_SLIDE==2 && defined(TRANS_LENGTH_SL)) 1889 r_mask_sedi(j,i) = 0.0_dp
1891 r_mask_sedi(j,i) = 1.0_dp
1896 if (trans_length_sl >
eps)
then 1899 write(6, fmt=
'(a)')
' >>> sico_init: Specifying a transition length' 1900 write(6, fmt=
'(a)')
' TRANS_LENGTH_SL > 0 for the basal sliding' 1901 write(6, fmt=
'(a)')
' regimes requires P_WEERT==P_WEERT_SEDI' 1902 write(6, fmt=
'(a)')
' and Q_WEERT==Q_WEERT_SEDI!' 1906 transition_length_sliding = trans_length_sl *1.0e+03_dp
1908 quasi_time = 0.25_dp*transition_length_sliding**2
1911 d_quasi_time = 0.1_dp*quasi_time
1915 if ( d_quasi_time < 0.1_dp*min(dxi,deta)**2 )
exit 1917 d_quasi_time = 0.5_dp*d_quasi_time
1920 m = nint(quasi_time/d_quasi_time)
1924 r_mask_sedi_new = r_mask_sedi
1928 r_mask_sedi_new(j,i) = r_mask_sedi(j,i) &
1929 + d_quasi_time/dxi**2 &
1930 * (r_mask_sedi(j,i+1)-2.0_dp*r_mask_sedi(j,i)+r_mask_sedi(j,i-1)) &
1931 + d_quasi_time/deta**2 &
1932 * (r_mask_sedi(j+1,i)-2.0_dp*r_mask_sedi(j,i)+r_mask_sedi(j-1,i))
1937 r_mask_sedi = r_mask_sedi_new
1947 #if (GRID==0 || GRID==1) 1951 dist_dxdy(jr,ir) = sqrt( (
real(ir,dp)*dxi)**2 + (
real(jr,dp)*deta)**2 )
1962 #if (DYNAMICS==1 || DYNAMICS==2) 1967 #if (MARGIN==3 || DYNAMICS==2) 1968 call calc_vxy_ssa(z_sl, dxi, deta, dzeta_c, dzeta_t, ii, jj, nn)
1983 stop
' >>> sico_init: DYNAMICS must be either 0, 1 or 2!' 1986 call calc_dxyz(dxi, deta, dzeta_c, dzeta_t)
1990 #if (CALCMOD==0 || CALCMOD==-1) 2015 if ( (
maske(j,i) == 0_i2b).and.(
n_cts(j,i) == 1_i2b) )
then 2028 #elif (CALCMOD==2 || CALCMOD==3) 2046 stop
' >>> sico_init: Parameter CALCMOD must be either -1, 0, 1, 2 or 3!' 2054 filename_with_path = trim(outpath)//
'/'//trim(runname)//
'.ser' 2056 open(12, iostat=ios, file=trim(filename_with_path), status=
'new')
2058 if (ios /= 0) stop
' >>> sico_init: Error when opening the ser file!' 2065 1102
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
2066 ' V(m^3) V_g(m^3) V_f(m^3)', &
2067 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
2068 ' V_sle(m) V_t(m^3)', &
2070 ' H_max(m) H_t_max(m)', &
2071 ' zs_max(m) vs_max(m/a) Tbh_max(C)')
2072 1103
format(
'----------------------------------------------------', &
2073 '---------------------------------------')
2080 1112
format(
' t(a) glac_ind(1) z_sl(m)',/, &
2081 ' V(m^3) V_g(m^3) V_f(m^3)', &
2082 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
2083 ' V_sle(m) V_t(m^3)', &
2085 ' H_max(m) H_t_max(m)', &
2086 ' zs_max(m) vs_max(m/a) Tbh_max(C)')
2087 1113
format(
'----------------------------------------------------', &
2088 '---------------------------------------')
2095 1122
format(
' t(a) (Dummy)(1) z_sl(m)',/, &
2096 ' V(m^3) V_g(m^3) V_f(m^3)', &
2097 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
2098 ' V_sle(m) V_t(m^3)', &
2100 ' H_max(m) H_t_max(m)', &
2101 ' zs_max(m) vs_max(m/a) Tbh_max(C)')
2102 1123
format(
'----------------------------------------------------', &
2103 '---------------------------------------')
2138 #if (GRID==0 || GRID==1) /* Stereographic projection */ 2145 #elif (GRID==2) /* Geographical coordinates */ 2152 filename_with_path = trim(outpath)//
'/'//trim(runname)//
'.core' 2154 open(14, iostat=ios, file=trim(filename_with_path), status=
'new')
2156 if (ios /= 0) stop
' >>> sico_init: Error when opening the core file!' 2163 1106
format(
' t(a) D_Ts(C) z_sl(m)',/, &
2164 ' H_Vo(m) H_DA(m) H_DC(m)', &
2165 ' H_DF(m) H_Ko(m) H_By(m)',/, &
2166 ' v_Vo(m/a) v_DA(m/a) v_DC(m/a)', &
2167 ' v_DF(m/a) v_Ko(m/a) v_By(m/a)',/, &
2168 ' T_Vo(C) T_DA(C) T_DC(C)', &
2169 ' T_DF(C) T_Ko(C) T_By(C)')
2170 1107
format(
'----------------------------------------------------', &
2171 '---------------------------------------')
2178 1116
format(
' t(a) glac_ind(1) z_sl(m)',/, &
2179 ' H_Vo(m) H_DA(m) H_DC(m)', &
2180 ' H_DF(m) H_Ko(m) H_By(m)',/, &
2181 ' v_Vo(m/a) v_DA(m/a) v_DC(m/a)', &
2182 ' v_DF(m/a) v_Ko(m/a) v_By(m/a)',/, &
2183 ' T_Vo(C) T_DA(C) T_DC(C)', &
2184 ' T_DF(C) T_Ko(C) T_By(C)')
2185 1117
format(
'----------------------------------------------------', &
2186 '---------------------------------------')
2193 1126
format(
' t(a) (Dummy)(1) z_sl(m)',/, &
2194 ' H_Vo(m) H_DA(m) H_DC(m)', &
2195 ' H_DF(m) H_Ko(m) H_By(m)',/, &
2196 ' v_Vo(m/a) v_DA(m/a) v_DC(m/a)', &
2197 ' v_DF(m/a) v_Ko(m/a) v_By(m/a)',/, &
2198 ' T_Vo(C) T_DA(C) T_DC(C)', &
2199 ' T_DF(C) T_Ko(C) T_By(C)')
2200 1127
format(
'----------------------------------------------------', &
2201 '---------------------------------------')
2207 #if (defined(OUTPUT_INIT)) 2209 #if (OUTPUT_INIT==0) 2210 flag_init_output = .false.
2211 #elif (OUTPUT_INIT==1) 2212 flag_init_output = .true.
2214 stop
' >>> sico_init: OUTPUT_INIT must be either 0 or 1!' 2218 flag_init_output = .true.
2224 flag_3d_output = .false.
2226 flag_3d_output = .true.
2228 stop
' >>> sico_init: ERGDAT must be either 0 or 1!' 2231 if (flag_init_output) &
2232 call output1(runname, time_init, delta_ts, glac_index, z_sl, &
2233 flag_3d_output, ndat2d, ndat3d)
2237 if (time_output(1) <= time_init+
eps)
then 2240 flag_3d_output = .false.
2242 flag_3d_output = .true.
2244 stop
' >>> sico_init: ERGDAT must be either 0 or 1!' 2247 call output1(runname, time_init, delta_ts, glac_index, z_sl, &
2248 flag_3d_output, ndat2d, ndat3d)
2254 flag_3d_output = .false.
2256 if (flag_init_output) &
2257 call output1(runname, time_init, delta_ts, glac_index, z_sl, &
2258 flag_3d_output, ndat2d, ndat3d)
2260 if (time_output(1) <= time_init+
eps)
then 2262 flag_3d_output = .true.
2264 call output1(runname, time_init, delta_ts, glac_index, z_sl, &
2265 flag_3d_output, ndat2d, ndat3d)
2270 stop
' >>> sico_init: OUTPUT must be either 1, 2 or 3!' 2273 if (flag_init_output)
then 2274 call output2(time_init, dxi, deta, delta_ts, glac_index, z_sl)
2275 call output4(time_init, dxi, deta, delta_ts, glac_index, z_sl)
2287 #if (GRID==0 || GRID==1) 2296 real(dp),
intent(out) :: dxi, deta
2298 integer(i4b) :: i, j, n
2299 integer(i4b) :: ios, n_dummy
2301 real(dp) :: xi0, eta0
2302 real(dp) :: H_ice, freeboard_ratio
2303 character :: ch_dummy
2305 character(len= 8) :: ch_imax
2306 character(len=128) :: fmt4
2307 character(len=256) :: filename_with_path
2309 write(ch_imax, fmt=
'(i8)') imax
2310 write(fmt4, fmt=
'(a)')
'('//trim(adjustl(ch_imax))//
'(i1),i1)' 2314 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2315 trim(zs_present_file)
2317 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2319 if (ios /= 0) stop
' >>> topography1: Error when opening the zs file!' 2321 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2322 trim(zl_present_file)
2324 open(22, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2326 if (ios /= 0) stop
' >>> topography1: Error when opening the zl file!' 2328 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2331 open(23, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2333 if (ios /= 0) stop
' >>> topography1: Error when opening the zl0 file!' 2335 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2336 trim(mask_present_file)
2338 open(24, iostat=ios, file=trim(filename_with_path), recl=
rcl2, status=
'old')
2340 if (ios /= 0) stop
' >>> topography1: Error when opening the mask file!' 2342 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 2343 do n=1, 6;
read(22, fmt=
'(a)') ch_dummy;
end do 2344 do n=1, 6;
read(23, fmt=
'(a)') ch_dummy;
end do 2345 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do 2348 read(21, fmt=*) (
zs(j,i), i=0,imax)
2349 read(22, fmt=*) (
zl(j,i), i=0,imax)
2350 read(23, fmt=*) (
zl0(j,i), i=0,imax)
2351 read(24, fmt=trim(fmt4)) (
maske(j,i), i=0,imax)
2354 close(21, status=
'keep')
2355 close(22, status=
'keep')
2356 close(23, status=
'keep')
2357 close(24, status=
'keep')
2359 #if (defined(ZB_PRESENT_FILE)) 2361 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2362 trim(zb_present_file)
2364 open(25, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2366 if (ios /= 0) stop
' >>> topography1: Error when opening the zb file!' 2368 do n=1, 6;
read(25, fmt=
'(a)') ch_dummy;
end do 2371 read(25, fmt=*) (
zb(j,i), i=0,imax)
2374 close(25, status=
'keep')
2378 write(6, fmt=
'(a)')
' >>> topography1: ZB_PRESENT_FILE not defined,' 2379 write(6, fmt=
'(a)')
' thus zb = zl assumed.' 2388 deta = dx *1000.0_dp
2391 eta0 = y0 *1000.0_dp
2398 if (
maske(j,i) <= 1)
then 2402 else if (
maske(j,i) == 2)
then 2404 #if (MARGIN==1 || MARGIN==2) 2412 else if (
maske(j,i) == 3)
then 2414 #if (MARGIN==1 || (MARGIN==2 && MARINE_ICE_FORMATION==1)) 2418 #elif (MARGIN==2 && MARINE_ICE_FORMATION==2) 2420 h_ice =
zs(j,i)-
zb(j,i)
2421 zs(j,i) =
zl(j,i)+h_ice
2424 h_ice =
zs(j,i)-
zb(j,i)
2425 zs(j,i) = freeboard_ratio*h_ice
2426 zb(j,i) =
zs(j,i)-h_ice
2431 xi(i) = xi0 +
real(i,
dp)*dxi
2432 eta(j) = eta0 +
real(j,
dp)*deta
2459 #if (GRID==0 || GRID==1) /* Stereographic projection */ 2464 #elif (GRID==2) /* Geographic coordinates */ 2499 #if (GRID==0 || GRID==1) 2508 real(dp),
intent(out) :: dxi, deta
2510 integer(i4b) :: i, j, n
2512 real(dp) :: xi0, eta0
2513 character :: ch_dummy
2515 character(len= 8) :: ch_imax
2516 character(len=128) :: fmt4
2517 character(len=256) :: filename_with_path
2519 write(ch_imax, fmt=
'(i8)') imax
2520 write(fmt4, fmt=
'(a)')
'('//trim(adjustl(ch_imax))//
'(i1),i1)' 2524 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2527 open(23, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2529 if (ios /= 0) stop
' >>> topography2: Error when opening the zl0 file!' 2531 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2532 trim(mask_present_file)
2534 open(24, iostat=ios, file=trim(filename_with_path), recl=
rcl2, status=
'old')
2536 if (ios /= 0) stop
' >>> topography2: Error when opening the mask file!' 2538 do n=1, 6;
read(23, fmt=
'(a)') ch_dummy;
end do 2539 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do 2542 read(23, fmt=*) (
zl0(j,i), i=0,imax)
2543 read(24, fmt=trim(fmt4)) (
maske(j,i), i=0,imax)
2546 close(23, status=
'keep')
2547 close(24, status=
'keep')
2552 deta = dx *1000.0_dp
2555 eta0 = y0 *1000.0_dp
2560 if (
maske(j,i) <= 1)
then 2567 #if (MARGIN==1 || MARGIN==2) 2577 xi(i) = xi0 +
real(i,
dp)*dxi
2578 eta(j) = eta0 +
real(j,
dp)*deta
2605 #if (GRID==0 || GRID==1) /* Stereographic projection */ 2610 #elif (GRID==2) /* Geographic coordinates */ 2643 subroutine topography3(dxi, deta, z_sl, anfdatname)
2647 #if (GRID==0 || GRID==1) 2656 character(len=100),
intent(in) :: anfdatname
2658 real(dp),
intent(out) :: dxi, deta, z_sl
2660 integer(i4b) :: i, j, n
2662 character(len=256) :: filename_with_path
2663 character :: ch_dummy
2671 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2674 open(23, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2676 if (ios /= 0) stop
' >>> topography3: Error when opening the zl0 file!' 2678 do n=1, 6;
read(23, fmt=
'(a)') ch_dummy;
end do 2681 read(23, fmt=*) (
zl0(j,i), i=0,imax)
2684 close(23, status=
'keep')
2689 deta = dx *1000.0_dp
2697 #if (GRID==0 || GRID==1) /* Stereographic projection */ 2702 #elif (GRID==2) /* Geographic coordinates */ real(dp), dimension(0:kcmax, 0:jmax, 0:imax) temp_c
temp_c(kc,j,i): Temperature in the upper (kc) ice domain
real(dp), dimension(0:jmax, 0:imax) c_slide
c_slide(j,i): Basal sliding coefficient
real(dp), dimension(0:jmax, 0:imax) phi
phi(j,i): Geographic latitude of grid point (i,j)
subroutine, public read_erg_nc(z_sl, filename)
Reading of time-slice files in native binary or NetCDF format.
real(dp), dimension(:), allocatable phi_core
phi_core(n): Geographical latitude of the prescribed borehole positions
subroutine, public read_kei()
Reading of the tabulated kei function.
logical, dimension(0:jmax, 0:imax) flag_inner_point
flag_inner_point(j,i): Inner-point flag. .true.: inner point, .false.: margin point ...
integer(i4b) grip_time_stp
grip_time_stp: Time step of the data values for the surface temperature anomaly
integer(i2b), dimension(0:jmax, 0:imax) n_cts
n_cts(j,i): Mask for thermal conditions. -1: cold ice base, 0: temperate ice base with cold ice above...
integer(i4b) ndata_specmap
ndata_specmap: Number of data values for the sea level
integer(i2b), dimension(0:jmax, 0:imax) n_sector
n_sector(j,i): Marker for the different sectors for ice shelf basal melting.
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_...
real(dp), dimension(0:kcmax) eaz_c
eaz_c(kc): Abbreviation for exp(aa*zeta(kc))
real(dp), dimension(0:jmax, 0:imax) q_geo
q_geo(j,i): Geothermal heat flux
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)
Main routine of sico_init_m: Initialisations for SICOPOLIS.
real(dp) rho_w
RHO_W: Density of pure water.
subroutine, public calc_enhance_2()
Computation of the flow enhancement factor. Case ENHMOD==2: two different values depending on age for...
real(dp) a
A: Semi-major axis of the planet.
subroutine, public calc_vz_floating(z_sl, dxi, deta, dzeta_c)
Computation of the vertical velocity vz for floating ice.
subroutine, public output1(runname, time, delta_ts, glac_index, z_sl, flag_3d_output, ndat2d, ndat3d)
Writing of time-slice files in native binary or NetCDF format.
integer(i4b) specmap_time_max
specmap_time_max: Maximum time of the data values for the sea level
Material properties of ice: Rate factor, heat conductivity, specific heat (heat capacity), creep function, viscosity.
real(dp) temp_precip_time_stp
temp_precip_time_stp: Time step of the surface-temperature and precipitation data ...
real(dp), parameter eps
eps: Small number
subroutine, public read_phys_para()
Reading of physical parameters.
integer(i2b), dimension(0:jmax, 0:imax) maske_maxextent
maske_maxextent(j,i): Maximum ice extent mask. 0: not allowed to glaciate, 1: allowed to glaciate...
integer(i2b) forcing_flag
forcing_flag: Flag for the forcing type. 1: forcing by a spatially constant surface temperature anoma...
real(dp) temp_precip_time_max
temp_precip_time_max: Maximum time of the surface-temperature and precipitation data ...
logical, dimension(0:jmax, 0:imax) flag_grounding_line_1
flag_grounding_line_1(j,i): Grounding line flag. .true.: grounding line point (grounded ice point wit...
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) enth_t
enth_t(kt,j,i): Enthalpy in the lower (kt) ice domain
Conversion from temperature (temp) and water content (omega) to enthalpy (enth) and vice versa...
subroutine, public init_temp_water_age_2()
Initial temperature, water content and age (case ANF_DAT==2: ice-free conditions with relaxed bedrock...
real(dp), dimension(0:jmax, 0:imax) dh_t_dtau
dH_t_dtau(j,i): Derivative of H_t by tau (time)
real(dp), dimension(0:jmax, 0:imax) lambda
lambda(j,i): Geographic longitude of grid point (i,j)
real(dp), dimension(0:jmax, 0:imax) dh_c_dtau
dH_c_dtau(j,i): Derivative of H_c by tau (time)
integer(i2b), dimension(0:jmax, 0:imax) maske
maske(j,i): Ice-land-ocean mask. 0: grounded ice, 1: ice-free land, 2: ocean, 3: floating ice ...
real(dp), dimension(0:jmax, 0:imax) p_b_w
p_b_w(j,i): Basal water pressure
integer(i4b) specmap_time_min
specmap_time_min: Minimum time of the data values for the sea level
real(dp), dimension(0:jmax, 0:imax) as_perp
as_perp(j,i): Accumulation-ablation function at the ice surface (SMB)
real(dp), dimension(0:jmax, 0:imax) area
area(j,i): Area of grid cell associated with grid point (i,j)
real(dp), dimension(:), allocatable glacial_index
glacial_index(n): Data values for the glacial index
Computation of all components of the strain-rate tensor, the full effective strain rate and the shear...
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) temp_t_m
temp_t_m(kt,j,i): Melting temperature in the lower (kt) ice domain
integer(i2b), dimension(0:jmax, 0:imax) maske_sedi
maske_sedi(j,i): Sediment mask. 1: hard rock, 7: soft sediment, 2: ocean.
subroutine, public stereo_inv_ellipsoid(x_val, y_val, A, B, lambda0, phi0, lambda_val, phi_val)
Inverse stereographic projection for an ellipsoidal planet.
subroutine topograd_1(dxi, deta, n_switch)
Calculation of topography gradients on the staggered grid and on the grid points (the latter by secon...
real(dp), dimension(0:jmax, 0:imax) zs_ref
zs_ref(j,i): Reference elevation for precip_present, temp_ma_present and temp_mj_present ...
real(dp) target_topo_tau
target_topo_tau: Relaxation time for target-topography adjustment
subroutine, public calc_enhance_5()
Computation of the flow enhancement factor. Case ENHMOD==5: minimal anisotropic enhancement factor fo...
real(dp) b
B: Semi-minor axis of the planet.
subroutine, public init_temp_water_age_1_2()
Initial temperature, water content and age (case ANF_DAT==1, TEMP_INIT==2: present-day initial topogr...
real(dp), dimension(0:jmax, 0:imax) zl
zl(j,i): Coordinate z of the lithosphere surface
subroutine, public calc_vxy_static()
Computation of the horizontal velocity vx, vy, the horizontal volume flux qx, qy etc. for static ice.
subroutine, public output4(time, dxi, deta, delta_ts, glac_index, z_sl)
Writing of time-series data of the deep ice cores on file in ASCII format (and optionally in NetCDF f...
integer(i2b), dimension(0:jmax, 0:imax) kc_cts
kc_cts(j,i): Position kc of the CTS (for COLD, ENTC, ENTM)
integer(i4b) grip_time_max
grip_time_max: Maximum time of the data values for the surface temperature anomaly ...
real(dp), dimension(0:jmax, 0:imax) q_tld
Q_tld(j,i): Water drainage rate from the temperate layer.
subroutine, public calc_vxy_ssa(z_sl, dxi, deta, dzeta_c, dzeta_t, ii, jj, nn)
Computation of the horizontal velocity vx, vy, the horizontal volume flux qx, qy and the flux across ...
Declarations of global variables for SICOPOLIS (for the ANT domain).
integer(i4b), parameter rcl1
rcl1: Maximum length of record for input files (with factor 3 safety margin)
Initialisations for SICOPOLIS.
integer(i4b) ndata_gi
ndata_gi: Number of data values for the glacial index
Computation of the flow enhancement factor.
integer(i4b) ndata_grip
ndata_grip: Number of data values for the surface temperature anomaly
Computation of the horizontal velocity vx, vy.
integer(i4b), dimension(0:jmax, 0:imax) q_weert
q_weert(j,i): Weertman exponent for the basal pressure
subroutine, public calc_temp_melt()
Computation of the melting temperatures.
real(dp) ea
ea: Abbreviation for exp(aa)
real(dp), parameter pi_180
pi_180: pi divided by 180 (-> deg to rad)
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) enth_c
enth_c(kc,j,i): Enthalpy in the upper (kc) ice domain
logical flag_aa_nonzero
flag_aa_nonzero: Flag for the exponential stretch parameter aa. .true.: aa greater than zero (non-equ...
Initial temperature, water content and age.
subroutine, public calc_vz_grounded(dxi, deta, dzeta_c, dzeta_t)
Computation of the vertical velocity vz for grounded ice.
real(dp) aa
aa: Exponential stretch parameter of the non-equidistant vertical grid in the upper (kc) ice domain ...
Reading of several input data.
Declarations of kind types for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) zs
zs(j,i): Coordinate z of the surface topography
real(dp), dimension(0:jmax, 0:imax) precip_ma_present
precip_ma_present(j,i): Present-day mean annual precipitation rate at the ice surface ...
integer(i4b) gi_time_min
gi_time_min: Minimum time of the data values for the glacial index
real(dp), dimension(0:jmax, 0:imax) h_c
H_c(j,i): Thickness of ice in the upper (kc) domain (thickness of the cold-ice layer for POLY...
real(dp) temp_precip_time_min
temp_precip_time_min: Minimum time of the surface-temperature and precipitation data ...
subroutine, public stereo_forw_ellipsoid(lambda_val, phi_val, A, B, lambda0, phi0, x_val, y_val)
Forward stereographic projection for an ellipsoidal planet.
real(dp) kei_r_max
kei_r_max: Maximum value of the argument r of the tabulated kei function
real(dp) year_zero
year_zero: SICOPOLIS year zero in astronomical year numbering [ = signed year CE (AD) ] ...
real(dp), dimension(:), allocatable specmap_zsl
specmap_zsl(n): Data values for the sea level
Computation of the melting and basal temperatures.
subroutine topograd_2(dxi, deta, n_switch)
Calculation of topography gradients on the staggered grid and on the grid points (the latter by fourt...
real(dp), dimension(-190:10) kappa
KAPPA(n): Tabulated values for the heat conductivity of ice.
Computation of the vertical velocity vz.
integer(i4b) gi_time_stp
gi_time_stp: Time step of the data values for the glacial index
integer(i4b) ndata_temp_precip
ndata_temp_precip: Number of surface-temperature and precipitation data
real(dp), dimension(0:jmax, 0:imax) dzm_dtau
dzm_dtau(j,i): Derivative of zm by tau (time)
real(dp), dimension(0:krmax) zeta_r
zeta_r(kr): Sigma coordinate zeta_r of grid point kr
real(dp), dimension(0:kcmax, 0:jmax, 0:imax) omega_c
omega_c(kc,j,i): Water content in the upper (kc) ice domain
real(dp), dimension(:), allocatable y_core
y_core(n): Coordinate eta (= y) of the prescribed borehole positions
real(dp), dimension(:), allocatable temp_precip_time
temp_precip_time(n): Times of the surface-temperature and precipitation data
integer(i2b), dimension(0:jmax, 0:imax) maske_old
maske_old(j,i): Old value of maske (at the previous time step)
character(len=64) ch_domain_long
ch_domain_long: Long name of the computational domain
Definition of the components g11 and g22 of the metric tensor of the applied numerical coordinates...
real(dp), dimension(0:jmax, 0:imax) precip_ma_lgm_anom
precip_ma_lgm_anom(j,i): LGM anomaly (ratio LGM/present) of the mean annual precipitation rate at the...
Computation of the forward or inverse stereographic projection, alternatively for a spherical or an e...
real(dp), dimension(0:jmax, 0:imax) zl0
zl0(j,i): zl for isostatically relaxed ice-free conditions
subroutine, public calc_vz_static()
Computation of the vertical velocity vz for static ice.
integer(i4b) gi_time_max
gi_time_max: Maximum time of the data values for the glacial index
real(dp) phi0
PHI0: Standard parallel of the stereographic projection.
subroutine, public ice_mat_eqs_pars(RF_table, R_T_val, KAPPA_table, C_table, n_tmp_min, n_tmp_max, RHO_I_val, RHO_C_val, KAPPA_C_val, C_C_val)
Setting of required physical parameters.
real(dp), dimension(0:jmax, 0:imax, 12) gamma_precip_lgm_anom
gamma_precip_lgm_anom(j,i,n): negative natural logarithm of precip_lgm_anom(j,i,n) ...
Comparison of single- or double-precision floating-point numbers.
real(dp) time_target_topo_final
time_target_topo_final: Final time for target-topography adjustment
subroutine, public calc_enhance_1()
Computation of the flow enhancement factor. Case ENHMOD==1: constant for grounded ice...
real(dp), dimension(0:jmax, 0:imax) zm
zm(j,i): Coordinate z of the bottom of the upper (kc) ice domain = top of the lower (kt) ice domain (...
real(dp), dimension(0:jmax, 0:imax) temp_mj_lgm_anom
temp_mj_lgm_anom(j,i): LGM anomaly (difference LGM - present) of the mean summer (northern hemisphere...
real(dp), dimension(-190:10) rf
RF(n): Tabulated values for the rate factor of cold ice.
real(dp), dimension(0:jmax, 0:imax) q_b_tot
Q_b_tot(j,i): Sum of Q_bm and Q_tld.
real(dp), dimension(0:jmax, 0:imax) q_bm
Q_bm(j,i): Basal melting rate.
real(dp) function, public enth_fct_temp_omega(temp_val, omega_val)
Enthalpy as a function of temperature and water content.
subroutine, public calc_vxy_sia(dzeta_c, dzeta_t)
Computation of the shear stresses txz, tyz, the effective shear stress sigma, the depth-averaged flui...
real(dp), dimension(-190:10) c
C(n): Tabulated values for the specific heat of ice.
real(dp), dimension(0:kcmax) eaz_c_quotient
eaz_c_quotient(kc): Abbreviation for (eaz_c(kc)-1.0)/(ea-1.0)
real(dp), dimension(-10000:10000) kei
kei(n): Tabulated values of the kei function (Kelvin function of zero order)
subroutine, public init_temp_water_age_1_3()
Initial temperature, water content and age (case ANF_DAT==1, TEMP_INIT==3: present-day initial topogr...
subroutine boundary(time, dtime, dxi, deta, delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
Main routine of boundary_m: Computation of the surface temperature (must be less than 0 deg C!) and o...
real(dp) time_target_topo_init
time_target_topo_init: Initial time for target-topography adjustment
integer(i4b) specmap_time_stp
specmap_time_stp: Time step of the data values for the sea level
integer(i4b), parameter rcl2
rcl2: Maximum length of record for input mask files (with factor 3 safety margin) ...
real(dp), dimension(0:jmax, 0:imax) temp_ma_lgm_anom
temp_ma_lgm_anom(j,i): LGM anomaly (difference LGM - present) of the mean annual surface temperature ...
subroutine, public output2(time, dxi, deta, delta_ts, glac_index, z_sl)
Writing of time-series data on file in ASCII format (and optionally in NetCDF format).
subroutine check(status, ch_calling_routine)
NetCDF error capturing.
real(dp), dimension(-jmax:jmax,-imax:imax) dist_dxdy
dist_dxdy(jr,ir): Distance between grid points with delta_i=ir, delta_j=jr
Calculation of topography gradients on the staggered grid and on the grid points (including length re...
integer(i4b) ncid_temp_precip
ncid_temp_precip: ID of the NetCDF file containing the surface-temperature and precipitation data as ...
character(len=16), dimension(:), allocatable ch_core
ch_core(n): Names of the prescribed borehole positions
real(dp), dimension(0:jmax, 0:imax) sq_g11_g
sq_g11_g(j,i): Square root of the coefficient g11 of the metric tensor on grid point (i...
real(dp), dimension(0:jmax, 0:imax) as_perp_apl
as_perp_apl(j,i): Applied accumulation-ablation function (SMB)
logical, dimension(0:jmax, 0:imax) flag_calving_front_1
flag_calving_front_1(j,i): Calving front flag. .true.: calving front point (floating ice point with a...
subroutine, public metric()
Main routine of module metric_m: Definition of the components g11 and g22 of the metric tensor of the...
subroutine, public calc_enhance_3(time)
Computation of the flow enhancement factor. Case ENHMOD==3: two different values depending on time of...
integer(i4b) grip_time_min
grip_time_min: Minimum time of the data values for the surface temperature anomaly ...
real(dp), dimension(0:jmax, 0:imax) time_lag_asth
time_lag_asth(j,i): Time lag of the relaxing asthenosphere
real(dp), dimension(0:jmax) eta
eta(j): Coordinate eta (= y) of grid point j
real(dp), dimension(:), allocatable x_core
x_core(n): Coordinate xi (= x) of the prescribed borehole positions
real(dp), dimension(0:imax) xi
xi(i): Coordinate xi (= x) of grid point i
character(len=16) ch_domain_short
ch_domain_short: Short name of the computational domain
real(dp) r_t
R_T: Coefficient of the water-content dependence in the rate factor for temperate ice...
real(dp), dimension(0:ktmax, 0:jmax, 0:imax) omega_t
omega_t(kt,j,i): Water content in the lower (kt) ice domain
subroutine, public calc_dxyz(dxi, deta, dzeta_c, dzeta_t)
Main subroutine of calc_dxyz_m: Computation of all components of the strain-rate tensor, the full effective strain rate and the shear fraction.
subroutine, public calc_enhance_4()
Computation of the flow enhancement factor. Case ENHMOD==4: minimal anisotropic enhancement factor fo...
real(dp) kei_r_incr
kei_r_incr: Increment of the argument r of the tabulated kei function
real(dp), dimension(0:ktmax) zeta_t
zeta_t(kt): Sigma coordinate zeta_t of grid point kt
real(dp) rho_sw
RHO_SW: Density of sea water.
logical, dimension(0:jmax, 0:imax) flag_calving_front_2
flag_calving_front_2(j,i): Calving front flag. .true.: calving front point (ocean point with at least...
Computation of the surface temperature (must be less than 0 deg C!) and of the accumulation-ablation ...
real(dp) l
L: Latent heat of ice.
real(dp), parameter eps_sp_dp
eps_sp_dp: Small number to single-precision accuracy in double precision
integer(i4b) n_data_kei
n_data_kei: Number of tabulated values of the kei function
real(dp) rho
RHO: Density of ice.
subroutine topography3(dxi, deta, z_sl, anfdatname)
Definition of the initial surface and bedrock topography (including gradients) and of the horizontal ...
integer(i4b), dimension(0:jmax, 0:imax) p_weert
p_weert(j,i): Weertman exponent for the basal shear stress
subroutine, public init_temp_water_age_1_4()
Initial temperature, water content and age (case ANF_DAT==1, TEMP_INIT==4: present-day initial topogr...
subroutine, public init_temp_water_age_1_1()
Initial temperature, water content and age (case ANF_DAT==1, TEMP_INIT==1: present-day initial topogr...
real(dp), dimension(:), allocatable lambda_core
lambda_core(n): Geographical longitude of the prescribed borehole positions
integer(i4b) n_core
n_core: Number of positions to be considered in the time-series file for deep boreholes ...
integer, parameter dp
Double-precision reals.
subroutine topography2(dxi, deta)
Definition of the initial surface and bedrock topography (including gradients) and of the horizontal ...
real(dp), dimension(0:jmax, 0:imax) zb
zb(j,i): Coordinate z of the ice base
logical, dimension(0:jmax, 0:imax) flag_grounding_line_2
flag_grounding_line_2(j,i): Grounding line flag. .true.: grounding line point (floating ice point wit...
real(dp), dimension(0:jmax, 0:imax, 12) precip_present
precip_present(j,i,n): Present-day mean monthly precipitation rate at the ice surface ...
Writing of output data on files.
real(dp), dimension(0:jmax, 0:imax) dzb_dtau
dzb_dtau(j,i): Derivative of zb by tau (time)
real(dp), dimension(0:kcmax) zeta_c
zeta_c(kc): Sigma coordinate zeta_c of grid point kc
subroutine, public read_target_topo_nc(target_topo_dat_name)
Reading of the target-topography file (in NetCDF format).
real(dp) lambda0
LAMBDA0: Reference longitude (central meridian) of the stereographic projection.
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.
real(dp), dimension(0:jmax, 0:imax) h_t
H_t(j,i): Thickness of ice in the lower (kt) domain (thickness of the temperate layer for POLY...
real(dp), dimension(0:jmax, 0:imax, 12) precip_lgm_anom
precip_lgm_anom(j,i,n): LGM anomaly (ratio LGM/present) of the mean monthly precipitation rate at the...
subroutine topography1(dxi, deta)
Definition of the initial surface and bedrock topography (including gradients) and of the horizontal ...
real(dp), dimension(0:jmax, 0:imax) h_w
H_w(j,i): Thickness of the water column under the ice base.
subroutine, public calc_vxy_b_sia(time, z_sl)
Computation of the basal horizontal velocity vx_b, vy_b in the shallow ice approximation.
Declarations of global variables for SICOPOLIS.
real(dp), dimension(0:jmax, 0:imax) dzs_dtau
dzs_dtau(j,i): Derivative of zs by tau (time)
real(dp), dimension(0:jmax, 0:imax) flex_rig_lith
flex_rig_lith(j,i): Flexural rigidity of the lithosphere
real(dp), dimension(:), allocatable griptemp
griptemp(n): Data values for the surface temperature anomaly
real(dp), dimension(0:jmax, 0:imax) dzl_dtau
dzl_dtau(j,i): Derivative of zl by tau (time)
real(dp), dimension(0:jmax, 0:imax) sq_g22_g
sq_g22_g(j,i): Square root of the coefficient g22 of the metric tensor on grid point (i...