@@ -764,6 +764,7 @@ subroutine handle_options(section, model)
764
764
call GetValue(section,' forcewrite_final' , model% options% forcewrite_final)
765
765
call GetValue(section,' restart' ,model% options% is_restart)
766
766
call GetValue(section,' restart_extend_velo' ,model% options% restart_extend_velo)
767
+ call GetValue(section,' forcewrite_restart' ,model% options% forcewrite_restart)
767
768
768
769
end subroutine handle_options
769
770
@@ -1666,6 +1667,17 @@ subroutine print_options(model)
1666
1667
endif
1667
1668
end if
1668
1669
1670
+ if (model% options% forcewrite_restart) then
1671
+ call write_log(' Will write to output files on restart' )
1672
+ endif
1673
+
1674
+ ! ! This option is not currently supported
1675
+ ! ! if (model%options%which_bproc < 0 .or. model%options%which_bproc >= size(which_bproc)) then
1676
+ ! ! call write_log('Error, basal_proc out of range',GM_FATAL)
1677
+ ! ! end if
1678
+ ! ! write(message,*) 'basal_proc : ',model%options%which_bproc,which_bproc(model%options%which_bproc)
1679
+ ! ! call write_log(message)
1680
+
1669
1681
! HO options
1670
1682
1671
1683
if (model% options% whichdycore /= DYCORE_GLIDE) then ! glissade higher-order
@@ -2640,10 +2652,6 @@ subroutine print_parameters(model)
2640
2652
elseif (model% options% which_ho_babc == HO_BABC_POWERLAW) then
2641
2653
write (message,* ) ' Cp for power law, Pa (m/yr)^(-1/3) : ' , model% basal_physics% powerlaw_c_const
2642
2654
call write_log(message)
2643
- write (message,* ) ' Max Cp for power law, Pa (m/yr)^(-1/3) : ' , model% basal_physics% powerlaw_c_max
2644
- call write_log(message)
2645
- write (message,* ) ' Min Cp for power law, Pa (m/yr)^(-1/3) : ' , model% basal_physics% powerlaw_c_min
2646
- call write_log(message)
2647
2655
write (message,* ) ' m exponent for power law : ' , model% basal_physics% powerlaw_m
2648
2656
call write_log(message)
2649
2657
elseif (model% options% which_ho_babc == HO_BABC_COULOMB_FRICTION) then
@@ -2660,10 +2668,6 @@ subroutine print_parameters(model)
2660
2668
call write_log(message)
2661
2669
write (message,* ) ' Cp for Schoof power law, Pa (m/yr)^(-1/3) : ' , model% basal_physics% powerlaw_c_const
2662
2670
call write_log(message)
2663
- write (message,* ) ' Max Cp for power law, Pa (m/yr)^(-1/3) : ' , model% basal_physics% powerlaw_c_max
2664
- call write_log(message)
2665
- write (message,* ) ' Min Cp for power law, Pa (m/yr)^(-1/3) : ' , model% basal_physics% powerlaw_c_min
2666
- call write_log(message)
2667
2671
write (message,* ) ' m exponent for Schoof power law : ' , model% basal_physics% powerlaw_m
2668
2672
call write_log(message)
2669
2673
elseif (model% options% which_ho_babc == HO_BABC_COULOMB_POWERLAW_TSAI) then
@@ -2673,10 +2677,6 @@ subroutine print_parameters(model)
2673
2677
call write_log(message)
2674
2678
write (message,* ) ' Cp for Tsai power law, Pa (m/yr)^(-1/3) : ' , model% basal_physics% powerlaw_c_const
2675
2679
call write_log(message)
2676
- write (message,* ) ' Max Cp for power law, Pa (m/yr)^(-1/3) : ' , model% basal_physics% powerlaw_c_max
2677
- call write_log(message)
2678
- write (message,* ) ' Min Cp for power law, Pa (m/yr)^(-1/3) : ' , model% basal_physics% powerlaw_c_min
2679
- call write_log(message)
2680
2680
write (message,* ) ' m exponent for Tsai power law : ' , model% basal_physics% powerlaw_m
2681
2681
call write_log(message)
2682
2682
elseif (model% options% which_ho_babc == HO_BABC_POWERLAW_EFFECPRESS) then
@@ -3399,6 +3399,7 @@ subroutine define_glide_restart_variables(model, model_id)
3399
3399
! Subroutine arguments
3400
3400
!- -----------------------------------------------------------------------------------
3401
3401
type (glide_global_type), intent (in ) :: model ! > Derived type holding all model info
3402
+
3402
3403
integer , intent (in ) :: model_id ! > identifier of this ice sheet instance (1 - N, where N is the total number of ice sheet models in this run)
3403
3404
3404
3405
!- -----------------------------------------------------------------------------------
@@ -3458,7 +3459,7 @@ subroutine define_glide_restart_variables(model, model_id)
3458
3459
call glide_add_to_restart_variable_list(' smb_gradz' , model_id)
3459
3460
end select
3460
3461
3461
- call glide_add_to_restart_variable_list(' smb_reference_usrf ' , model_id)
3462
+ call glide_add_to_restart_variable_list(' usrf_ref ' , model_id)
3462
3463
3463
3464
case (SMB_INPUT_FUNCTION_XYZ)
3464
3465
@@ -3484,7 +3485,7 @@ subroutine define_glide_restart_variables(model, model_id)
3484
3485
if (options% smb_input_function == SMB_INPUT_FUNCTION_XY_GRADZ) then
3485
3486
! usrf_ref was added to restart above; nothing to do here
3486
3487
else
3487
- call glide_add_to_restart_variable_list(' smb_reference_usrf ' , model_id)
3488
+ call glide_add_to_restart_variable_list(' usrf_ref ' , model_id)
3488
3489
endif
3489
3490
3490
3491
case (ARTM_INPUT_FUNCTION_XYZ)
@@ -3811,6 +3812,36 @@ subroutine define_glide_restart_variables(model, model_id)
3811
3812
call glide_add_to_restart_variable_list(' f_effecpress_ocean_p' , model_id)
3812
3813
endif
3813
3814
3815
+ ! fields needed for inversion options that try to match local thickness or upper surface elevation
3816
+ ! Note: If usrf_obs is supplied, thck_obs will be computed at initialization
3817
+ if (options% which_ho_powerlaw_c == HO_POWERLAW_C_INVERSION .or. &
3818
+ options% which_ho_coulomb_c == HO_COULOMB_C_INVERSION .or. &
3819
+ options% which_ho_deltaT_ocn == HO_DELTAT_OCN_INVERSION) then
3820
+ call glide_add_to_restart_variable_list(' usrf_obs' , model_id)
3821
+ ! WHL - velo_sfc_obs is not strictly needed unless inverting for surface velo,
3822
+ ! but is handy for diagnostics
3823
+ call glide_add_to_restart_variable_list(' velo_sfc_obs' , model_id)
3824
+ endif
3825
+
3826
+ ! fields needed for inversion options that try to match local dthck_dt
3827
+ ! Note: This is not strictly needed for all options, but still is a useful diagnostic.
3828
+ if (options% which_ho_deltaT_ocn /= HO_DELTAT_OCN_NONE) then
3829
+ call glide_add_to_restart_variable_list(' dthck_dt_obs' , model_id)
3830
+ call glide_add_to_restart_variable_list(' dthck_dt_obs_basin' , model_id)
3831
+ endif
3832
+
3833
+ ! effective pressure options
3834
+ ! f_effecpress_bwat represents the reduction of overburden pressure from bwatflx
3835
+ if (options% which_ho_effecpress == HO_EFFECPRESS_BWATFLX) then
3836
+ call glide_add_to_restart_variable_list(' f_effecpress_bwat' , model_id)
3837
+ endif
3838
+
3839
+ ! f_effecpress_ocean_p represents the reduction of overburden pressure when ocean_p > 0
3840
+ ! Needs to be saved in case this fraction is relaxed over time toward (1 - Hf/H)^p
3841
+ if (model% basal_physics% p_ocean_penetration > 0.0d0 ) then
3842
+ call glide_add_to_restart_variable_list(' f_effecpress_ocean_p' , model_id)
3843
+ endif
3844
+
3814
3845
! geothermal heat flux option
3815
3846
select case (options% gthf)
3816
3847
case (GTHF_COMPUTE)
@@ -3876,6 +3907,11 @@ subroutine define_glide_restart_variables(model, model_id)
3876
3907
call glide_add_to_restart_variable_list(' glacier_area_init' , model_id)
3877
3908
endif
3878
3909
3910
+ ! basal processes module - requires tauf for a restart
3911
+ ! ! if (options%which_bproc /= BAS_PROC_DISABLED ) then
3912
+ ! ! call glide_add_to_restart_variable_list('tauf', model_id)
3913
+ ! ! endif
3914
+
3879
3915
! TODO bmlt was set as a restart variable, but I'm not sure when or if it is needed.
3880
3916
3881
3917
! TODO age should be a restart variable if it is an input variable.
0 commit comments