Skip to content

Commit

Permalink
wrap diagnostic output with if block
Browse files Browse the repository at this point in the history
  • Loading branch information
mattldawson committed Nov 5, 2024
1 parent b30a585 commit 8d42d19
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/photolysis_rates.F90
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,13 @@ subroutine get( this, la_srb, spherical_geometry, grid_warehouse, &
if( allocated( quantum_yield ) ) deallocate( quantum_yield )
end do rate_loop

call diagout( 'annotatedjlabels.new', this%handles_, &
this%enable_diagnostics_ )
call diagout( 'xsqy.'//file_tag//'.new', xsqyWrk, this%enable_diagnostics_ )

if (this%enable_diagnostics_) then
associate( enable => this%enable_diagnostics_ )
call diagout( 'annotatedjlabels.new', this%handles_, enable )
call diagout( 'xsqy.'//file_tag//'.new', xsqyWrk, enable )
end associate
end if

deallocate( zGrid )
deallocate( lambdaGrid )
deallocate( etfl )
Expand Down

0 comments on commit 8d42d19

Please sign in to comment.