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 (DISC>0 && !defined(EXEC_MAKE_C_DIS_0)) 73 #if (DISC>0 && defined(EXEC_MAKE_C_DIS_0)) 77 #if (GRID==0 || GRID==1) 95 integer(i4b),
intent(out) :: ii((imax+1)*(jmax+1)), &
96 jj((imax+1)*(jmax+1)), &
98 integer(i4b),
intent(out) :: ndat2d, ndat3d
99 integer(i4b),
intent(out) :: n_output
100 real(dp),
intent(out) :: delta_ts, glac_index
101 real(dp),
intent(out) :: mean_accum
102 real(dp),
intent(out) :: dtime, dtime_temp, dtime_wss, &
104 real(dp),
intent(out) :: time, time_init, time_end, time_output(100)
105 real(dp),
intent(out) :: dxi, deta, dzeta_c, dzeta_t, dzeta_r
106 real(dp),
intent(out) :: z_sl, dzsl_dtau, z_mar
108 character(len=100),
intent(out) :: runname
110 integer(i4b) :: i, j, kc, kt, kr, m, n, ir, jr
111 integer(i4b) :: ios, ios1, ios2, ios3, ios4
113 real(dp) :: dtime0, dtime_temp0, dtime_wss0, dtime_out0, dtime_ser0
114 real(dp) :: time_init0, time_end0, time_output0(100)
115 real(dp),
dimension(0:JMAX,0:IMAX) :: precip_factor
117 character(len=100) :: anfdatname, target_topo_dat_name
118 character(len=256) :: filename_with_path
119 character(len=256) :: shell_command
120 character :: ch_dummy
121 logical :: flag_precip_monthly_mean
122 logical :: flag_init_output, flag_3d_output
124 #if (defined(INITMIP_SMB_ANOM_FILE)) 125 real(dp),
dimension(0:IMAX,0:JMAX) :: as_anom_initmip_conv
129 integer(i4b) :: dimid, ncid, ncv
135 real(dp),
parameter :: inv_twelve = 1.0_dp/12.0_dp
137 character(len=64),
parameter :: thisroutine =
'sico_init' 139 character(len=64),
parameter :: fmt1 =
'(a)', &
144 character(len= 8) :: ch_imax
145 character(len=128) :: fmt4
147 write(ch_imax, fmt=
'(i8)') imax
148 write(fmt4, fmt=
'(a)')
'('//trim(adjustl(ch_imax))//
'(i1),i1)' 150 write(unit=6, fmt=
'(a)')
' ' 151 write(unit=6, fmt=
'(a)')
' -------- sico_init --------' 152 write(unit=6, fmt=
'(a)')
' ' 164 #elif (defined(EMTP2SGE)) 172 #elif (defined(NHEM)) 176 #elif (defined(SCAND)) 180 #elif (defined(TIBET)) 184 #elif (defined(NMARS)) 188 #elif (defined(SMARS)) 200 stop
' >>> sico_init: No valid domain specified!' 221 #if (CALCTHK==3 || CALCTHK==6 || MARGIN==3 || DYNAMICS==2) 222 call lis_initialize(ierr)
238 if ( trim(version) /= trim(sico_version) ) &
239 stop
' >>> sico_init: SICOPOLIS version not compatible with header file!' 243 #if (!defined(DYNAMICS)) 244 stop
' >>> sico_init: DYNAMICS not defined in the header file!' 247 #if (!defined(CALCMOD)) 248 stop
' >>> sico_init: CALCMOD not defined in the header file!' 251 #if (defined(ENTHMOD)) 252 write(6, fmt=
'(a)')
' >>> sico_init: ENTHMOD must not be defined any more.' 253 write(6, fmt=
'(a)')
' Please update your header file!' 260 #if (GRID==0 || GRID==1) 262 if (approx_equal(dx, 20.0_dp,
eps_sp_dp))
then 264 if ( (imax /= 75).or.(jmax /= 140) )
then 265 stop
' >>> sico_init: IMAX and/or JMAX wrong!' 268 else if (approx_equal(dx, 10.0_dp,
eps_sp_dp))
then 270 if ( (imax /= 150).or.(jmax /= 280) )
then 271 stop
' >>> sico_init: IMAX and/or JMAX wrong!' 274 else if (approx_equal(dx, 5.0_dp,
eps_sp_dp))
then 276 if ( (imax /= 300).or.(jmax /= 560) )
then 277 stop
' >>> sico_init: IMAX and/or JMAX wrong!' 281 stop
' >>> sico_init: DX wrong!' 286 stop
' >>> sico_init: GRID==2 not allowed for this application!' 294 #if (CALCMOD==0 || CALCMOD==2 || CALCMOD==3 || CALCMOD==-1) 297 write(6, fmt=
'(a)')
' >>> sico_init: For options CALCMOD==0, 2, 3 or -1,' 298 write(6, fmt=
'(a)')
' the separate kt domain is redundant.' 299 write(6, fmt=
'(a)')
' Therefore, consider setting KTMAX to 2.' 300 write(6, fmt=
'(a)')
' ' 308 #if (TSURFACE == 5 && ACCSURFACE != 5) 309 stop
' >>> sico_init: Options TSURFACE==5 and ACCSURFACE==5 must be used together!' 312 #if (TSURFACE != 5 && ACCSURFACE == 5) 313 stop
' >>> sico_init: Options TSURFACE==5 and ACCSURFACE==5 must be used together!' 317 #if (ACCSURFACE != 6) 318 write(6, fmt=
'(a)')
' >>> sico_init: Options TSURFACE==6, ACCSURFACE==6' 319 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!' 322 write(6, fmt=
'(a)')
' >>> sico_init: Options TSURFACE==6, ACCSURFACE==6' 323 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!' 328 #if (ACCSURFACE == 6) 330 write(6, fmt=
'(a)')
' >>> sico_init: Options TSURFACE==6, ACCSURFACE==6' 331 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!' 334 write(6, fmt=
'(a)')
' >>> sico_init: Options TSURFACE==6, ACCSURFACE==6' 335 write(6, fmt=
'(a)')
' and NETCDF==2 must be used together!' 340 #if (defined(INITMIP_SMB_ANOM_FILE) && NETCDF != 2) 341 if ( trim(adjustl(initmip_smb_anom_file)) /=
'none' )
then 342 write(6, fmt=
'(a)')
' >>> sico_init: Defining INITMIP_SMB_ANOM_FILE' 343 write(6, fmt=
'(a)')
' must be used together with NETCDF==2!' 352 stop
' >>> sico_init: Option ADV_HOR==1 (central differences) not defined!' 360 #if ((MARGIN==3 && DYNAMICS==1) || DYNAMICS==2) /* requires SSA or SStA */ 362 write(6, fmt=
'(a)')
' >>> sico_init: Distortion correction not implemented' 363 write(6, fmt=
'(a)')
' for the shallow shelf approximation (SSA)' 364 write(6, fmt=
'(a)')
' or the shelfy stream approximation (SStA)' 365 write(6, fmt=
'(a)')
' -> GRID==0 required!' 374 #if (MARGIN==3 && MB_ACCOUNT==1) 375 write(6, fmt=
'(a)') &
376 ' >>> sico_init: MB_ACCOUNT==1 does not yet work for ice shelves!' 386 #elif (TSURFACE == 5) 390 #elif (TSURFACE == 6) 400 dtime_temp0 = dtime_temp0
402 dtime_wss0 = dtime_wss0
407 dzeta_c = 1.0_dp/
real(kcmax,dp)
408 dzeta_t = 1.0_dp/
real(ktmax,dp)
409 dzeta_r = 1.0_dp/
real(krmax,dp)
418 if (deform >=
eps)
then 498 if ((i <= imax).and.(j <= jmax))
then 510 anfdatname = anfdatname
512 #if (defined(YEAR_ZERO)) 518 time_init0 = time_init0
519 time_end0 = time_end0
520 dtime_ser0 = dtime_ser0
522 #if (OUTPUT==1 || OUTPUT==3) 523 dtime_out0 = dtime_out0
526 #if (OUTPUT==2 || OUTPUT==3) 528 time_output0( 1) = time_out0_01
529 time_output0( 2) = time_out0_02
530 time_output0( 3) = time_out0_03
531 time_output0( 4) = time_out0_04
532 time_output0( 5) = time_out0_05
533 time_output0( 6) = time_out0_06
534 time_output0( 7) = time_out0_07
535 time_output0( 8) = time_out0_08
536 time_output0( 9) = time_out0_09
537 time_output0(10) = time_out0_10
538 time_output0(11) = time_out0_11
539 time_output0(12) = time_out0_12
540 time_output0(13) = time_out0_13
541 time_output0(14) = time_out0_14
542 time_output0(15) = time_out0_15
543 time_output0(16) = time_out0_16
544 time_output0(17) = time_out0_17
545 time_output0(18) = time_out0_18
546 time_output0(19) = time_out0_19
547 time_output0(20) = time_out0_20
552 shell_command =
'if [ ! -d' 553 shell_command = trim(shell_command)//
' '//outpath
554 shell_command = trim(shell_command)//
' '//
'] ; then mkdir' 555 shell_command = trim(shell_command)//
' '//outpath
556 shell_command = trim(shell_command)//
' '//
'; fi' 557 call system(trim(shell_command))
560 filename_with_path = trim(outpath)//
'/'//trim(runname)//
'.log' 562 open(10, iostat=ios, file=trim(filename_with_path), status=
'new')
564 if (ios /= 0) stop
' >>> sico_init: Error when opening the log file!' 566 write(10, fmt=trim(fmt1))
'Computational domain:' 568 write(10, fmt=trim(fmt1))
' ' 570 write(10, fmt=trim(fmt2a))
'GRID = ', grid
571 write(10, fmt=trim(fmt1))
' ' 573 write(10, fmt=trim(fmt2))
'imax =', imax
574 write(10, fmt=trim(fmt2))
'jmax =', jmax
575 write(10, fmt=trim(fmt2))
'kcmax =', kcmax
576 write(10, fmt=trim(fmt2))
'ktmax =', ktmax
577 write(10, fmt=trim(fmt2))
'krmax =', krmax
578 write(10, fmt=trim(fmt1))
' ' 580 write(10, fmt=trim(fmt3))
'a =',
aa 581 write(10, fmt=trim(fmt1))
' ' 583 #if (GRID==0 || GRID==1) 584 write(10, fmt=trim(fmt3))
'x0 =', x0
585 write(10, fmt=trim(fmt3))
'y0 =', y0
586 write(10, fmt=trim(fmt3))
'dx =', dx
588 stop
' >>> sico_init: GRID==2 not allowed for this application!' 590 write(10, fmt=trim(fmt1))
' ' 592 write(10, fmt=trim(fmt3))
'year_zero =',
year_zero 593 write(10, fmt=trim(fmt3))
'time_init =', time_init0
594 write(10, fmt=trim(fmt3))
'time_end =', time_end0
595 write(10, fmt=trim(fmt3))
'dtime =', dtime0
596 write(10, fmt=trim(fmt3))
'dtime_temp =', dtime_temp0
598 write(10, fmt=trim(fmt3))
'dtime_wss =', dtime_wss0
601 write(10, fmt=trim(fmt3))
'dtime_mar_coa =', dtime_mar_coa0
603 write(10, fmt=trim(fmt1))
' ' 605 write(10, fmt=trim(fmt2))
'ANF_DAT =', anf_dat
606 write(10, fmt=trim(fmt1))
'zs_present file = '//zs_present_file
608 #if (defined(ZB_PRESENT_FILE)) 609 write(10, fmt=trim(fmt1))
'zb_present file = '//zb_present_file
611 write(10, fmt=trim(fmt1))
'zl_present file = '//zl_present_file
613 write(10, fmt=trim(fmt1))
'zl0 file = '//zl0_file
614 write(10, fmt=trim(fmt1))
'mask_present file = '//mask_present_file
615 #if (ANF_DAT==1 && defined(TEMP_INIT)) 616 write(10, fmt=trim(fmt2))
'TEMP_INIT =', temp_init
619 write(10, fmt=trim(fmt1))
'Initial-value file = '//anfdatname
620 write(10, fmt=trim(fmt1))
'Path to initial-value file = '//anfdatpath
622 write(10, fmt=trim(fmt1))
' ' 626 write(10, fmt=trim(fmt3))
'time_target_topo_init =', time_target_topo_init0
627 write(10, fmt=trim(fmt3))
'time_target_topo_final =', time_target_topo_final0
628 write(10, fmt=trim(fmt1))
'Target-topography file = '//target_topo_dat_name
629 write(10, fmt=trim(fmt1))
'Path to target-topography file = '//target_topo_dat_path
630 write(10, fmt=trim(fmt1))
' ' 634 write(10, fmt=trim(fmt3))
'target_topo_tau =', target_topo_tau0
635 write(10, fmt=trim(fmt1))
'Target-topography file = '//target_topo_dat_name
636 write(10, fmt=trim(fmt1))
'Path to target-topography file = '//target_topo_dat_path
637 write(10, fmt=trim(fmt1))
' ' 641 write(10, fmt=trim(fmt1))
'Maximum ice extent mask file = '//mask_maxextent_file
642 write(10, fmt=trim(fmt1))
' ' 645 write(10, fmt=trim(fmt1))
'Physical-parameter file = '//phys_para_file
646 write(10, fmt=trim(fmt1))
' ' 648 #if (CALCTHK==2 || CALCTHK==3 || CALCTHK==5 || CALCTHK==6) 649 write(10, fmt=trim(fmt3))
'ovi_weight =', ovi_weight
650 #if (CALCTHK==2 || CALCTHK==5) 651 write(10, fmt=trim(fmt3))
'omega_sor =', omega_sor
653 write(10, fmt=trim(fmt2a))
'iter_max_sor = ', iter_max_sor
656 write(10, fmt=trim(fmt1))
' ' 660 write(10, fmt=trim(fmt3))
'delta_ts0 =', delta_ts0
662 write(10, fmt=trim(fmt3))
'sine_amplit =', sine_amplit
663 write(10, fmt=trim(fmt3))
'sine_period =', sine_period
665 write(10, fmt=trim(fmt1))
'GRIP file = '//grip_temp_file
666 write(10, fmt=trim(fmt3))
'grip_temp_fact =', grip_temp_fact
668 write(10, fmt=trim(fmt1))
'Glacial-index file = '//glac_ind_file
669 write(10, fmt=trim(fmt1))
'temp_ma_anom file = '//temp_ma_anom_file
670 write(10, fmt=trim(fmt3))
'temp_ma_anom fact = ', temp_ma_anom_fact
671 write(10, fmt=trim(fmt1))
'temp_mj_anom file = '//temp_mj_anom_file
672 write(10, fmt=trim(fmt3))
'temp_mj_anom fact = ', temp_mj_anom_fact
674 write(10, fmt=trim(fmt1))
'temp_precip_anom file = '//temp_precip_anom_file
675 write(10, fmt=trim(fmt3))
'temp_ma_anom fact = ', temp_ma_anom_fact
676 write(10, fmt=trim(fmt3))
'temp_mj_anom fact = ', temp_mj_anom_fact
679 #if (!defined(PRECIP_PRESENT_FILE)) 680 stop
' >>> sico_init: PRECIP_PRESENT_FILE not defined in the header file!' 682 #if (!defined(PRECIP_MA_PRESENT_FILE)) 683 stop
' >>> sico_init: PRECIP_MA_PRESENT_FILE not defined in the header file!' 685 #if (defined(PRECIP_PRESENT_FILE) && defined(PRECIP_MA_PRESENT_FILE)) 686 if ( trim(adjustl(precip_present_file)) /=
'none' )
then 687 write(10, fmt=trim(fmt1))
'precip_present_file = '//precip_present_file
688 flag_precip_monthly_mean = .true.
689 else if ( trim(adjustl(precip_ma_present_file)) /=
'none' )
then 690 write(10, fmt=trim(fmt1))
'precip_ma_present_file = '//precip_ma_present_file
691 flag_precip_monthly_mean = .false.
693 write(6, fmt=
'(a)')
' >>> sico_init: Neither PRECIP_PRESENT_FILE' 694 write(6, fmt=
'(a)')
' nor PRECIP_MA_PRESENT_FILE' 695 write(6, fmt=
'(a)')
' specified in the header file!' 699 #if (!defined(PRECIP_ZS_REF_FILE)) 700 stop
' >>> sico_init: PRECIP_ZS_REF_FILE not defined in the header file!' 702 write(10, fmt=trim(fmt1))
'precip_zs_ref_file = '//precip_zs_ref_file
704 #if (defined(PRECIP_FACTOR_FILE)) 705 if ( trim(adjustl(precip_factor_file)) /=
'none' ) &
706 write(10, fmt=trim(fmt1))
'precip_factor_file = '//precip_factor_file
709 write(10, fmt=trim(fmt3))
'accfact =', accfact
710 #elif (ACCSURFACE==2 || ACCSURFACE==3) 711 write(10, fmt=trim(fmt3))
'gamma_s =', gamma_s
712 #elif (ACCSURFACE==5) 713 write(10, fmt=trim(fmt1))
'precip_anom file = '//precip_anom_file
714 write(10, fmt=trim(fmt3))
'precip_anom fact = ', precip_anom_fact
715 #elif (ACCSURFACE==6) 716 write(10, fmt=trim(fmt1))
'temp_precip_anom file = '//temp_precip_anom_file
717 write(10, fmt=trim(fmt3))
'precip_anom fact = ', precip_anom_fact
719 #if (ACCSURFACE <= 3) 720 write(10, fmt=trim(fmt2))
'ELEV_DESERT =', elev_desert
721 #if (ELEV_DESERT == 1) 722 write(10, fmt=trim(fmt3))
'gamma_p =', gamma_p
723 write(10, fmt=trim(fmt3))
'zs_thresh =', zs_thresh
728 write(10, fmt=trim(fmt3))
'lambda_lti =', lambda_lti
729 write(10, fmt=trim(fmt3))
'temp_lti =', temp_lti
732 write(10, fmt=trim(fmt1))
' ' 734 #if (defined(INITMIP_CONST_SMB)) 735 write(10, fmt=trim(fmt2a))
'INITMIP_CONST_SMB = ', initmip_const_smb
737 #if (defined(INITMIP_SMB_ANOM_FILE)) 738 if ( trim(adjustl(initmip_smb_anom_file)) /=
'none' )
then 739 write(10, fmt=trim(fmt1))
'initmip_smb_anom file = '//initmip_smb_anom_file
742 #if (defined(INITMIP_CONST_SMB) || defined(INITMIP_SMB_ANOM_FILE)) 743 write(10, fmt=trim(fmt1))
' ' 746 write(10, fmt=trim(fmt2a))
'DISC = ', disc
748 write(10, fmt=trim(fmt3))
'c_dis_0 =', c_dis_0
749 write(10, fmt=trim(fmt3))
'c_dis_fac =', c_dis_fac
750 write(10, fmt=trim(fmt3))
'm_H =', m_h
751 write(10, fmt=trim(fmt3))
'm_D =', m_d
752 write(10, fmt=trim(fmt3))
'r_mar_eff =', r_mar_eff
754 write(10, fmt=trim(fmt3))
's_dis =', s_dis
756 #if (defined(ALPHA_SUB)) 757 write(10, fmt=trim(fmt3))
'alpha_sub =', alpha_sub
759 #if (defined(ALPHA_O)) 760 write(10, fmt=trim(fmt3))
'alpha_o =', alpha_o
763 write(10, fmt=trim(fmt1))
' ' 765 write(10, fmt=trim(fmt2a))
'SEA_LEVEL = ', sea_level
767 write(10, fmt=trim(fmt3))
'z_sl0 =', z_sl0
769 write(10, fmt=trim(fmt1))
'sea-level file = '//sea_level_file
771 write(10, fmt=trim(fmt1))
' ' 774 #if (MARINE_ICE_CALVING==2 || MARINE_ICE_CALVING==3) 775 write(10, fmt=trim(fmt3))
'z_mar =', z_mar
776 write(10, fmt=trim(fmt1))
' ' 777 #elif (MARINE_ICE_CALVING==4 || MARINE_ICE_CALVING==5 \ 778 || marine_ice_calving==6 || marine_ice_calving==7)
779 write(10, fmt=trim(fmt3))
'fact_z_mar =', fact_z_mar
780 write(10, fmt=trim(fmt1))
' ' 781 #elif (MARINE_ICE_FORMATION==2 && MARINE_ICE_CALVING==9) 782 write(10, fmt=trim(fmt3))
'calv_uw_coeff =', calv_uw_coeff
783 write(10, fmt=trim(fmt3))
'r1_calv_uw =', r1_calv_uw
784 write(10, fmt=trim(fmt3))
'r2_calv_uw =', r2_calv_uw
785 write(10, fmt=trim(fmt1))
' ' 788 #if (ICE_SHELF_CALVING==2) 789 write(10, fmt=trim(fmt3))
'H_calv =', h_calv
790 write(10, fmt=trim(fmt1))
' ' 794 #if (defined(BASAL_HYDROLOGY)) 795 write(10, fmt=trim(fmt2a))
'BASAL_HYDROLOGY = ', basal_hydrology
797 write(10, fmt=trim(fmt2a))
'SLIDE_LAW = ', slide_law
798 write(10, fmt=trim(fmt3))
'c_slide =',
c_slide 799 write(10, fmt=trim(fmt3))
'smw_coeff =', smw_coeff
800 write(10, fmt=trim(fmt2a))
'r_smw = ', r_smw
801 write(10, fmt=trim(fmt2a))
's_smw = ', s_smw
802 write(10, fmt=trim(fmt3))
'gamma_slide =', gamma_slide
803 write(10, fmt=trim(fmt2a))
'p_weert = ',
p_weert 804 write(10, fmt=trim(fmt2a))
'q_weert = ',
q_weert 805 #if (defined(TIME_RAMP_UP_SLIDE)) 806 write(10, fmt=trim(fmt3))
'time_ramp_up_slide =', time_ramp_up_slide
809 write(10, fmt=trim(fmt3))
'red_pres_limit_fact =', red_pres_limit_fact
811 #if (BASAL_HYDROLOGY==1) 812 write(10, fmt=trim(fmt3))
'c_Hw_slide =', c_hw_slide
813 write(10, fmt=trim(fmt3))
'Hw0_slide =', hw0_slide
815 write(10, fmt=trim(fmt2a))
'ICE_STREAM = ', ice_stream
817 write(10, fmt=trim(fmt1))
'Sediment-mask file = '//mask_sedi_file
818 write(10, fmt=trim(fmt3))
'c_slide_sedi =', c_slide_sedi
819 write(10, fmt=trim(fmt3))
'smw_coeff_sedi =', smw_coeff_sedi
820 write(10, fmt=trim(fmt2a))
'r_smw_sedi = ', r_smw_sedi
821 write(10, fmt=trim(fmt2a))
's_smw_sedi = ', s_smw_sedi
822 write(10, fmt=trim(fmt3))
'gamma_slide_sedi =', gamma_slide_sedi
823 write(10, fmt=trim(fmt2a))
'p_weert_sedi = ', p_weert_sedi
824 write(10, fmt=trim(fmt2a))
'q_weert_sedi = ', q_weert_sedi
826 write(10, fmt=trim(fmt1))
' ' 828 write(10, fmt=trim(fmt2a))
'Q_GEO_MOD = ', q_geo_mod
830 write(10, fmt=trim(fmt3))
'q_geo =',
q_geo 832 write(10, fmt=trim(fmt1))
'q_geo file = '//q_geo_file
834 write(10, fmt=trim(fmt1))
' ' 836 #if (defined(MARINE_ICE_BASAL_MELTING)) 837 write(10, fmt=trim(fmt2))
'MARINE_ICE_BASAL_MELTING =', marine_ice_basal_melting
838 #if (MARINE_ICE_BASAL_MELTING==2 || MARINE_ICE_BASAL_MELTING==3) 839 write(10, fmt=trim(fmt3))
'qbm_marine =', qbm_marine
841 write(10, fmt=trim(fmt1))
' ' 845 write(10, fmt=trim(fmt2))
'FLOATING_ICE_BASAL_MELTING =', floating_ice_basal_melting
846 #if (FLOATING_ICE_BASAL_MELTING<=3) 847 write(10, fmt=trim(fmt3))
'qbm_float_1 =', qbm_float_1
848 write(10, fmt=trim(fmt3))
'qbm_float_2 =', qbm_float_2
850 write(10, fmt=trim(fmt3))
'qbm_float_3 =', qbm_float_3
851 write(10, fmt=trim(fmt3))
'z_abyss =', z_abyss
852 #if (FLOATING_ICE_BASAL_MELTING==4) 853 write(10, fmt=trim(fmt3))
'temp_ocean =', temp_ocean
854 write(10, fmt=trim(fmt3))
'Omega_qbm =', omega_qbm
855 write(10, fmt=trim(fmt3))
'alpha_qbm =', alpha_qbm
857 #if (FLOATING_ICE_BASAL_MELTING==4 || FLOATING_ICE_BASAL_MELTING==5) 858 write(10, fmt=trim(fmt3))
'H_w_0 =', h_w_0
860 write(10, fmt=trim(fmt1))
' ' 863 write(10, fmt=trim(fmt2))
'REBOUND =', rebound
865 write(10, fmt=trim(fmt3))
'frac_llra =', frac_llra
867 #if (REBOUND==1 || REBOUND==2) 868 write(10, fmt=trim(fmt2))
'TIME_LAG_MOD =', time_lag_mod
869 #if (TIME_LAG_MOD==1) 870 write(10, fmt=trim(fmt3))
'time_lag =', time_lag
871 #elif (TIME_LAG_MOD==2) 872 write(10, fmt=trim(fmt1))
'time_lag_file = '//time_lag_file
874 stop
' >>> sico_init: TIME_LAG_MOD must be either 1 or 2!' 878 write(10, fmt=trim(fmt2))
'FLEX_RIG_MOD =', flex_rig_mod
879 #if (FLEX_RIG_MOD==1) 880 write(10, fmt=trim(fmt3))
'flex_rig =', flex_rig
881 #elif (FLEX_RIG_MOD==2) 882 write(10, fmt=trim(fmt1))
'flex_rig_file = '//flex_rig_file
884 stop
' >>> sico_init: FLEX_RIG_MOD must be either 1 or 2!' 887 write(10, fmt=trim(fmt2))
'Q_LITHO =', q_litho
888 write(10, fmt=trim(fmt1))
' ' 891 write(10, fmt=trim(fmt3))
'gr_size =', gr_size
892 write(10, fmt=trim(fmt1))
' ' 895 write(10, fmt=trim(fmt3))
'sigma_res =', sigma_res
896 write(10, fmt=trim(fmt1))
' ' 899 write(10, fmt=trim(fmt2))
'ENHMOD =', enhmod
900 #if (ENHMOD==1 || ENHMOD==2 || ENHMOD==3) 901 write(10, fmt=trim(fmt3))
'enh_fact =', enh_fact
903 #if (ENHMOD==2 || ENHMOD==3) 904 write(10, fmt=trim(fmt3))
'enh_intg =', enh_intg
907 write(10, fmt=trim(fmt3))
'age_trans =', age_trans_0
910 write(10, fmt=trim(fmt3))
'date_trans1 =', date_trans1_0
911 write(10, fmt=trim(fmt3))
'date_trans2 =', date_trans2_0
912 write(10, fmt=trim(fmt3))
'date_trans3 =', date_trans3_0
914 #if (ENHMOD==4 || ENHMOD==5) 915 write(10, fmt=trim(fmt3))
'enh_compr =', enh_compr
916 write(10, fmt=trim(fmt3))
'enh_shear =', enh_shear
918 #if ((ENHMOD==1 || ENHMOD==2 || ENHMOD==3 || ENHMOD==4) && MARGIN==3) 919 write(10, fmt=trim(fmt3))
'enh_shelf =', enh_shelf
921 write(10, fmt=trim(fmt1))
' ' 923 write(10, fmt=trim(fmt3))
'numdiff_H_t =', numdiff_h_t
924 write(10, fmt=trim(fmt3))
'tau_cts =', tau_cts
925 write(10, fmt=trim(fmt3))
'vh_max =', vh_max
926 write(10, fmt=trim(fmt3))
'hd_min =', hd_min
927 write(10, fmt=trim(fmt3))
'hd_max =', hd_max
928 #if (defined(QBM_MIN)) 929 write(10, fmt=trim(fmt3))
'qbm_min =', qbm_min
930 #elif (defined(QB_MIN)) /* obsolete */ 931 write(10, fmt=trim(fmt3))
'qb_min =', qb_min
933 #if (defined(QBM_MAX)) 934 write(10, fmt=trim(fmt3))
'qbm_max =', qbm_max
935 #elif (defined(QB_MAX)) /* obsolete */ 936 write(10, fmt=trim(fmt3))
'qb_max =', qb_max
938 write(10, fmt=trim(fmt3))
'age_min =', age_min
939 write(10, fmt=trim(fmt3))
'age_max =', age_max
940 write(10, fmt=trim(fmt3))
'mean_accum =', mean_accum
942 write(10, fmt=trim(fmt3))
'age_diff =', agediff
944 write(10, fmt=trim(fmt1))
' ' 946 write(10, fmt=trim(fmt2a))
'DYNAMICS = ', dynamics
947 #if ((DYNAMICS==1 && MARGIN==3) || DYNAMICS==2) 948 #if (defined(LIS_OPTS)) 949 write(10, fmt=trim(fmt1))
'lis_opts = '//lis_opts
951 #if (defined(N_ITER_SSA)) 952 write(10, fmt=trim(fmt2a))
'n_iter_ssa = ', n_iter_ssa
954 #if (defined(RELAX_FACT_SSA)) 955 write(10, fmt=trim(fmt3))
'relax_fact_ssa =', relax_fact_ssa
958 #if (DYNAMICS==2 && defined(RATIO_SL_THRESH)) 959 write(10, fmt=trim(fmt3))
'ratio_sl_thresh =', ratio_sl_thresh
961 #if (DYNAMICS==2 && defined(SSTA_SIA_WEIGH_FCT)) 962 write(10, fmt=trim(fmt2a))
'SSTA_SIA_WEIGH_FCT = ', ssta_sia_weigh_fct
964 write(10, fmt=trim(fmt1))
' ' 966 write(10, fmt=trim(fmt2))
'CALCMOD =', calcmod
967 #if (CALCMOD==-1 && defined(TEMP_CONST)) 968 write(10, fmt=trim(fmt3))
'TEMP_CONST =', temp_const
970 #if (CALCMOD==-1 && defined(AGE_CONST)) 971 write(10, fmt=trim(fmt3))
'AGE_CONST =', age_const
973 #if (CALCMOD==1 && defined(CTS_MELTING_FREEZING)) 974 write(10, fmt=trim(fmt2))
'CTS_MELTING_FREEZING =', cts_melting_freezing
976 write(10, fmt=trim(fmt2))
'FLOW_LAW =', flow_law
977 write(10, fmt=trim(fmt2))
'FIN_VISC =', fin_visc
978 write(10, fmt=trim(fmt2))
'MARGIN =', margin
980 write(10, fmt=trim(fmt2))
'MARINE_ICE_FORMATION =', marine_ice_formation
981 write(10, fmt=trim(fmt2))
'MARINE_ICE_CALVING =', marine_ice_calving
983 write(10, fmt=trim(fmt2))
'ICE_SHELF_CALVING =', ice_shelf_calving
985 #if (defined(THK_EVOL)) 986 write(10, fmt=trim(fmt2))
'THK_EVOL =', thk_evol
988 stop
' >>> sico_init: Define THK_EVOL in header file!' 990 #if (defined(CALCTHK)) 991 write(10, fmt=trim(fmt2))
'CALCTHK =', calcthk
993 stop
' >>> sico_init: Define CALCTHK in header file!' 995 write(10, fmt=trim(fmt2))
'ADV_HOR =', adv_hor
996 write(10, fmt=trim(fmt2))
'ADV_VERT =', adv_vert
997 write(10, fmt=trim(fmt2))
'TOPOGRAD =', topograd
998 write(10, fmt=trim(fmt1))
' ' 999 write(10, fmt=trim(fmt2))
'TEMP_PRESENT_PARA =', temp_present_para
1000 write(10, fmt=trim(fmt2))
'TSURFACE =', tsurface
1001 write(10, fmt=trim(fmt2))
'ACCSURFACE =', accsurface
1003 write(10, fmt=trim(fmt2))
'PRECIP_ANOM_INTERPOL =', precip_anom_interpol
1005 write(10, fmt=trim(fmt2))
'SOLID_PRECIP =', solid_precip
1006 write(10, fmt=trim(fmt2))
'ABLSURFACE =', ablsurface
1007 #if (defined(MB_ACCOUNT)) 1008 write(10, fmt=trim(fmt2a))
'MB_ACCOUNT = ', mb_account
1010 write(10, fmt=trim(fmt1))
' ' 1012 #if (defined(OUT_TIMES)) 1013 write(10, fmt=trim(fmt2a))
'OUT_TIMES = ', out_times
1015 #if (defined(OUTPUT_INIT)) 1016 write(10, fmt=trim(fmt2a))
'OUTPUT_INIT = ', output_init
1018 write(10, fmt=trim(fmt2a))
'OUTPUT = ', output
1019 #if (OUTPUT==1 || OUTPUT==3) 1020 write(10, fmt=trim(fmt3))
'dtime_out =' , dtime_out0
1022 write(10, fmt=trim(fmt3))
'dtime_ser =' , dtime_ser0
1023 #if (OUTPUT==1 || OUTPUT==2) 1024 write(10, fmt=trim(fmt2a))
'ERGDAT = ', ergdat
1026 write(10, fmt=trim(fmt2a))
'NETCDF = ', netcdf
1027 #if (OUTPUT==2 || OUTPUT==3) 1028 write(10, fmt=trim(fmt2a))
'n_output = ', n_output
1030 write(10, fmt=trim(fmt3))
'time_output =' , time_output0(n)
1033 write(10, fmt=trim(fmt1))
' ' 1035 write(10, fmt=trim(fmt1))
'Program version and date: '//version//
' / '//date
1037 close(10, status=
'keep')
1042 time_init = time_init0*year_sec
1043 time_end = time_end0*year_sec
1044 dtime = dtime0*year_sec
1045 dtime_temp = dtime_temp0*year_sec
1047 dtime_wss = dtime_wss0*year_sec
1049 dtime_ser = dtime_ser0*year_sec
1050 #if (OUTPUT==1 || OUTPUT==3) 1051 dtime_out = dtime_out0*year_sec
1053 #if (OUTPUT==2 || OUTPUT==3) 1055 time_output(n) = time_output0(n)*year_sec
1059 if (.not.approx_integer_multiple(dtime_temp, dtime,
eps_sp_dp)) &
1060 stop
' >>> sico_init: dtime_temp must be a multiple of dtime!' 1063 if (.not.approx_integer_multiple(dtime_wss, dtime,
eps_sp_dp)) &
1064 stop
' >>> sico_init: dtime_wss must be a multiple of dtime!' 1067 if (.not.approx_integer_multiple(dtime_ser, dtime,
eps_sp_dp)) &
1068 stop
' >>> sico_init: dtime_ser must be a multiple of dtime!' 1070 #if (OUTPUT==1 || OUTPUT==3) 1071 if (.not.approx_integer_multiple(dtime_out, dtime,
eps_sp_dp)) &
1072 stop
' >>> sico_init: dtime_out must be a multiple of dtime!' 1089 #if (GRID==0 || GRID==1) 1091 #if (defined(PRECIP_PRESENT_FILE) && defined(PRECIP_MA_PRESENT_FILE)) 1093 if (flag_precip_monthly_mean)
then 1094 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1095 trim(precip_present_file)
1097 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1098 trim(precip_ma_present_file)
1103 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1107 stop
' >>> sico_init: GRID==2 not allowed for this application!' 1111 if (ios /= 0) stop
' >>> sico_init: Error when opening the precip file!' 1113 do m=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1115 if (flag_precip_monthly_mean)
then 1118 do m=1, 3;
read(21, fmt=
'(a)') ch_dummy;
end do 1136 close(21, status=
'keep')
1140 precip_factor = 1.0_dp
1142 #if (defined(PRECIP_FACTOR_FILE)) 1144 if ( trim(adjustl(precip_factor_file)) /=
'none' )
then 1146 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1147 trim(precip_factor_file)
1149 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1151 if (ios /= 0) stop
' >>> sico_init: Error when opening the precip factor file!' 1153 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1156 read(21, fmt=*) (precip_factor(j,i), i=0,imax)
1159 close(21, status=
'keep')
1165 if (flag_precip_monthly_mean)
then 1184 if (flag_precip_monthly_mean)
then 1213 #if (GRID==0 || GRID==1) 1215 #if (defined(PRECIP_ZS_REF_FILE)) 1217 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1218 trim(precip_zs_ref_file)
1222 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1226 stop
' >>> sico_init: GRID==2 not allowed for this application!' 1230 if (ios /= 0) stop
' >>> sico_init: Error when opening the zs_ref file!' 1232 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1235 read(21, fmt=*) (
zs_ref(j,i), i=0,imax)
1238 close(21, status=
'keep')
1252 #if (GRID==0 || GRID==1) 1254 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1255 trim(precip_anom_file)
1257 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1261 if (ios /= 0) stop
' >>> sico_init: Error when opening the precip anomaly file!' 1263 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1269 close(21, status=
'keep')
1283 #if (PRECIP_ANOM_INTERPOL==1) 1285 #elif (PRECIP_ANOM_INTERPOL==2) 1288 stop
' >>> sico_init: Wrong value of switch PRECIP_ANOM_INTERPOL!' 1299 mean_accum = mean_accum*(1.0e-03_dp/year_sec)*(
rho_w/
rho)
1306 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1307 trim(mask_sedi_file)
1309 open(24, iostat=ios, file=trim(filename_with_path), recl=
rcl2, status=
'old')
1311 if (ios /= 0) stop
' >>> sico_init: Error when opening the rock/sediment mask file!' 1313 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do 1316 read(24, fmt=trim(fmt4)) (
maske_sedi(j,i), i=0,imax)
1319 close(24, status=
'keep')
1325 #if ((THK_EVOL==2) || (THK_EVOL==3)) 1327 target_topo_dat_name = trim(target_topo_dat_name)
1330 write(6, fmt=
'(a)')
' >>> sico_init: Reading of target topography' 1331 write(6, fmt=
'(a)')
' only implemented for NetCDF files (NETCDF==2)!' 1336 stop
' >>> sico_init: Parameter NETCDF must be either 1 or 2!' 1345 #if (GRID==0 || GRID==1) 1347 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1348 trim(mask_maxextent_file)
1350 open(24, iostat=ios, file=trim(filename_with_path), recl=
rcl2, status=
'old')
1354 stop
' >>> sico_init: GRID==2 not allowed for this application!' 1359 stop
' >>> sico_init: Error when opening the maximum ice extent mask file!' 1361 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do 1367 close(24, status=
'keep')
1376 #if (GRID==0 || GRID==1) 1378 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1379 trim(temp_ma_anom_file)
1381 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1385 if (ios /= 0) stop
' >>> sico_init: Error when opening the temp_ma anomaly file!' 1387 #if (GRID==0 || GRID==1) 1389 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1390 trim(temp_mj_anom_file)
1392 open(22, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1396 if (ios /= 0) stop
' >>> sico_init: Error when opening the temp_mj anomaly file!' 1398 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1399 do n=1, 6;
read(22, fmt=
'(a)') ch_dummy;
end do 1406 close(21, status=
'keep')
1407 close(22, status=
'keep')
1418 filename_with_path = trim(inpath)//
'/general/'//trim(grip_temp_file)
1420 open(21, iostat=ios, file=trim(filename_with_path), status=
'old')
1422 if (ios /= 0) stop
' >>> sico_init: Error when opening the data file for delta_ts!' 1426 if (ch_dummy /=
'#')
then 1427 write(6, fmt=*)
' >>> sico_init: grip_time_min, grip_time_stp, grip_time_max' 1428 write(6, fmt=*)
' not defined in data file for delta_ts!' 1437 read(21, fmt=*) d_dummy,
griptemp(n)
1440 close(21, status=
'keep')
1448 filename_with_path = trim(inpath)//
'/general/'//trim(glac_ind_file)
1450 open(21, iostat=ios, file=trim(filename_with_path), status=
'old')
1452 if (ios /= 0) stop
' >>> sico_init: Error when opening the glacial-index file!' 1456 if (ch_dummy /=
'#')
then 1457 write(6, fmt=*)
' >>> sico_init: gi_time_min, gi_time_stp, gi_time_max' 1458 write(6, fmt=*)
' not defined in glacial-index file!' 1470 close(21, status=
'keep')
1477 #if (TSURFACE==6 && ACCSURFACE==6) 1480 '/'//trim(temp_precip_anom_file)
1482 call check( nf90_open(trim(filename_with_path), nf90_nowrite, &
1508 #if (defined(INITMIP_SMB_ANOM_FILE)) 1510 if ( trim(adjustl(initmip_smb_anom_file)) /=
'none' )
then 1513 '/'//trim(initmip_smb_anom_file)
1515 call check( nf90_open(trim(filename_with_path), nf90_nowrite, ncid), &
1518 call check( nf90_inq_varid(ncid,
'DSMB', ncv) )
1519 call check( nf90_get_var(ncid, ncv, as_anom_initmip_conv) )
1521 call check( nf90_close(ncid) )
1525 as_anom_initmip(j,i) = as_anom_initmip_conv(i,j) /year_sec
1531 as_anom_initmip = 0.0_dp
1542 filename_with_path = trim(inpath)//
'/general/dTg_paleo.dat' 1544 open(21, iostat=ios, file=trim(filename_with_path), status=
'old')
1547 stop
' >>> sico_init: Error when opening the data file for dT_glann_CLIMBER!' 1549 read(21, fmt=*) ch_dummy, glann_time_min, glann_time_stp, glann_time_max
1551 if (ch_dummy /=
'#')
then 1552 write(6, fmt=*)
' >>> sico_init: glann_time_min, glann_time_stp, glann_time_max' 1553 write(6, fmt=*)
' not defined in data file for dT_glann_CLIMBER!' 1557 ndata_glann = (glann_time_max-glann_time_min)/glann_time_stp
1559 allocate(dt_glann_climber(0:ndata_glann))
1562 read(21, fmt=*) d_dummy, dt_glann_climber(n)
1565 close(21, status=
'keep')
1573 filename_with_path = trim(inpath)//
'/general/'//trim(sea_level_file)
1575 open(21, iostat=ios, file=trim(filename_with_path), status=
'old')
1577 if (ios /= 0) stop
' >>> sico_init: Error when opening the data file for z_sl!' 1581 if (ch_dummy /=
'#')
then 1582 write(6, fmt=*)
' >>> sico_init: specmap_time_min, specmap_time_stp, specmap_time_max' 1583 write(6, fmt=*)
' not defined in data file for z_sl!' 1595 close(21, status=
'keep')
1611 #elif (Q_GEO_MOD==2) 1615 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1618 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1620 if (ios /= 0) stop
' >>> sico_init: Error when opening the qgeo file!' 1622 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 1625 read(21, fmt=*) (
q_geo(j,i), i=0,imax)
1628 close(21, status=
'keep')
1640 #if (REBOUND==0 || REBOUND==1) 1653 #if (REBOUND==1 || REBOUND==2) 1655 #if (TIME_LAG_MOD==1) 1659 #elif (TIME_LAG_MOD==2) 1661 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1664 open(29, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1666 if (ios /= 0) stop
' >>> sico_init: Error when opening the time-lag file!' 1668 do n=1, 6;
read(29, fmt=
'(a)') ch_dummy;
end do 1674 close(29, status=
'keep')
1690 #if (FLEX_RIG_MOD==1) 1694 #elif (FLEX_RIG_MOD==2) 1696 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
1699 open(29, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
1701 if (ios /= 0) stop
' >>> sico_init: Error when opening the flex-rig file!' 1703 do n=1, 6;
read(29, fmt=
'(a)') ch_dummy;
end do 1709 close(29, status=
'keep')
1713 #elif (REBOUND==0 || REBOUND==1) 1727 #if (DISC>0) /* Ice discharge parameterization */ 1734 call boundary(time_init, dtime, dxi, deta, &
1735 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1751 #if (!defined(TEMP_INIT) || TEMP_INIT==1) 1753 #elif (TEMP_INIT==2) 1755 #elif (TEMP_INIT==3) 1757 #elif (TEMP_INIT==4) 1760 write(6, fmt=
'(a)')
' >>> sico_init:' 1761 write(6, fmt=
'(a)')
' TEMP_INIT must be set to either 1, 2, 3 or 4!' 1776 stop
' >>> sico_init: Parameter ENHMOD must be between 1 and 5!' 1785 #if (DISC>0) /* Ice discharge parameterization */ 1792 call boundary(time_init, dtime, dxi, deta, &
1793 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1817 stop
' >>> sico_init: Parameter ENHMOD must be between 1 and 5!' 1826 #if (DISC>0) /* Ice discharge parameterization */ 1831 call boundary(time_init, dtime, dxi, deta, &
1832 delta_ts, glac_index, z_sl, dzsl_dtau, z_mar)
1863 #if (MARGIN==1 || MARGIN==2) 1872 if ( (
maske(j,i)==0_i2b) &
1874 ( (
maske(j,i+1)==3_i2b) &
1875 .or.(
maske(j,i-1)==3_i2b) &
1876 .or.(
maske(j+1,i)==3_i2b) &
1877 .or.(
maske(j-1,i)==3_i2b) ) &
1881 if ( (
maske(j,i)==3_i2b) &
1883 ( (
maske(j,i+1)==0_i2b) &
1884 .or.(
maske(j,i-1)==0_i2b) &
1885 .or.(
maske(j+1,i)==0_i2b) &
1886 .or.(
maske(j-1,i)==0_i2b) ) &
1890 if ( (
maske(j,i)==3_i2b) &
1892 ( (
maske(j,i+1)==2_i2b) &
1893 .or.(
maske(j,i-1)==2_i2b) &
1894 .or.(
maske(j+1,i)==2_i2b) &
1895 .or.(
maske(j-1,i)==2_i2b) ) &
1899 if ( (
maske(j,i)==2_i2b) &
1901 ( (
maske(j,i+1)==3_i2b) &
1902 .or.(
maske(j,i-1)==3_i2b) &
1903 .or.(
maske(j+1,i)==3_i2b) &
1904 .or.(
maske(j-1,i)==3_i2b) ) &
1914 if ( (
maske(j,i)==2_i2b) &
1915 .and. (
maske(j+1,i)==3_i2b) &
1920 if ( (
maske(j,i)==2_i2b) &
1921 .and. (
maske(j-1,i)==3_i2b) &
1930 if ( (
maske(j,i)==2_i2b) &
1931 .and. (
maske(j,i+1)==3_i2b) &
1936 if ( (
maske(j,i)==2_i2b) &
1937 .and. (
maske(j,i-1)==3_i2b) &
1944 stop
' >>> sico_init: MARGIN must be either 1, 2 or 3!' 1949 #if (GRID==0 || GRID==1) 1953 dist_dxdy(jr,ir) = sqrt( (
real(ir,dp)*dxi)**2 + (
real(jr,dp)*deta)**2 )
1964 #if (DYNAMICS==1 || DYNAMICS==2) 1969 #if (MARGIN==3 || DYNAMICS==2) 1970 call calc_vxy_ssa(z_sl, dxi, deta, dzeta_c, dzeta_t, ii, jj, nn)
1985 stop
' >>> sico_init: DYNAMICS must be either 0, 1 or 2!' 1988 call calc_dxyz(dxi, deta, dzeta_c, dzeta_t)
1992 #if (CALCMOD==0 || CALCMOD==-1) 2017 if ( (
maske(j,i) == 0_i2b).and.(
n_cts(j,i) == 1_i2b) )
then 2030 #elif (CALCMOD==2 || CALCMOD==3) 2048 stop
' >>> sico_init: Parameter CALCMOD must be either -1, 0, 1, 2 or 3!' 2056 filename_with_path = trim(outpath)//
'/'//trim(runname)//
'.ser' 2058 open(12, iostat=ios, file=trim(filename_with_path), status=
'new')
2060 if (ios /= 0) stop
' >>> sico_init: Error when opening the ser file!' 2067 1102
format(
' t(a) D_Ts(deg C) z_sl(m)',/, &
2068 ' V(m^3) V_g(m^3) V_f(m^3)', &
2069 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
2070 ' V_sle(m) V_t(m^3)', &
2072 ' H_max(m) H_t_max(m)', &
2073 ' zs_max(m) vs_max(m/a) Tbh_max(C)')
2074 1103
format(
'----------------------------------------------------', &
2075 '---------------------------------------')
2082 1112
format(
' t(a) glac_ind(1) z_sl(m)',/, &
2083 ' V(m^3) V_g(m^3) V_f(m^3)', &
2084 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
2085 ' V_sle(m) V_t(m^3)', &
2087 ' H_max(m) H_t_max(m)', &
2088 ' zs_max(m) vs_max(m/a) Tbh_max(C)')
2089 1113
format(
'----------------------------------------------------', &
2090 '---------------------------------------')
2097 1122
format(
' t(a) (Dummy)(1) z_sl(m)',/, &
2098 ' V(m^3) V_g(m^3) V_f(m^3)', &
2099 ' A(m^2) A_g(m^2) A_f(m^2)',/, &
2100 ' V_sle(m) V_t(m^3)', &
2102 ' H_max(m) H_t_max(m)', &
2103 ' zs_max(m) vs_max(m/a) Tbh_max(C)')
2104 1123
format(
'----------------------------------------------------', &
2105 '---------------------------------------')
2145 #if (GRID==0 || GRID==1) /* Stereographic projection */ 2152 #elif (GRID==2) /* Geographical coordinates */ 2159 filename_with_path = trim(outpath)//
'/'//trim(runname)//
'.core' 2161 open(14, iostat=ios, file=trim(filename_with_path), status=
'new')
2163 if (ios /= 0) stop
' >>> sico_init: Error when opening the core file!' 2170 1106
format(
' t(a) D_Ts(C) z_sl(m)',/, &
2171 ' H_GR(m) H_G2(m) H_D3(m)', &
2172 ' H_CC(m) H_NG(m) H_NE(m) H_EG(m)',/, &
2173 ' v_GR(m/a) v_G2(m/a) v_D3(m/a)', &
2174 ' v_CC(m/a) v_NG(m/a) v_NE(m/a) v_EG(m/a)',/, &
2175 ' T_GR(C) T_G2(C) T_D3(C)', &
2176 ' T_CC(C) T_NG(C) T_NE(C) T_EG(C)')
2177 1107
format(
'----------------------------------------------------', &
2178 '----------------------------------------------------')
2185 1116
format(
' t(a) glac_ind(1) z_sl(m)',/, &
2186 ' H_GR(m) H_G2(m) H_D3(m)', &
2187 ' H_CC(m) H_NG(m) H_NE(m) H_EG(m)',/, &
2188 ' v_GR(m/a) v_G2(m/a) v_D3(m/a)', &
2189 ' v_CC(m/a) v_NG(m/a) v_NE(m/a) v_EG(m/a)',/, &
2190 ' T_GR(C) T_G2(C) T_D3(C)', &
2191 ' T_CC(C) T_NG(C) T_NE(C) T_EG(C)')
2192 1117
format(
'----------------------------------------------------', &
2193 '----------------------------------------------------')
2200 1126
format(
' t(a) (Dummy)(1) z_sl(m)',/, &
2201 ' H_GR(m) H_G2(m) H_D3(m)', &
2202 ' H_CC(m) H_NG(m) H_NE(m) H_EG(m)',/, &
2203 ' v_GR(m/a) v_G2(m/a) v_D3(m/a)', &
2204 ' v_CC(m/a) v_NG(m/a) v_NE(m/a) v_EG(m/a)',/, &
2205 ' T_GR(C) T_G2(C) T_D3(C)', &
2206 ' T_CC(C) T_NG(C) T_NE(C) T_EG(C)')
2207 1127
format(
'----------------------------------------------------', &
2208 '----------------------------------------------------')
2214 #if (defined(OUTPUT_INIT)) 2216 #if (OUTPUT_INIT==0) 2217 flag_init_output = .false.
2218 #elif (OUTPUT_INIT==1) 2219 flag_init_output = .true.
2221 stop
' >>> sico_init: OUTPUT_INIT must be either 0 or 1!' 2225 flag_init_output = .true.
2231 flag_3d_output = .false.
2233 flag_3d_output = .true.
2235 stop
' >>> sico_init: ERGDAT must be either 0 or 1!' 2238 if (flag_init_output) &
2239 call output1(runname, time_init, delta_ts, glac_index, z_sl, &
2240 flag_3d_output, ndat2d, ndat3d)
2244 if (time_output(1) <= time_init+
eps)
then 2247 flag_3d_output = .false.
2249 flag_3d_output = .true.
2251 stop
' >>> sico_init: ERGDAT must be either 0 or 1!' 2254 call output1(runname, time_init, delta_ts, glac_index, z_sl, &
2255 flag_3d_output, ndat2d, ndat3d)
2261 flag_3d_output = .false.
2263 if (flag_init_output) &
2264 call output1(runname, time_init, delta_ts, glac_index, z_sl, &
2265 flag_3d_output, ndat2d, ndat3d)
2267 if (time_output(1) <= time_init+
eps)
then 2269 flag_3d_output = .true.
2271 call output1(runname, time_init, delta_ts, glac_index, z_sl, &
2272 flag_3d_output, ndat2d, ndat3d)
2277 stop
' >>> sico_init: OUTPUT must be either 1, 2 or 3!' 2280 if (flag_init_output)
then 2281 call output2(time_init, dxi, deta, delta_ts, glac_index, z_sl)
2282 call output4(time_init, dxi, deta, delta_ts, glac_index, z_sl)
2285 #if (defined(EXEC_MAKE_C_DIS_0)) 2291 write(6, fmt=
'(a)')
' ' 2292 write(6, fmt=
'(a)')
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * ' 2293 write(6, fmt=
'(a)')
' ' 2294 write(6, fmt=
'(a)')
' sico_init: Routine calc_c_dis_0 successfully completed, ' 2295 write(6, fmt=
'(a)')
' c_dis_0 written on file out_runname.dat ' 2296 write(6, fmt=
'(a)')
' (in directory specified by OUTPATH). ' 2297 write(6, fmt=
'(a)')
' Execution of SICOPOLIS stopped. ' 2298 write(6, fmt=
'(a)')
' ' 2299 write(6, fmt=
'(a)')
' * * * * * * * * * * * * * * * * * * * * * * * * * * * * ' 2300 write(6, fmt=
'(a)')
' ' 2305 stop
' >>> sico_init: EXEC_MAKE_C_DIS_0 requires DISC>0!' 2319 #if (GRID==0 || GRID==1) 2328 real(dp),
intent(out) :: dxi, deta
2330 integer(i4b) :: i, j, n
2331 integer(i4b) :: ios, n_dummy
2333 real(dp) :: xi0, eta0
2334 real(dp) :: h_ice, freeboard_ratio
2335 character :: ch_dummy
2337 character(len= 8) :: ch_imax
2338 character(len=128) :: fmt4
2339 character(len=256) :: filename_with_path
2341 write(ch_imax, fmt=
'(i8)') imax
2342 write(fmt4, fmt=
'(a)')
'('//trim(adjustl(ch_imax))//
'(i1),i1)' 2346 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2347 trim(zs_present_file)
2349 open(21, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2351 if (ios /= 0) stop
' >>> topography1: Error when opening the zs file!' 2353 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2354 trim(zl_present_file)
2356 open(22, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2358 if (ios /= 0) stop
' >>> topography1: Error when opening the zl file!' 2360 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2363 open(23, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2365 if (ios /= 0) stop
' >>> topography1: Error when opening the zl0 file!' 2367 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2368 trim(mask_present_file)
2370 open(24, iostat=ios, file=trim(filename_with_path), recl=
rcl2, status=
'old')
2372 if (ios /= 0) stop
' >>> topography1: Error when opening the mask file!' 2374 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do 2375 do n=1, 6;
read(22, fmt=
'(a)') ch_dummy;
end do 2376 do n=1, 6;
read(23, fmt=
'(a)') ch_dummy;
end do 2377 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do 2380 read(21, fmt=*) (
zs(j,i), i=0,imax)
2381 read(22, fmt=*) (
zl(j,i), i=0,imax)
2382 read(23, fmt=*) (
zl0(j,i), i=0,imax)
2383 read(24, fmt=trim(fmt4)) (
maske(j,i), i=0,imax)
2386 close(21, status=
'keep')
2387 close(22, status=
'keep')
2388 close(23, status=
'keep')
2389 close(24, status=
'keep')
2391 #if (defined(ZB_PRESENT_FILE)) 2393 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2394 trim(zb_present_file)
2396 open(25, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2398 if (ios /= 0) stop
' >>> topography1: Error when opening the zb file!' 2400 do n=1, 6;
read(25, fmt=
'(a)') ch_dummy;
end do 2403 read(25, fmt=*) (
zb(j,i), i=0,imax)
2406 close(25, status=
'keep')
2410 write(6, fmt=
'(a)')
' >>> topography1: ZB_PRESENT_FILE not defined,' 2411 write(6, fmt=
'(a)')
' thus zb = zl assumed.' 2420 deta = dx *1000.0_dp
2423 eta0 = y0 *1000.0_dp
2430 if (
maske(j,i) <= 1)
then 2434 else if (
maske(j,i) == 2)
then 2436 #if (MARGIN==1 || MARGIN==2) 2444 else if (
maske(j,i) == 3)
then 2446 #if (MARGIN==1 || (MARGIN==2 && MARINE_ICE_FORMATION==1)) 2450 #elif (MARGIN==2 && MARINE_ICE_FORMATION==2) 2452 h_ice =
zs(j,i)-
zb(j,i)
2453 zs(j,i) =
zl(j,i)+h_ice
2456 h_ice =
zs(j,i)-
zb(j,i)
2457 zs(j,i) = freeboard_ratio*h_ice
2458 zb(j,i) =
zs(j,i)-h_ice
2463 xi(i) = xi0 +
real(i,
dp)*dxi
2464 eta(j) = eta0 +
real(j,
dp)*deta
2491 #if (GRID==0 || GRID==1) /* Stereographic projection */ 2496 #elif (GRID==2) /* Geographic coordinates */ 2531 #if (GRID==0 || GRID==1) 2540 real(dp),
intent(out) :: dxi, deta
2542 integer(i4b) :: i, j, n
2544 real(dp) :: xi0, eta0
2545 character :: ch_dummy
2547 character(len= 8) :: ch_imax
2548 character(len=128) :: fmt4
2549 character(len=256) :: filename_with_path
2551 write(ch_imax, fmt=
'(i8)') imax
2552 write(fmt4, fmt=
'(a)')
'('//trim(adjustl(ch_imax))//
'(i1),i1)' 2556 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2559 open(23, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2561 if (ios /= 0) stop
' >>> topography2: Error when opening the zl0 file!' 2563 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2564 trim(mask_present_file)
2566 open(24, iostat=ios, file=trim(filename_with_path), recl=
rcl2, status=
'old')
2568 if (ios /= 0) stop
' >>> topography2: Error when opening the mask file!' 2570 do n=1, 6;
read(23, fmt=
'(a)') ch_dummy;
end do 2571 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do 2574 read(23, fmt=*) (
zl0(j,i), i=0,imax)
2575 read(24, fmt=trim(fmt4)) (
maske(j,i), i=0,imax)
2578 close(23, status=
'keep')
2579 close(24, status=
'keep')
2584 deta = dx *1000.0_dp
2587 eta0 = y0 *1000.0_dp
2592 if (
maske(j,i) <= 1)
then 2599 #if (MARGIN==1 || MARGIN==2) 2609 xi(i) = xi0 +
real(i,
dp)*dxi
2610 eta(j) = eta0 +
real(j,
dp)*deta
2637 #if (GRID==0 || GRID==1) /* Stereographic projection */ 2642 #elif (GRID==2) /* Geographic coordinates */ 2675 subroutine topography3(dxi, deta, z_sl, anfdatname)
2679 #if (GRID==0 || GRID==1) 2688 character(len=100),
intent(in) :: anfdatname
2690 real(dp),
intent(out) :: dxi, deta, z_sl
2692 integer(i4b) :: i, j, n
2694 character(len=256) :: filename_with_path
2695 character :: ch_dummy
2703 filename_with_path = trim(inpath)//
'/'//trim(
ch_domain_short)//
'/'// &
2706 open(23, iostat=ios, file=trim(filename_with_path), recl=
rcl1, status=
'old')
2708 if (ios /= 0) stop
' >>> topography3: Error when opening the zl0 file!' 2710 do n=1, 6;
read(23, fmt=
'(a)') ch_dummy;
end do 2713 read(23, fmt=*) (
zl0(j,i), i=0,imax)
2716 close(23, status=
'keep')
2721 deta = dx *1000.0_dp
2729 #if (GRID==0 || GRID==1) /* Stereographic projection */ 2734 #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
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
subroutine, public calc_c_dis_0(dxi, deta)
Constant in ice discharge parameterization (Greenland). [Determine (amount of magnitude of) constant ...
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.
subroutine, public disc_param(dtime)
Ice discharge parameters (Greenland). [Assign ice discharge parameters.].
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, public disc_fields()
Dependence of ice discharge coefficient on latitude (Greenland). [Determine dependence of ice dischar...
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
Ice discharge parameterization for the Greenland ice sheet.
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...