diff --git a/ccpp/CCPP_driver.F90 b/ccpp/CCPP_driver.F90 index bcea940c1..3d4a8e07f 100644 --- a/ccpp/CCPP_driver.F90 +++ b/ccpp/CCPP_driver.F90 @@ -59,6 +59,8 @@ subroutine CCPP_step (step, nblks, ierr) ! Local variables integer :: nb, nt, ntX integer :: ierr2 + integer :: kdt_iau + logical :: iauwindow_center ! DH* 20210104 - remove kdt_rad when code to clear diagnostic buckets is removed integer :: kdt_rad @@ -167,8 +169,17 @@ subroutine CCPP_step (step, nblks, ierr) endif !--- determine if physics diagnostics buckets need to be cleared + iauwindow_center = .false. + if (GFS_control%iau_offset > 0) then + kdt_iau = nint(GFS_control%iau_offset*3600./GFS_control%dtp) + if (GFS_control%kdt-1 == kdt_iau) then + iauwindow_center = .true. + if( GFS_control%me == 0)print *,'in ccpp step vary, iauwindow_center=',iauwindow_center,& + 'kdt=',GFS_control%kdt,'dtp=',GFS_control%dtp,'iau_offset=',GFS_control%iau_offset + endif + endif if ((mod(GFS_control%kdt-1,GFS_control%nszero)) == 0) then - call GFS_Intdiag%phys_zero(GFS_control) + call GFS_Intdiag%phys_zero(GFS_control, iauwindow_center=iauwindow_center) endif !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/fv3/atmos_model.F90 b/fv3/atmos_model.F90 index 0cd5d45e3..690bd74ea 100644 --- a/fv3/atmos_model.F90 +++ b/fv3/atmos_model.F90 @@ -1001,24 +1001,18 @@ subroutine update_atmos_model_state (Atmos, rc) call get_time (Atmos%Time - Atmos%Time_init, seconds) call atmosphere_nggps_diag(Atmos%Time,ltavg=.true.,avg_max_length=avg_max_length) if (ANY(nint(output_fh(:)*3600.0) == seconds) .or. (GFS_control%kdt == first_kdt)) then - if (mpp_pe() == mpp_root_pe()) write(6,*) "---isec,seconds",isec,seconds time_int = real(isec) + time_intfull = real(seconds) if(Atmos%iau_offset > zero) then if( time_int - Atmos%iau_offset*3600. > zero ) then time_int = time_int - Atmos%iau_offset*3600. - else if(seconds == Atmos%iau_offset*3600) then - call get_time (Atmos%Time - diag_time_fhzero, isec_fhzero) - time_int = real(isec_fhzero) - if (mpp_pe() == mpp_root_pe()) write(6,*) "---iseczero",isec_fhzero endif - endif - time_intfull = real(seconds) - if(Atmos%iau_offset > zero) then if( time_intfull - Atmos%iau_offset*3600. > zero) then time_intfull = time_intfull - Atmos%iau_offset*3600. endif endif - if (mpp_pe() == mpp_root_pe()) write(6,*) ' gfs diags time since last bucket empty: ',time_int/3600.,'hrs' + 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 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, & diff --git a/fv3/fv3_cap.F90 b/fv3/fv3_cap.F90 index 49f13d0d9..5169ca057 100644 --- a/fv3/fv3_cap.F90 +++ b/fv3/fv3_cap.F90 @@ -949,11 +949,7 @@ subroutine InitializeAdvertise(gcomp, rc) if( nfhmax>output_startfh) nfh = nint((nfhmax-output_startfh)/outputfh2(1)) + 1 if( nfh > 0) then allocate(output_fh(nfh)) - if( output_startfh == 0) then - output_fh(1) = dt_atmos/3600. - else - output_fh(1) = output_startfh - endif + output_fh(1) = output_startfh + dt_atmos/3600. do i=2,nfh output_fh(i) = (i-1)*outputfh2(1) + output_startfh ! Except fh000, which is the first time output, if any other of the