Skip to content

Commit

Permalink
Merge pull request mom-ocean#109 from nikizadehgfdl/specified_ice_res…
Browse files Browse the repository at this point in the history
…tart_fix

Fix for specified ice restart issue mom-ocean#107
  • Loading branch information
Hallberg-NOAA authored Dec 2, 2019
2 parents df5879d + 226794e commit 29e266d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/ice_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,9 @@ subroutine ice_model_init(Ice, Time_Init, Time, Time_step_fast, Time_step_slow,
! model run and the input files.

real, allocatable, dimension(:,:) :: &
h_ice_input, dummy ! Temporary arrays.
h_ice_input, dummy,dummy2d ! Temporary arrays.
real, allocatable, dimension(:,:,:) :: &
dummy3d ! Temporary arrays.
real, allocatable, dimension(:,:) :: &
str_x, str_y, stress_mag ! Temporary stress arrays

Expand Down Expand Up @@ -2280,6 +2282,7 @@ subroutine ice_model_init(Ice, Time_Init, Time, Time_step_fast, Time_step_slow,
restart_path = trim(dirs%restart_input_dir)//trim(restart_file)

if (file_exist(restart_path)) then
call callTree_enter("ice_model_init():restore_from_restart_files "//trim(restart_file))
! Set values of IG%H_to_kg_m2 that will permit its absence from the restart
! file to be detected, and its difference from the value in this run to
! be corrected for.
Expand Down Expand Up @@ -2506,6 +2509,19 @@ subroutine ice_model_init(Ice, Time_Init, Time, Time_step_fast, Time_step_slow,
query_initialized(Ice%Ice_fast_restart, 'rough_moist'))
endif

!When SPECIFIED_ICE=True variable Ice%sCS%OSS%SST_C is used for the skin temperature
!and should be updated during each restart.
!However it is not an ice state variable and hence is not in ice restarts.
!Updating it from specified_ice data avoids restart issues for such models.
if (specified_ice) then
allocate(dummy2d(isc:iec,jsc:jec))
allocate(dummy3d(isc:iec,jsc:jec,2))
call get_sea_surface(Ice%sCS%Time, Ice%sCS%OSS%SST_C(isc:iec,jsc:jec), &
dummy3d,dummy2d, ice_domain=Ice%slow_domain_NH, ts_in_K=.false. )
deallocate(dummy2d,dummy3d)
endif

call callTree_leave("ice_model_init():restore_from_restart_files")
else ! no restart file implies initialization with no ice
sIST%part_size(:,:,:) = 0.0
sIST%part_size(:,:,0) = 1.0
Expand Down

0 comments on commit 29e266d

Please sign in to comment.