Skip to content

Commit

Permalink
Bug fix for do_ice_limit
Browse files Browse the repository at this point in the history
salt_to_ice already includes the IST%part_size factor at line 1197.

This extra factor (with an effectively out of bound k=ncat+1) causes the ice limiting simulations (sm4p1) to crash for some processor layouts with:
FATAL from PE   812: NaN in input field of reproducing_sum(_2d).
where the reproducing_sum refers to the ice salinity.

I verified that this mod fixes the issue with sm4p1 and luckily reproduces the answers for the layouts that did work before the fix.
  • Loading branch information
nikizadehgfdl authored Jul 16, 2019
1 parent d9bf834 commit a741184
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SIS_slow_thermo.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ subroutine SIS2_thermodynamics(IST, dt_slow, CS, OSS, FIA, IOF, G, IG)
qflx_lim_ice(i,j) = enth_to_melt * I_enth_units * Idt_slow
IOF%Enth_Mass_out_ocn(i,j) = IOF%Enth_Mass_out_ocn(i,j) - enth_ice_to_ocn
if (CS%ice_rel_salin > 0.0) then
salt_change(i,j) = salt_change(i,j) + IST%part_size(i,j,k) * salt_to_ice
salt_change(i,j) = salt_change(i,j) + salt_to_ice
endif
endif

Expand Down

0 comments on commit a741184

Please sign in to comment.