Skip to content

Commit

Permalink
Add code to reset diagnostic buckets to atmos_model.F90
Browse files Browse the repository at this point in the history
  • Loading branch information
climbfuji committed Dec 30, 2020
1 parent 9e59de2 commit dacd56a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
25 changes: 24 additions & 1 deletion atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ subroutine update_atmos_radiation_physics (Atmos)
!-----------------------------------------------------------------------
type (atmos_data_type), intent(in) :: Atmos
!--- local variables---
integer :: nb, jdat(8), rc
integer :: nb, jdat(8), rc, kdt_rad
procedure(IPD_func0d_proc), pointer :: Func0d => NULL()
procedure(IPD_func1d_proc), pointer :: Func1d => NULL()
!
Expand Down Expand Up @@ -300,6 +300,29 @@ subroutine update_atmos_radiation_physics (Atmos)
call IPD_step (IPD_Control, IPD_Data(:), IPD_Diag, IPD_Restart, IPD_func1d=Func1d)
#endif

!--- determine if radiation diagnostics buckets need to be cleared

This comment has been minimized.

Copy link
@junwang-noaa

junwang-noaa Dec 30, 2020

Collaborator

Should the changes below be better in the ccpp "time_vary" step rather than a separate section in atmos_model.F90?

if (nint(IPD_Control%fhzero*3600) >= nint(max(IPD_Control%fhswr,IPD_Control%fhlwr))) then
if (mod(IPD_Control%kdt,IPD_Control%nszero) == 1) then
do nb = 1,Atm_block%nblks
call IPD_Data(nb)%Intdiag%rad_zero(IPD_Control)
end do
endif
else
kdt_rad = nint(min(IPD_Control%fhswr,IPD_Control%fhlwr)/IPD_Control%dtp)
if (mod(IPD_Control%kdt,kdt_rad) == 1) then
do nb = 1,Atm_block%nblks
call IPD_Data(nb)%Intdiag%rad_zero(IPD_Control)
enddo
endif
endif

!--- determine if physics diagnostics buckets need to be cleared
if (mod(IPD_Control%kdt,IPD_Control%nszero) == 1) then
do nb = 1,Atm_block%nblks
call IPD_Data(nb)%Intdiag%phys_zero(IPD_Control)
end do
endif

!--- if coupled, assign coupled fields

if( IPD_Control%cplflx .or. IPD_Control%cplwav ) then
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics

0 comments on commit dacd56a

Please sign in to comment.