Skip to content

Commit

Permalink
Merge branch 'bugfix/nhx_surf_emis_may_divide_by_zero' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlevy1981 committed Oct 1, 2024
2 parents 5db6529 + 714b4b9 commit 8cab038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/marbl_nhx_surface_emis_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ subroutine marbl_nhx_surface_emis_compute( &

call marbl_comp_Hstar_nhx(num_elements, ph, sst, sss, Hstar_nhx)

K(:) = c1 / (c1 / kg_nh3(:) + Hstar_nhx / kw_nh3(:))
K(:) = (kg_nh3(:) * kw_nh3(:)) / (kw_nh3(:) + Hstar_nhx * kg_nh3(:))
nhx_surface_emis(:) = (c1 - ifrac(:)) * K(:) * Hstar_nhx(:) * max(nh4(:),c0)

end subroutine marbl_nhx_surface_emis_compute
Expand Down

0 comments on commit 8cab038

Please sign in to comment.