Skip to content

Commit

Permalink
(*)Fix ice shelf dimensional rescaling bugs
Browse files Browse the repository at this point in the history
  Fixed two minor bugs in the ice-shelf code that impede its performance when
dimensional scaling is used.

- Report rescaling factors of 1 in the ice shelf restart files, now that the
  variables are rescaled before being written to the restart files.  Without
  this change, certain runs with enabled ice shelf capabilities will not
  reproduce across restarts when dimensional rescaling is enabled.

- Pass the unit scaling type to the EOS_init call.  Without this change,
  cases with an active ice shelf will not pass dimensional rescaling tests
  if there is a nonlinear equation of state.

All answers are bitwise identical without dimensional rescaling or an active ice
shelf, but in some cases answers will be changed so that now the code will pass
some reproducibility tests.
  • Loading branch information
Hallberg-NOAA authored and marshallward committed Jun 5, 2022
1 parent 4a6a175 commit 95119a2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ice_shelf/MOM_ice_shelf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, forces_in,
CS%utide(:,:) = utide
endif

call EOS_init(param_file, CS%eqn_of_state)
call EOS_init(param_file, CS%eqn_of_state, US)

!! new parameters that need to be in MOM_input

Expand Down Expand Up @@ -1768,19 +1768,16 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, forces_in,
call hchksum(ISS%area_shelf_h, "IS init: area_shelf_h", G%HI, haloshift=0, scale=US%L_to_m*US%L_to_m)
endif



CS%Time = Time


if (CS%active_shelf_dynamics .and. .not.CS%isthermo) then
ISS%water_flux(:,:) = 0.0
endif

if (shelf_mass_is_dynamic) &
call initialize_ice_shelf_dyn(param_file, Time, ISS, CS%dCS, G, US, CS%diag, new_sim, solo_ice_sheet_in)

call fix_restart_unit_scaling(US)
call fix_restart_unit_scaling(US, unscaled=.true.)

call get_param(param_file, mdl, "SAVE_INITIAL_CONDS", save_IC, &
"If true, save the ice shelf initial conditions.", default=.false.)
Expand All @@ -1794,7 +1791,6 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, forces_in,
filename=IC_file, write_ic=.true.)
endif


CS%id_area_shelf_h = register_diag_field('ice_shelf_model', 'area_shelf_h', CS%diag%axesT1, CS%Time, &
'Ice Shelf Area in cell', 'meter-2', conversion=US%L_to_m**2)
CS%id_shelf_mass = register_diag_field('ice_shelf_model', 'shelf_mass', CS%diag%axesT1, CS%Time, &
Expand Down

0 comments on commit 95119a2

Please sign in to comment.