Skip to content

Commit

Permalink
Update cam_diagnostics.F90 to fix FIDEAL
Browse files Browse the repository at this point in the history
  • Loading branch information
whannah1 authored Sep 20, 2024
1 parent dfeefff commit 66edb4d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions components/eam/src/physics/cam/cam_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1336,15 +1336,7 @@ subroutine diag_phys_writeout(state, psl)
ftem(:ncol,1) = ftem(:ncol,1) + ftem(:ncol,k)
end do
call outfld ('TMQ ',ftem, pcols ,lchnk )
!
! Mass of saturated q vertically integrated
!
call qsat(state%t(:ncol,:), state%pmid(:ncol,:), tem2(:ncol,:), ftem(:ncol,:))
ftem(:ncol,:) = ftem(:ncol,:) * state%pdel(:ncol,:) * rga
do k=2,pver
ftem(:ncol,1) = ftem(:ncol,1) + ftem(:ncol,k)
end do
call outfld ('TMQS ',ftem, pcols ,lchnk )

!
! Mass of vertically integrated water vapor flux
!
Expand Down Expand Up @@ -1378,6 +1370,14 @@ subroutine diag_phys_writeout(state, psl)

if (moist_physics) then

! Mass of saturated q vertically integrated
call qsat(state%t(:ncol,:), state%pmid(:ncol,:), tem2(:ncol,:), ftem(:ncol,:))
ftem(:ncol,:) = ftem(:ncol,:) * state%pdel(:ncol,:) * rga
do k=2,pver
ftem(:ncol,1) = ftem(:ncol,1) + ftem(:ncol,k)
end do
call outfld ('TMQS ',ftem, pcols ,lchnk )

! Relative humidity
call qsat(state%t(:ncol,:), state%pmid(:ncol,:), &
tem2(:ncol,:), ftem(:ncol,:))
Expand Down

0 comments on commit 66edb4d

Please sign in to comment.