Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion fv3/atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ subroutine update_atmos_model_state (Atmos, rc)
!--- local variables
integer :: i, localrc, sec_lastfhzerofh
integer :: isec, seconds, isec_fhzero
integer :: dtatm_temp
logical :: tmpflag_fhzero
real(kind=GFS_kind_phys) :: time_int, time_intfull
!
Expand Down Expand Up @@ -1012,9 +1013,10 @@ subroutine update_atmos_model_state (Atmos, rc)
if (mpp_pe() == mpp_root_pe()) write(6,*) 'gfs diags time since last bucket empty: ',time_int,' time_intfull=', &
time_intfull,' kdt=',GFS_control%kdt
call atmosphere_nggps_diag(Atmos%Time)
call get_time ( Atmos%Time_step, dtatm_temp)
call fv3atm_diag_output(Atmos%Time, GFS_Diag, Atm_block, GFS_control%nx, GFS_control%ny, &
GFS_control%levs, 1, 1, 1.0_GFS_kind_phys, time_int, time_intfull, &
GFS_control%fhswr, GFS_control%fhlwr, GFS_control)
GFS_control%fhswr, GFS_control%fhlwr, GFS_control, dtatm_temp)
endif

!--- find current fhzero
Expand Down
20 changes: 10 additions & 10 deletions io/fv3atm_history_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,21 @@ end subroutine fv3atm_diag_register
!! This routine transfers diagnostic data to the FMS diagnostic
!! manager for eventual output to the history files.
subroutine fv3atm_diag_output(time, diag, atm_block, nx, ny, levs, ntcw, ntoz, &
dt, time_int, time_intfull, time_radsw, time_radlw, Model)
dt, time_int, time_intfull, time_radsw, time_radlw, Model, dt_atmos)
!--- subroutine interface variable definitions
type(time_type), intent(in) :: time
type(GFS_externaldiag_type), intent(in) :: diag(:)
type (block_control_type), intent(in) :: atm_block
type(GFS_control_type), intent(in) :: Model
integer, intent(in) :: nx, ny, levs, ntcw, ntoz
integer, intent(in) :: nx, ny, levs, ntcw, ntoz, dt_atmos
real(kind=kind_phys), intent(in) :: dt
real(kind=kind_phys), intent(in) :: time_int
real(kind=kind_phys), intent(in) :: time_intfull
real(kind=kind_phys), intent(in) :: time_radsw
real(kind=kind_phys), intent(in) :: time_radlw

call shared_history_data%output(time, diag, atm_block, nx, ny, levs, ntcw, ntoz, &
dt, time_int, time_intfull, time_radsw, time_radlw, Model)
dt, time_int, time_intfull, time_radsw, time_radlw, Model, dt_atmos)

end subroutine fv3atm_diag_output

Expand Down Expand Up @@ -282,14 +282,14 @@ end subroutine history_type_register
!! implementation of the public fv3atm_diag_output routine. Never
!! call this directly.
subroutine history_type_output(hist, time, diag, atm_block, nx, ny, levs, ntcw, ntoz, &
dt, time_int, time_intfull, time_radsw, time_radlw, Model)
dt, time_int, time_intfull, time_radsw, time_radlw, Model, dt_atmos)
!--- subroutine interface variable definitions
class(history_type) :: hist
type(time_type), intent(in) :: time
type(GFS_externaldiag_type), intent(in) :: diag(:)
type (block_control_type), intent(in) :: atm_block
type(GFS_control_type), intent(in) :: Model
integer, intent(in) :: nx, ny, levs, ntcw, ntoz
integer, intent(in) :: nx, ny, levs, ntcw, ntoz, dt_atmos
real(kind=kind_phys), intent(in) :: dt
real(kind=kind_phys), intent(in) :: time_int
real(kind=kind_phys), intent(in) :: time_intfull
Expand All @@ -310,8 +310,8 @@ subroutine history_type_output(hist, time, diag, atm_block, nx, ny, levs, ntcw,

rtime_int = one/time_int
rtime_intfull = one/time_intfull
rtime_radsw = one/time_radsw
rtime_radlw = one/time_radlw
rtime_radsw = one/(time_radsw * (int((time_int-dt_atmos)/time_radsw)+1))
rtime_radlw = one/(time_radlw * (int((time_int-dt_atmos)/time_radlw)+1))

! if(mpp_pe()==mpp_root_pe())print *,'in,fv3atm_io. time avg, time_int=',time_int
history_loop: do idx = 1,hist%tot_diag_idx
Expand All @@ -322,13 +322,13 @@ subroutine history_type_output(hist, time, diag, atm_block, nx, ny, levs, ntcw,
lcnvfac = lcnvfac*rtime_intfull
! if(mpp_pe()==mpp_root_pe())print *,'in,fv3atm_io. full time avg, field=',trim(Diag(idx)%name),' time=',time_intfull
else if ( trim(diag(idx)%time_avg_kind) == 'rad_lw' ) then
lcnvfac = lcnvfac*min(rtime_radlw,rtime_int)
lcnvfac = lcnvfac*rtime_radlw
! if(mpp_pe()==mpp_root_pe())print *,'in,fv3atm_io. rad longwave avg, field=',trim(Diag(idx)%name),' time=',time_radlw
else if ( trim(diag(idx)%time_avg_kind) == 'rad_sw' ) then
lcnvfac = lcnvfac*min(rtime_radsw,rtime_int)
lcnvfac = lcnvfac*rtime_radsw
! if(mpp_pe()==mpp_root_pe())print *,'in,fv3atm_io. rad shortwave avg, field=',trim(Diag(idx)%name),' time=',time_radsw
else if ( trim(diag(idx)%time_avg_kind) == 'rad_swlw_min' ) then
lcnvfac = lcnvfac*min(max(rtime_radsw,rtime_radlw),rtime_int)
lcnvfac = lcnvfac*max(rtime_radsw,rtime_radlw)
! if(mpp_pe()==mpp_root_pe())print *,'in,fv3atm_io. rad swlw min avg, field=',trim(Diag(idx)%name),' time=',time_radlw,time_radsw,time_int
else
lcnvfac = lcnvfac*rtime_int
Expand Down
Loading