diff --git a/ccpp/physics b/ccpp/physics index 7b87cff37..3f7c5aba5 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 7b87cff37e5407b32543b8e614caa0509b7ca24d +Subproject commit 3f7c5aba5a7cb2041eb7f8d3c106c468bb959505 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 9840fc923..5f8af233d 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -726,6 +726,7 @@ module GFS_typedefs integer :: logunit integer :: latidxprnt integer :: ipr + integer :: n_diag_buckets real(kind=kind_phys) :: fhzero !< hours between clearing of diagnostic buckets (current bucket) real(kind=kind_phys) :: fhzero_array(2) !< array to hold the the hours between clearing of diagnostic buckets real(kind=kind_phys) :: fhzero_fhour(2) !< the maximum forecast length for the hours between clearing of diagnostic buckets @@ -2009,7 +2010,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dtsfc (:) => null() !< sensible heat flux (w/m2) real (kind=kind_phys), pointer :: dqsfc (:) => null() !< latent heat flux (w/m2) real (kind=kind_phys), pointer :: totprcp(:) => null() !< accumulated total precipitation (kg/m2) - real (kind=kind_phys), pointer :: totprcpb(:) => null() !< accumulated total precipitation in bucket(kg/m2) + real (kind=kind_phys), pointer :: totprcpb(:,:) => null() !< accumulated total precipitation in bucket(kg/m2) real (kind=kind_phys), pointer :: gflux (:) => null() !< groud conductive heat flux real (kind=kind_phys), pointer :: dlwsfc (:) => null() !< time accumulated sfc dn lw flux ( w/m**2 ) real (kind=kind_phys), pointer :: ulwsfc (:) => null() !< time accumulated sfc up lw flux ( w/m**2 ) @@ -2025,7 +2026,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dvgwd (:) => null() !< vertically integrated v change by OGWD real (kind=kind_phys), pointer :: psmean (:) => null() !< surface pressure (kPa) real (kind=kind_phys), pointer :: cnvprcp(:) => null() !< accumulated convective precipitation (kg/m2) - real (kind=kind_phys), pointer :: cnvprcpb(:) => null() !< accumulated convective precipitation in bucket (kg/m2) + real (kind=kind_phys), pointer :: cnvprcpb(:,:) => null() !< accumulated convective precipitation in bucket (kg/m2) real (kind=kind_phys), pointer :: spfhmin(:) => null() !< minimum specific humidity real (kind=kind_phys), pointer :: spfhmax(:) => null() !< maximum specific humidity real (kind=kind_phys), pointer :: u10mmax(:) => null() !< maximum u-wind @@ -4467,6 +4468,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & Model%fn_nml = fn_nml Model%logunit = logunit Model%latidxprnt = 1 + Model%n_diag_buckets = 1 Model%fhzero = fhzero Model%fhzero_array = fhzero_array Model%fhzero_fhour = fhzero_fhour @@ -6862,6 +6864,7 @@ subroutine control_print(Model) print *, ' fhzero : ', Model%fhzero print *, ' fhzero_array : ', Model%fhzero_array print *, ' fhzero_fhour : ', Model%fhzero_fhour + print *, ' n_diag_buckets : ', Model%n_diag_buckets print *, ' ldiag3d : ', Model%ldiag3d print *, ' qdiag3d : ', Model%qdiag3d print *, ' lssav : ', Model%lssav @@ -8080,11 +8083,12 @@ end subroutine label_dtend_cause subroutine diag_create (Diag, Model) class(GFS_diag_type) :: Diag type(GFS_control_type), intent(in) :: Model - integer :: IM + integer :: IM, ndb logical, save :: linit logical :: have_pbl, have_dcnv, have_scnv, have_mp, have_oz_phys IM = Model%ncols + ndb = Model%n_diag_buckets if(Model%print_diff_pgr) then allocate (Diag%old_pgr(IM)) @@ -8127,7 +8131,7 @@ subroutine diag_create (Diag, Model) allocate (Diag%dtsfc (IM)) allocate (Diag%dqsfc (IM)) allocate (Diag%totprcp (IM)) - allocate (Diag%totprcpb(IM)) + allocate (Diag%totprcpb(IM,ndb)) allocate (Diag%gflux (IM)) allocate (Diag%dlwsfc (IM)) allocate (Diag%ulwsfc (IM)) @@ -8142,7 +8146,7 @@ subroutine diag_create (Diag, Model) allocate (Diag%dvgwd (IM)) allocate (Diag%psmean (IM)) allocate (Diag%cnvprcp (IM)) - allocate (Diag%cnvprcpb(IM)) + allocate (Diag%cnvprcpb(IM,ndb)) allocate (Diag%spfhmin (IM)) allocate (Diag%spfhmax (IM)) allocate (Diag%u10mmax (IM)) diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index e4ec17eb7..bb171ab93 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -3525,6 +3525,12 @@ units = index dimensions = () type = integer +[n_diag_buckets] + standard_name = number_of_diagnostic_buckets + long_name = number of diagnostic bucket reset periods + units = count + dimensions = () + type = integer [ldiag3d] standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields @@ -9254,7 +9260,7 @@ standard_name = accumulated_lwe_thickness_of_precipitation_amount_in_bucket long_name = accumulated total precipitation in bucket units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_dimension,number_of_diagnostic_buckets) type = real kind = kind_phys [toticeb] @@ -9445,7 +9451,7 @@ standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket long_name = cumulative convective precipitation in bucket units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_dimension,number_of_diagnostic_buckets) type = real kind = kind_phys [spfhmin] diff --git a/scm/src/scm_output.F90 b/scm/src/scm_output.F90 index 3b1559573..c8f8b022b 100644 --- a/scm/src/scm_output.F90 +++ b/scm/src/scm_output.F90 @@ -788,16 +788,16 @@ subroutine output_append_diag_avg(ncid, scm_state, physics) call output_append_tendency(ncid, physics, physics%Model%dtidx(physics%Model%index_of_y_wind,physics%Model%index_of_process_physics), "dv_dt_phys", scm_state%itt_diag, inverse_n_diag*inverse_dt) call output_append_tendency(ncid, physics, physics%Model%dtidx(physics%Model%index_of_y_wind,physics%Model%index_of_process_non_physics), "dv_dt_nonphys", scm_state%itt_diag, inverse_n_diag*inverse_dt) - call NetCDF_put_var(ncid, "tprcp_accum", physics%Diag%totprcpb(:), scm_state%itt_diag, inverse_n_diag) + call NetCDF_put_var(ncid, "tprcp_accum", physics%Diag%totprcpb(:,1), scm_state%itt_diag, inverse_n_diag) call NetCDF_put_var(ncid, "ice_accum", physics%Diag%toticeb(:), scm_state%itt_diag, inverse_n_diag) call NetCDF_put_var(ncid, "snow_accum", physics%Diag%totsnwb(:), scm_state%itt_diag, inverse_n_diag) call NetCDF_put_var(ncid, "graupel_accum", physics%Diag%totgrpb(:), scm_state%itt_diag, inverse_n_diag) - call NetCDF_put_var(ncid, "conv_prcp_accum", physics%Diag%cnvprcpb(:), scm_state%itt_diag, inverse_n_diag) - call NetCDF_put_var(ncid, "tprcp_rate_accum", physics%Diag%totprcpb(:), scm_state%itt_diag, inverse_n_diag*inverse_dt) + call NetCDF_put_var(ncid, "conv_prcp_accum", physics%Diag%cnvprcpb(:,1), scm_state%itt_diag, inverse_n_diag) + call NetCDF_put_var(ncid, "tprcp_rate_accum", physics%Diag%totprcpb(:,1), scm_state%itt_diag, inverse_n_diag*inverse_dt) call NetCDF_put_var(ncid, "ice_rate_accum", physics%Diag%toticeb(:), scm_state%itt_diag, inverse_n_diag*inverse_dt) call NetCDF_put_var(ncid, "snow_rate_accum", physics%Diag%totsnwb(:), scm_state%itt_diag, inverse_n_diag*inverse_dt) call NetCDF_put_var(ncid, "graupel_rate_accum", physics%Diag%totgrpb(:), scm_state%itt_diag, inverse_n_diag*inverse_dt) - call NetCDF_put_var(ncid, "conv_prcp_rate_accum", physics%Diag%cnvprcpb(:), scm_state%itt_diag, inverse_n_diag*inverse_dt) + call NetCDF_put_var(ncid, "conv_prcp_rate_accum", physics%Diag%cnvprcpb(:,1), scm_state%itt_diag, inverse_n_diag*inverse_dt) end subroutine output_append_diag_avg