diff --git a/atmos_model.F90 b/atmos_model.F90 index f01c3da09..0a41cecbd 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -698,7 +698,8 @@ subroutine update_atmos_model_state (Atmos) if (mpp_pe() == mpp_root_pe()) write(6,*) ' gfs diags time since last bucket empty: ',time_int/3600.,'hrs' call atmosphere_nggps_diag(Atmos%Time) call FV3GFS_diag_output(Atmos%Time, IPD_DIag, Atm_block, IPD_Control%nx, IPD_Control%ny, & - IPD_Control%levs, 1, 1, 1.d0, time_int, time_intfull) + IPD_Control%levs, 1, 1, 1.d0, time_int, time_intfull, & + IPD_Control%fhswr, IPD_Control%fhlwr) if (mod(isec,3600*nint(IPD_Control%fhzero)) == 0) diag_time = Atmos%Time call diag_send_complete_instant (Atmos%Time) endif diff --git a/gfsphysics/GFS_layer/GFS_diagnostics.F90 b/gfsphysics/GFS_layer/GFS_diagnostics.F90 index d1418dba4..db7a4b0fa 100644 --- a/gfsphysics/GFS_layer/GFS_diagnostics.F90 +++ b/gfsphysics/GFS_layer/GFS_diagnostics.F90 @@ -30,7 +30,7 @@ module GFS_diagnostics integer :: id integer :: axes logical :: time_avg - logical :: full_time_avg !no bucket + character(len=64) :: time_avg_kind character(len=64) :: mod_name character(len=64) :: name character(len=128) :: desc @@ -68,7 +68,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ! ExtDiag%id [integer ] switch to turn on/off variable output ! ! ExtDiag%axes [integer ] dimensionality of variable (2 or 3) ! ! ExtDiag%time_avg [logical ] bucketed accumulation time average ! -! ExtDiag%full_time_avg [logical ] accumulation time average (no bucket) ! +! ExtDiag%time_avg_kind [char*64 ] time average period ! ! ExtDiag%mod_name [char*64 ] classification of the variable ! ! ExtDiag%name [char*64 ] output name for variable ! ! ExtDiag%desc [char*128] long description of field ! @@ -112,7 +112,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(:)%axes = -99 ExtDiag(:)%cnvfac = cn_one ExtDiag(:)%time_avg = .FALSE. - ExtDiag(:)%full_time_avg = .FALSE. + ExtDiag(:)%time_avg_kind = '' ExtDiag(:)%mask = '' ExtDiag(:)%name = '' ExtDiag(:)%intpl_method = 'nearest_stod' @@ -194,6 +194,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -220,6 +221,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -245,6 +247,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -258,6 +261,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -271,6 +275,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -284,6 +289,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -297,6 +303,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -310,6 +317,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -323,6 +331,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_lw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -336,6 +345,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -349,6 +359,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_lw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -362,6 +373,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -375,6 +387,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -388,6 +401,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_lw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -403,6 +417,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -418,6 +433,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -432,6 +448,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_lw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -447,6 +464,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_100 ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,17) @@ -460,6 +478,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_100 ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,18) @@ -513,6 +532,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_100 ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,5) @@ -525,6 +545,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -539,6 +560,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -553,6 +575,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'K' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -568,6 +591,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_100 ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,6) @@ -580,6 +604,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -594,6 +619,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -608,6 +634,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'K' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -623,6 +650,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_100 ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,7) @@ -635,6 +663,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -649,6 +678,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -663,6 +693,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'K' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -968,7 +999,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. - ExtDiag(idx)%full_time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'full' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -1123,7 +1154,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. - ExtDiag(idx)%full_time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'full' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -1278,7 +1309,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. - ExtDiag(idx)%full_time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'full' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totice(:) @@ -1305,7 +1336,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. - ExtDiag(idx)%full_time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'full' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totsnw(:) @@ -1332,7 +1363,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. - ExtDiag(idx)%full_time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'full' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totgrp(:) diff --git a/gfsphysics/GFS_layer/GFS_driver.F90 b/gfsphysics/GFS_layer/GFS_driver.F90 index cb3f8d3bb..fe0f37bbc 100644 --- a/gfsphysics/GFS_layer/GFS_driver.F90 +++ b/gfsphysics/GFS_layer/GFS_driver.F90 @@ -524,6 +524,10 @@ subroutine GFS_stochastic_driver (Model, Statein, Stateout, Sfcprop, Coupling, & Diag%totprcp(:) = Diag%totprcp(:) + (Coupling%sppt_wts(:,15) - 1 )*Diag%rain(:) ! acccumulated total and convective preciptiation Diag%cnvprcp(:) = Diag%cnvprcp(:) + (Coupling%sppt_wts(:,15) - 1 )*Diag%rainc(:) + ! bucket precipitation adjustment due to sppt + Diag%totprcpb(:) = Diag%totprcpb(:) + (Coupling%sppt_wts(:,15) - 1 )*Diag%rain(:) + Diag%cnvprcpb(:) = Diag%cnvprcpb(:) + (Coupling%sppt_wts(:,15) - 1 )*Diag%rainc(:) + if (Model%cplflx) then Coupling%rain_cpl(:) = Coupling%rain_cpl(:) + (Coupling%sppt_wts(:,15) - 1.0)*Tbd%drain_cpl(:) Coupling%snow_cpl(:) = Coupling%snow_cpl(:) + (Coupling%sppt_wts(:,15) - 1.0)*Tbd%dsnow_cpl(:) diff --git a/gfsphysics/GFS_layer/GFS_physics_driver.F90 b/gfsphysics/GFS_layer/GFS_physics_driver.F90 index 2138d0bcc..2bcd29600 100644 --- a/gfsphysics/GFS_layer/GFS_physics_driver.F90 +++ b/gfsphysics/GFS_layer/GFS_physics_driver.F90 @@ -3556,10 +3556,23 @@ subroutine GFS_physics_driver & tem = dtp * con_p001 / con_day do i = 1, im - rain0(i,1) = max(con_d00, rain0(i,1)) - snow0(i,1) = max(con_d00, snow0(i,1)) - ice0(i,1) = max(con_d00, ice0(i,1)) - graupel0(i,1) = max(con_d00, graupel0(i,1)) +! rain0(i,1) = max(con_d00, rain0(i,1)) +! snow0(i,1) = max(con_d00, snow0(i,1)) +! ice0(i,1) = max(con_d00, ice0(i,1)) +! graupel0(i,1) = max(con_d00, graupel0(i,1)) + if(rain0(i,1)*tem < rainmin) then + rain0(i,1) = 0.0 + endif + if(ice0(i,1)*tem < rainmin) then + ice0(i,1) = 0.0 + endif + if(snow0(i,1)*tem < rainmin) then + snow0(i,1) = 0.0 + endif + if(graupel0(i,1)*tem < rainmin) then + graupel0(i,1) = 0.0 + endif + rain1(i) = (rain0(i,1)+snow0(i,1)+ice0(i,1)+graupel0(i,1)) * tem Diag%ice(i) = ice0 (i,1) * tem Diag%snow(i) = snow0 (i,1) * tem @@ -3741,7 +3754,8 @@ subroutine GFS_physics_driver & crain = 0.0 csnow = Diag%rainc(i) endif - if ((snow0(i,1)+ice0(i,1)+graupel0(i,1)+csnow) > (rain0(i,1)+crain)) then +! if ((snow0(i,1)+ice0(i,1)+graupel0(i,1)+csnow) > (rain0(i,1)+crain)) then + if ((snow0(i,1)+ice0(i,1)+graupel0(i,1)+csnow) > 0.0) then Sfcprop%srflag(i) = 1. ! clu: set srflag to 'snow' (i.e. 1) endif enddo diff --git a/gfsphysics/physics/sflx.f b/gfsphysics/physics/sflx.f index 3ddfd1a7d..805ea3fc6 100644 --- a/gfsphysics/physics/sflx.f +++ b/gfsphysics/physics/sflx.f @@ -2410,7 +2410,9 @@ subroutine snopac ! so with snoexp = 2.0 (>1), surface skin temperature is higher than ! for the linear case (snoexp = 1). - t1 = tfreez * sncovr**snoexp + t12 * (1.0 - sncovr**snoexp) +! t1 = tfreez * sncovr**snoexp + t12 * (1.0 - sncovr**snoexp) + t1 = tfreez * max(0.01,sncovr**snoexp) + & + & t12 * (1.0 - max(0.01,sncovr**snoexp)) beta = 1.0 ssoil = df1 * (t1 - stc(1)) / dtot diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index 27b5529e8..a3a438a91 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -1274,7 +1274,7 @@ end subroutine fv3gfs_diag_register ! calls: send_data !------------------------------------------------------------------------- subroutine fv3gfs_diag_output(time, diag, atm_block, nx, ny, levs, ntcw, ntoz, & - dt, time_int, time_intfull) + dt, time_int, time_intfull, time_radsw, time_radlw) !--- subroutine interface variable definitions type(time_type), intent(in) :: time type(IPD_diag_type), intent(in) :: diag(:) @@ -1283,6 +1283,8 @@ subroutine fv3gfs_diag_output(time, diag, atm_block, nx, ny, levs, ntcw, ntoz, & 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 !--- local variables integer :: i, j, k, idx, nblks, nb, ix, ii, jj integer :: is_in, js_in, isc, jsc @@ -1292,12 +1294,15 @@ subroutine fv3gfs_diag_output(time, diag, atm_block, nx, ny, levs, ntcw, ntoz, & real(kind=kind_phys), dimension(nx,ny) :: var2 real(kind=kind_phys), dimension(nx,ny,levs) :: var3 real(kind=kind_phys) :: rdt, rtime_int, rtime_intfull, lcnvfac + real(kind=kind_phys) :: rtime_radsw, rtime_radlw logical :: used nblks = atm_block%nblks - rdt = 1.0d0/dt - rtime_int = 1.0d0/time_int + rdt = 1.0d0/dt + rtime_int = 1.0d0/time_int rtime_intfull = 1.0d0/time_intfull + rtime_radsw = 1.0d0/time_radsw + rtime_radlw = 1.0d0/time_radlw isc = atm_block%isc jsc = atm_block%jsc @@ -1309,9 +1314,18 @@ subroutine fv3gfs_diag_output(time, diag, atm_block, nx, ny, levs, ntcw, ntoz, & if (diag(idx)%id > 0) then lcnvfac = diag(idx)%cnvfac if (diag(idx)%time_avg) then - if ( diag(idx)%full_time_avg ) then + if ( trim(diag(idx)%time_avg_kind) == 'full' ) then lcnvfac = lcnvfac*rtime_intfull ! if(mpp_pe()==mpp_root_pe())print *,'in,fv3gfs_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) +! if(mpp_pe()==mpp_root_pe())print *,'in,fv3gfs_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) +! if(mpp_pe()==mpp_root_pe())print *,'in,fv3gfs_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) +! if(mpp_pe()==mpp_root_pe())print *,'in,fv3gfs_io. rad swlw min avg, field=',trim(Diag(idx)%name),' time=',time_radlw,time_radsw,time_int else lcnvfac = lcnvfac*rtime_int endif diff --git a/module_fcst_grid_comp.F90 b/module_fcst_grid_comp.F90 index e1c0ebaeb..44663d459 100644 --- a/module_fcst_grid_comp.F90 +++ b/module_fcst_grid_comp.F90 @@ -706,9 +706,9 @@ subroutine fcst_run_phase_1(fcst_comp, importState, exportState,clock,rc) !----------------------------------------------------------------------- ! ! IF(RC /= ESMF_SUCCESS) THEN -! WRITE(0,*)"FAIL: fcst_RUN" +! if(mype==0) WRITE(0,*)"FAIL: fcst_RUN" ! ELSE - WRITE(0,*)"PASS: fcstRUN, na=",na + if(mype==0) WRITE(0,*)"PASS: fcstRUN, na=",na ! ENDIF ! if(mype==0) print *,'fcst_run_phase_1 time is ', mpi_wtime()-tbeg1 @@ -800,9 +800,9 @@ subroutine fcst_run_phase_2(fcst_comp, importState, exportState,clock,rc) !----------------------------------------------------------------------- ! ! IF(RC /= ESMF_SUCCESS) THEN -! WRITE(0,*)"FAIL: fcst_RUN" +! if(mype==0) WRITE(0,*)"FAIL: fcst_RUN" ! ELSE - WRITE(0,*)"PASS: fcstRUN, na=",na + if(mype==0) WRITE(0,*)"PASS: fcstRUN, na=",na ! ENDIF ! if(mype==0) print *,'fcst_run_phase_2 time is ', mpi_wtime()-tbeg1 diff --git a/namphysics/NAM_layer/NAM_diagnostics.F90 b/namphysics/NAM_layer/NAM_diagnostics.F90 index 18a965582..8a4b2bd60 100644 --- a/namphysics/NAM_layer/NAM_diagnostics.F90 +++ b/namphysics/NAM_layer/NAM_diagnostics.F90 @@ -30,7 +30,7 @@ module GFS_diagnostics integer :: id integer :: axes logical :: time_avg - logical :: full_time_avg !no bucket + character(len=64) :: time_avg_kind character(len=64) :: mod_name character(len=64) :: name character(len=128) :: desc @@ -68,7 +68,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ! ExtDiag%id [integer ] switch to turn on/off variable output ! ! ExtDiag%axes [integer ] dimensionality of variable (2 or 3) ! ! ExtDiag%time_avg [logical ] bucketed accumulation time average ! -! ExtDiag%full_time_avg [logical ] accumulation time average (no bucket) ! +! ExtDiag%time_avg_kind [char*64 ] time average period ! ! ExtDiag%mod_name [char*64 ] classification of the variable ! ! ExtDiag%name [char*64 ] output name for variable ! ! ExtDiag%desc [char*128] long description of field ! @@ -112,7 +112,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(:)%axes = -99 ExtDiag(:)%cnvfac = cn_one ExtDiag(:)%time_avg = .FALSE. - ExtDiag(:)%full_time_avg = .FALSE. + ExtDiag(:)%time_avg_kind = '' ExtDiag(:)%mask = '' ExtDiag(:)%name = '' ExtDiag(:)%intpl_method = 'nearest_stod' @@ -194,6 +194,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -220,6 +221,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -245,6 +247,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -258,6 +261,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -271,6 +275,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -284,6 +289,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -297,6 +303,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -310,6 +317,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -323,6 +331,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_lw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -336,6 +345,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -349,6 +359,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_lw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -362,6 +373,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -375,6 +387,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -388,6 +401,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'W/m**2' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_lw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -403,6 +417,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -418,6 +433,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_sw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -432,6 +448,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_one ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_lw' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -447,6 +464,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_100 ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,17) @@ -460,6 +478,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_100 ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,18) @@ -513,6 +532,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_100 ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,5) @@ -525,6 +545,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -539,6 +560,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -553,6 +575,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'K' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -568,6 +591,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_100 ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,6) @@ -580,6 +604,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -594,6 +619,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -608,6 +634,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'K' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -623,6 +650,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_100 ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,7) @@ -635,6 +663,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -649,6 +678,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = '%' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -663,6 +693,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%unit = 'K' ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'rad_swlw_min' ExtDiag(idx)%mask = "cldmask_ratio" allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -715,6 +746,11 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop !rab enddo !rab enddo +! DH gfortran cannot point to members of arrays of derived types such +! as IntDiag(nb)%topfsw(:)%upfxc (the compilation succeeds, but the +! pointers do not reference the correct data and the output either +! contains garbage (Inf, NaN), or the netCDF I/O layer crashes. +#ifndef __GFORTRAN__ idx = idx + 1 ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'sw_upfxc' @@ -774,6 +810,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%topflw(:)%upfx0 enddo +#endif !--- physics accumulated diagnostics --- idx = idx + 1 @@ -962,7 +999,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. - ExtDiag(idx)%full_time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'full' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -1117,7 +1154,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. - ExtDiag(idx)%full_time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'full' ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks @@ -1272,7 +1309,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. - ExtDiag(idx)%full_time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'full' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totice(:) @@ -1299,7 +1336,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. - ExtDiag(idx)%full_time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'full' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totsnw(:) @@ -1326,7 +1363,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_phys' ExtDiag(idx)%cnvfac = cn_th ExtDiag(idx)%time_avg = .TRUE. - ExtDiag(idx)%full_time_avg = .TRUE. + ExtDiag(idx)%time_avg_kind = 'full' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totgrp(:) @@ -1721,6 +1758,31 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tdomip(:) enddo +!!! not available in nam yet +! idx = idx + 1 +! ExtDiag(idx)%axes = 3 +! ExtDiag(idx)%name = 'refl_10cm' +! ExtDiag(idx)%desc = 'Radar reflectivity' +! ExtDiag(idx)%unit = 'dBz' +! ExtDiag(idx)%mod_name = 'gfs_phys' +! allocate (ExtDiag(idx)%data(nblks)) +! do nb = 1,nblks +! ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%refl_10cm(:,:) +! enddo + +! idx = idx + 1 +! ExtDiag(idx)%axes = 3 +! ExtDiag(idx)%name = 'cnvw' +! ExtDiag(idx)%desc = 'subgrid scale convective cloud water' +! ExtDiag(idx)%unit = 'kg/kg' +! ExtDiag(idx)%mod_name = 'gfs_phys' +! allocate (ExtDiag(idx)%data(nblks)) +! if( Model%ncnvw > 0 ) then +! do nb = 1,nblks +! ExtDiag(idx)%data(nb)%var3 => Tbd(nb)%phy_f3d(:,:,Model%ncnvw) +! enddo +! endif + idx = idx + 1 ExtDiag(idx)%axes = 3 ExtDiag(idx)%name = 'skebu_wts' @@ -2287,7 +2349,6 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%stc(:,4) enddo -! print *,'in gfdl_diag_register,af soilt4,idx=',idx,model%nstf_name(1) !--------------------------nsst variables if (model%nstf_name(1) > 0) then @@ -2492,6 +2553,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop enddo !--------------------------nsst variables endif +! print *,'in gfdl_diag_register,af all extdiag, idx=',idx !--- prognostic variable tendencies (t, u, v, sph, clwmr, o3) !rab idx = idx + 1