Skip to content

Commit

Permalink
Merge branch 'jinboxie/atm/chemistry_output_maint-3.0' into maint-3.0…
Browse files Browse the repository at this point in the history
… (PR #6716)

The chemistry reaction rate of r_lch4 and r_lco_h are output as 0 due to
a bug in the output of chemistry file, when no chemistry output flags are set.
The bug is fixed by modifying the if clause in the code.

Fixes #6711

[BFB]
  • Loading branch information
wlin7 committed Nov 21, 2024
2 parents fa1c317 + daae468 commit 3f899ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/eam/src/chemistry/mozart/rate_diags.F90
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ subroutine rate_diags_calc( rxt_rates, vmr, m, ncol, lchnk, pver, pdeldry, mbar
rxt_rates(:ncol,:,rxt_tag_map(i)) = rxt_rates(:ncol,:,rxt_tag_map(i)) * m(:,:)
call outfld( rate_names(i), rxt_rates(:ncol,:,rxt_tag_map(i)), ncol, lchnk )

if ( .not. history_UCIgaschmbudget_2D .and. .not. history_UCIgaschmbudget_2D_levels) return
if (history_UCIgaschmbudget_2D .or. history_UCIgaschmbudget_2D_levels) then

if (rate_names(i) .eq. 'r_lch4') then
!kg/m2/sec
Expand Down Expand Up @@ -166,6 +166,8 @@ subroutine rate_diags_calc( rxt_rates, vmr, m, ncol, lchnk, pver, pdeldry, mbar
endif

endif

endif
enddo

end subroutine rate_diags_calc
Expand Down

0 comments on commit 3f899ce

Please sign in to comment.