Skip to content

Commit

Permalink
Fix for specified ice restart issue #107
Browse files Browse the repository at this point in the history
- Variable Ice%sCS%OSS%SST_C is not an ice state and hence is not in ice_model.res.nc
  However for SPECIFIED_ICE=True it should be updated after restart, otherwise the model
  would have a restart issue (#107)
  In specified ice this variable is read from data_table every time step. So that is also
  the easiest way to update it after a restart.
- This update resolves issue#107.
  • Loading branch information
nikizadehgfdl committed Aug 20, 2019
1 parent 547c0cd commit c086497
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 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 @@ -2492,6 +2494,14 @@ subroutine ice_model_init(Ice, Time_Init, Time, Time_step_fast, Time_step_slow,
query_initialized(Ice%Ice_fast_restart, 'rough_moist'))
endif

if (specified_ice) then
allocate(dummy2d(sG%isc:sG%iec,sG%jsc:sG%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(isc:iec,jsc:jec,:), &
dummy2d(sG%isc:sG%iec,sG%jsc:sG%jec), ice_domain=Ice%slow_domain_NH, ts_in_K=.false. )
deallocate(dummy2d,dummy3d)
endif
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 c086497

Please sign in to comment.