Skip to content

Commit

Permalink
Removed second area weighting and second if clause to make sure the 0…
Browse files Browse the repository at this point in the history
…-0 case is handled correctly
  • Loading branch information
Katetc committed Sep 3, 2024
1 parent 9a8afbc commit 5251638
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dglc/dglc_datamode_noevolve_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,9 @@ subroutine dglc_datamode_noevolve_advance(gcomp, pio_subsystem, io_type, io_form
do ng = 1,lsize
if (Sg_icemask_coupled_fluxes(ns)%ptr(ng).gt.0.d0) then
if(Flgl_qice(ns)%ptr(ng) > 0.d0) then
rat = Flgl_qice(ns)%ptr(ng)*Sg_area(ns)%ptr(ng)/Tot_pos_smb(1)
rat = Flgl_qice(ns)%ptr(ng)/Tot_pos_smb(1)
Fgrg_rofi(ns)%ptr(ng) = Flgl_qice(ns)%ptr(ng) + rat*Tot_neg_smb(1)
else if (Flgl_qice(ns)%ptr(ng) < 0.d0) then
else
Fgrg_rofi(ns)%ptr(ng) = 0.d0
end if
else
Expand All @@ -453,9 +453,9 @@ subroutine dglc_datamode_noevolve_advance(gcomp, pio_subsystem, io_type, io_form
do ng = 1,lsize
if (Sg_icemask_coupled_fluxes(ns)%ptr(ng).gt.0.d0) then
if(Flgl_qice(ns)%ptr(ng) < 0.d0) then
rat = Flgl_qice(ns)%ptr(ng)*Sg_area(ns)%ptr(ng)/Tot_neg_smb(1)
rat = Flgl_qice(ns)%ptr(ng)/Tot_neg_smb(1)
Fgrg_rofi(ns)%ptr(ng) = Flgl_qice(ns)%ptr(ng) + rat*Tot_pos_smb(1)
else if (Flgl_qice(ns)%ptr(ng) > 0.d0) then
else
Fgrg_rofi(ns)%ptr(ng) = 0.d0
end if
else
Expand Down

0 comments on commit 5251638

Please sign in to comment.