From e84c233e72ac489e0a77c8fb329a7450565553e3 Mon Sep 17 00:00:00 2001 From: "Haiqin.Li" Date: Fri, 19 Jan 2024 18:35:12 +0000 Subject: [PATCH 1/4] "Supplementary physics updates for RRFS code freeze" --- .gitmodules | 4 +- ccpp/data/GFS_typedefs.F90 | 42 +++--- ccpp/data/GFS_typedefs.meta | 56 +++++++- ccpp/driver/GFS_diagnostics.F90 | 225 ++++++++++++++++++++++++++++++-- ccpp/driver/GFS_restart.F90 | 24 +--- ccpp/physics | 2 +- 6 files changed, 306 insertions(+), 47 deletions(-) diff --git a/.gitmodules b/.gitmodules index 22c723ac1..8aac7d579 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,8 +8,8 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/ufs-community/ccpp-physics - branch = ufs/dev + url = https://github.com/haiqinli/ccpp-physics + branch = ufs/dev-smoke-dust [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 5a8368a40..ee5bd0e84 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -459,11 +459,14 @@ module GFS_typedefs !--- Smoke. These 2 arrays are input smoke emission and frp real (kind=kind_phys), pointer :: ebb_smoke_in(:) => null() !< input smoke emission - real (kind=kind_phys), pointer :: frp_input (:) => null() !< input FRP - + real (kind=kind_phys), pointer :: frp_output (:) => null() !< output FRP !--- For fire diurnal cycle real (kind=kind_phys), pointer :: fhist (:) => null() !< instantaneous fire coef_bb real (kind=kind_phys), pointer :: coef_bb_dc (:) => null() !< instantaneous fire coef_bb + integer, pointer :: fire_type_out (:) => null() !< fire type + real (kind=kind_phys), pointer :: peak_hr_out (:) => null() !< peak hour of fire emissions + real (kind=kind_phys), pointer :: lu_nofire_out (:) =>null() !null() ! null() !< heat flux from wildfire real (kind=kind_phys), pointer :: frac_grid_burned_out (:) => null() !< fraction of grid cell burning @@ -616,10 +619,6 @@ module GFS_typedefs !--- For fire diurnal cycle real (kind=kind_phys), pointer :: ebu_smoke (:,:) => null() !< 3D ebu array - !--- For smoke and dust optical extinction - real (kind=kind_phys), pointer :: smoke_ext (:,:) => null() !< 3D aod array - real (kind=kind_phys), pointer :: dust_ext (:,:) => null() !< 3D aod array - !--- For MYNN PBL transport of smoke and dust real (kind=kind_phys), pointer :: chem3d (:,:,:) => null() !< 3D aod array real (kind=kind_phys), pointer :: ddvel (:,: ) => null() !< 2D dry deposition velocity @@ -633,6 +632,8 @@ module GFS_typedefs !--- Fire plume rise diagnostics real (kind=kind_phys), pointer :: min_fplume (:) => null() !< minimum plume rise level real (kind=kind_phys), pointer :: max_fplume (:) => null() !< maximum plume rise level + real (kind=kind_phys), pointer :: uspdavg (:) => null() !< BL average wind speed + real (kind=kind_phys), pointer :: hpbl_thetav (:) => null() !< BL depth parcel method !--- hourly fire potential index real (kind=kind_phys), pointer :: rrfs_hwp (:) => null() !< hourly fire potential index real (kind=kind_phys), pointer :: rrfs_hwp_ave (:) => null() !< *Average* hourly fire potential index @@ -1528,6 +1529,7 @@ module GFS_typedefs logical :: do_plumerise integer :: addsmoke_flag integer :: plumerisefire_frq + integer :: n_dbg_lines integer :: smoke_forecast logical :: aero_ind_fdb ! WFA/IFA indirect logical :: aero_dir_fdb ! smoke/dust direct @@ -2805,9 +2807,13 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%emseas (IM)) allocate (Sfcprop%emanoc (IM)) allocate (Sfcprop%ebb_smoke_in (IM)) - allocate (Sfcprop%frp_input (IM)) + allocate (Sfcprop%frp_output (IM)) allocate (Sfcprop%fhist (IM)) allocate (Sfcprop%coef_bb_dc(IM)) + allocate (Sfcprop%fire_type_out (IM)) + allocate (Sfcprop%peak_hr_out(IM)) + allocate (Sfcprop%lu_nofire_out(IM)) + allocate (Sfcprop%lu_qfire_out(IM)) allocate (Sfcprop%fire_in (IM,Model%fire_aux_data_levels)) ! IMPORTANT: This initialization must match rrfs_sd_fill_data @@ -2815,10 +2821,14 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%emseas = clear_val Sfcprop%emanoc = clear_val Sfcprop%ebb_smoke_in = clear_val - Sfcprop%frp_input = clear_val + Sfcprop%frp_output = clear_val Sfcprop%fhist = 1. Sfcprop%coef_bb_dc = clear_val + Sfcprop%fire_type_out = 0 Sfcprop%fire_in = clear_val + Sfcprop%peak_hr_out = clear_val + Sfcprop%lu_nofire_out = clear_val + Sfcprop%lu_qfire_out = clear_val endif end subroutine sfcprop_create @@ -3157,8 +3167,6 @@ subroutine coupling_create (Coupling, IM, Model) if(Model%rrfs_sd) then !--- needed for smoke aerosol option allocate (Coupling%ebu_smoke (IM,Model%levs)) - allocate (Coupling%smoke_ext (IM,Model%levs)) - allocate (Coupling%dust_ext (IM,Model%levs)) allocate (Coupling%chem3d (IM,Model%levs,Model%nchem)) allocate (Coupling%ddvel (IM,Model%ndvel)) allocate (Coupling%wetdpc_flux(IM,Model%nchem)) @@ -3166,11 +3174,11 @@ subroutine coupling_create (Coupling, IM, Model) allocate (Coupling%drydep_flux(IM,Model%ndvel)) allocate (Coupling%min_fplume(IM)) allocate (Coupling%max_fplume(IM)) + allocate (Coupling%uspdavg(IM)) + allocate (Coupling%hpbl_thetav(IM)) allocate (Coupling%rrfs_hwp (IM)) allocate (Coupling%rrfs_hwp_ave (IM)) Coupling%ebu_smoke = clear_val - Coupling%smoke_ext = clear_val - Coupling%dust_ext = clear_val Coupling%chem3d = clear_val Coupling%ddvel = clear_val Coupling%wetdpc_flux = clear_val @@ -3178,6 +3186,8 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%drydep_flux = clear_val Coupling%min_fplume = clear_val Coupling%max_fplume = clear_val + Coupling%uspdavg = clear_val + Coupling%hpbl_thetav = clear_val Coupling%rrfs_hwp = clear_val Coupling%rrfs_hwp_ave = clear_val endif @@ -3865,11 +3875,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: dust_moist_correction = 1.0 real(kind=kind_phys) :: dust_alpha = 0. real(kind=kind_phys) :: dust_gamma = 0. - real(kind=kind_phys) :: wetdep_ls_alpha = 0. + real(kind=kind_phys) :: wetdep_ls_alpha = 0.5 integer :: dust_moist_opt = 1 ! fecan :1 else shao integer :: ebb_dcycle = 1 ! 1:retro; 2:forecast integer :: seas_opt = 2 - integer :: dust_opt = 5 + integer :: dust_opt = 1 integer :: drydep_opt = 1 integer :: coarsepm_settling = 1 integer :: plume_wind_eff = 1 @@ -3878,6 +3888,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: do_plumerise = .false. integer :: addsmoke_flag = 1 integer :: plumerisefire_frq = 60 + integer :: n_dbg_lines = 3 integer :: smoke_forecast = 0 ! RRFS-sd read in ebb_smoke logical :: aero_ind_fdb = .false. ! RRFS-sd wfa/ifa emission logical :: aero_dir_fdb = .false. ! RRFS-sd smoke/dust radiation feedback @@ -4049,7 +4060,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & wetdep_ls_opt, smoke_forecast, aero_ind_fdb, aero_dir_fdb, & rrfs_smoke_debug, do_plumerise, plumerisefire_frq, & addsmoke_flag, enh_mix, mix_chem, smoke_dir_fdb_coef, & - do_smoke_transport,smoke_conv_wet_coef, & + do_smoke_transport,smoke_conv_wet_coef,n_dbg_lines, & !--- C3/GF closures ichoice,ichoicem,ichoice_s, & !--- (DFI) time ranges with radar-prescribed microphysics tendencies @@ -4282,6 +4293,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%extended_sd_diags = extended_sd_diags Model%wetdep_ls_opt = wetdep_ls_opt Model%do_plumerise = do_plumerise + Model%n_dbg_lines = n_dbg_lines Model%plumerisefire_frq = plumerisefire_frq Model%addsmoke_flag = addsmoke_flag Model%smoke_forecast = smoke_forecast diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index ebaa9af7f..a02abae55 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -2288,7 +2288,7 @@ type = real kind = kind_phys active = (do_smoke_coupling) -[frp_input] +[frp_output] standard_name = frp_hourly long_name = hourly fire radiative power units = MW @@ -2312,6 +2312,37 @@ type = real kind = kind_phys active = (do_smoke_coupling) +[fire_type_out] + standard_name = fire_type_out + long_name = type of fire + units = none + dimensions = (horizontal_loop_extent) + type = integer + active = (do_smoke_coupling) +[peak_hr_out] + standard_name = peak_hr_fire + long_name = hour of peak fire emissions + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_smoke_coupling) +[lu_nofire_out] + standard_name = lu_nofire_out + long_name = land use of no fire pixels for type + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_smoke_coupling) +[lu_qfire_out] + standard_name = lu_qfire_out + long_name = land use of fire pixels for type + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_smoke_coupling) [fire_in] standard_name = smoke_fire_auxiliary_input long_name = smoke fire auxiliary input variables @@ -3052,6 +3083,22 @@ type = real kind = kind_phys active = (do_smoke_coupling) +[uspdavg] + standard_name = bl_averaged_wind_speed + long_name = average wind speed within the boundary layer + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_smoke_coupling) +[hpbl_thetav] + standard_name = pbl_height_thetav + long_name = pbl height based on modified parcel method + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_smoke_coupling) [rrfs_hwp] standard_name = hourly_wildfire_potential long_name = rrfs hourly fire weather potential @@ -6678,6 +6725,13 @@ dimensions = () type = integer active = (do_smoke_coupling) +[n_dbg_lines] + standard_name = smoke_debug_lines + long_name = rrfs smoke add smoke option + units = index + dimensions = () + type = integer + active = (do_smoke_coupling) [addsmoke_flag] standard_name = control_for_smoke_biomass_burning_emissions long_name = rrfs smoke add smoke option diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 3bbd300d5..7b0ca752f 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -3761,6 +3761,18 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop enddo if (Model%lsm == Model%lsm_ruc) then + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'sfalb' + ExtDiag(idx)%desc = 'surface albedo over land' + ExtDiag(idx)%unit = 'fraction' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%sfalb_lnd(:) + enddo + idx = idx + 1 ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'rhofr' @@ -4077,7 +4089,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%name = 'nirbmdi' ExtDiag(idx)%desc = 'sfc nir beam sw downward flux' ExtDiag(idx)%unit = 'W/m**2' - ExtDiag(idx)%mod_name = 'gfs_sfc' + ExtDiag(idx)%mod_name = 'gfs_phys' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%nirbmdi(:) @@ -4088,7 +4100,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%name = 'nirdfdi' ExtDiag(idx)%desc = 'sfc nir diff sw downward flux' ExtDiag(idx)%unit = 'W/m**2' - ExtDiag(idx)%mod_name = 'gfs_sfc' + ExtDiag(idx)%mod_name = 'gfs_phys' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%nirdfdi(:) @@ -4099,7 +4111,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%name = 'visbmdi' ExtDiag(idx)%desc = 'sfc uv+vis beam sw downward flux' ExtDiag(idx)%unit = 'W/m**2' - ExtDiag(idx)%mod_name = 'gfs_sfc' + ExtDiag(idx)%mod_name = 'gfs_phys' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%visbmdi(:) @@ -4110,7 +4122,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%name = 'visdfdi' ExtDiag(idx)%desc = ' sfc uv+vis diff sw downward flux' ExtDiag(idx)%unit = 'W/m**2' - ExtDiag(idx)%mod_name = 'gfs_sfc' + ExtDiag(idx)%mod_name = 'gfs_phys' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%visdfdi(:) @@ -4669,6 +4681,96 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%rrfs_hwp_ave enddo + extended_smoke_dust_diagnostics: if ( Model%extended_sd_diags ) then + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'uspdavg' + ExtDiag(idx)%desc = 'BL average wind speed' + ExtDiag(idx)%unit = '' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%uspdavg + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'hpbl_thetav' + ExtDiag(idx)%desc = 'BL depth modified parcel method' + ExtDiag(idx)%unit = '' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%hpbl_thetav + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'drydep_smoke' + ExtDiag(idx)%desc = 'dry deposition smoke' + ExtDiag(idx)%unit = ' ' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%drydep_flux(:,1) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'drydep_dust' + ExtDiag(idx)%desc = 'dry deposition dust' + ExtDiag(idx)%unit = ' ' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%drydep_flux(:,2) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'drydep_coarsepm' + ExtDiag(idx)%desc = 'dry deposition coarsepm' + ExtDiag(idx)%unit = ' ' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%drydep_flux(:,3) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'wetdpr_smoke' + ExtDiag(idx)%desc = 'resolved wet deposition smoke' + ExtDiag(idx)%unit = ' ' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%wetdpr_flux(:,1) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'wetdpr_dust' + ExtDiag(idx)%desc = 'resolved wet deposition dust' + ExtDiag(idx)%unit = ' ' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%wetdpr_flux(:,2) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'wetdpr_coarsepm' + ExtDiag(idx)%desc = 'resolved wet deposition coarsepm' + ExtDiag(idx)%unit = ' ' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%wetdpr_flux(:,3) + enddo + idx = idx + 1 ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'wetdpc_smoke' @@ -4704,13 +4806,46 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop idx = idx + 1 ExtDiag(idx)%axes = 2 - ExtDiag(idx)%name = 'ebb_smoke_in' - ExtDiag(idx)%desc = 'input smoke emission' - ExtDiag(idx)%unit = 'ug m-2 s-1' + ExtDiag(idx)%name = 'peak_hr_out' + ExtDiag(idx)%desc = 'hour of peak smoke emissions' + ExtDiag(idx)%unit = ' ' ExtDiag(idx)%mod_name = 'gfs_sfc' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks - ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%ebb_smoke_in + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%peak_hr_out + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'fire_type_out' + ExtDiag(idx)%desc = 'fire type' + ExtDiag(idx)%unit = '' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%int2 => Sfcprop(nb)%fire_type_out + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'lu_nofire_out' + ExtDiag(idx)%desc = 'lu nofire pixes' + ExtDiag(idx)%unit = '' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%lu_nofire_out + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'lu_qfire_out' + ExtDiag(idx)%desc = 'lu qfire pixes' + ExtDiag(idx)%unit = '' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%lu_qfire_out enddo idx = idx + 1 @@ -4724,17 +4859,85 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%fhist enddo + if (Model%ebb_dcycle == 2 ) then + idx = idx + 1 ExtDiag(idx)%axes = 2 - ExtDiag(idx)%name = 'frp_input' - ExtDiag(idx)%desc = 'input frp' + ExtDiag(idx)%name = 'fire_end_hr' + ExtDiag(idx)%desc = 'Hours since fire was last detected' + ExtDiag(idx)%unit = 'hrs' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%smoke2d_RRFS(:,3) + enddo + + endif + + endif extended_smoke_dust_diagnostics + + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'ebb_smoke_in' + ExtDiag(idx)%desc = 'input smoke emission' + ExtDiag(idx)%unit = 'ug m-2 s-1' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%ebb_smoke_in + enddo + + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'frp_output' + ExtDiag(idx)%desc = 'output frp' + ExtDiag(idx)%unit = 'mw' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%frp_output + enddo + + smoke_forecast_mode: if (Model%ebb_dcycle == 2 ) then + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'ebb_rate' + ExtDiag(idx)%desc = 'Total EBB Emissions' + ExtDiag(idx)%unit = 'ug m-2 s-1' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%smoke2d_RRFS(:,1) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'frp_davg' + ExtDiag(idx)%desc = 'Daily mean Fire Radiative Power' ExtDiag(idx)%unit = 'mw' ExtDiag(idx)%mod_name = 'gfs_sfc' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks - ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%frp_input + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%smoke2d_RRFS(:,2) enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'hwp_davg' + ExtDiag(idx)%desc = 'Daily mean Hourly Wildfire Potential' + ExtDiag(idx)%unit = ' ' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%smoke2d_RRFS(:,4) + enddo + + endif smoke_forecast_mode + idx = idx + 1 ExtDiag(idx)%axes = 3 ExtDiag(idx)%name = 'ebu_smoke' diff --git a/ccpp/driver/GFS_restart.F90 b/ccpp/driver/GFS_restart.F90 index 9abf926de..890aeb9fb 100644 --- a/ccpp/driver/GFS_restart.F90 +++ b/ccpp/driver/GFS_restart.F90 @@ -152,7 +152,7 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & Restart%num2d = Restart%num2d + Model%num_dfi_radar endif if (Model%rrfs_sd) then - Restart%num2d = Restart%num2d + 5 + Restart%num2d = Restart%num2d + 6 endif Restart%num3d = Model%ntot3d @@ -179,7 +179,7 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & Restart%num3d = Restart%num3d + 9 endif if (Model%rrfs_sd) then - Restart%num3d = Restart%num3d + 7 + Restart%num3d = Restart%num3d + 4 endif !Prognostic area fraction if (Model%progsigma) then @@ -515,6 +515,11 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & do nb = 1,nblks Restart%data(nb,num)%var2p => Coupling(nb)%rrfs_hwp(:) enddo + num = num + 1 + Restart%name2d(num) = 'rrfs_hwp_ave' + do nb = 1,nblks + Restart%data(nb,num)%var2p => Coupling(nb)%rrfs_hwp_ave(:) + enddo endif !--- phy_f3d variables @@ -669,21 +674,6 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & endif if(Model%rrfs_sd) then - num = num + 1 - Restart%name3d(num) = 'ebu_smoke' - do nb = 1,nblks - Restart%data(nb,num)%var3p => Coupling(nb)%ebu_smoke(:,:) - enddo - num = num + 1 - Restart%name3d(num) = 'smoke_ext' - do nb = 1,nblks - Restart%data(nb,num)%var3p => Coupling(nb)%smoke_ext(:,:) - enddo - num = num + 1 - Restart%name3d(num) = 'dust_ext' - do nb = 1,nblks - Restart%data(nb,num)%var3p => Coupling(nb)%dust_ext(:,:) - enddo num = num + 1 Restart%name3d(num) = 'chem3d_1' do nb = 1,nblks diff --git a/ccpp/physics b/ccpp/physics index a492addf8..02b344037 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit a492addf860d29d797bca488f53d39b260584924 +Subproject commit 02b3440378e5bb04ddc4ba50b44f2532eb7cab08 From 28d13511e13e3bc7f18ce2b5694f53c5ce73d1db Mon Sep 17 00:00:00 2001 From: "Haiqin.Li" Date: Tue, 23 Jan 2024 16:15:43 +0000 Subject: [PATCH 2/4] "update to address UFS code managers' comments" --- ccpp/data/GFS_typedefs.F90 | 40 ++++++++++++++++----------------- ccpp/data/GFS_typedefs.meta | 32 +++++++++++++------------- ccpp/driver/GFS_diagnostics.F90 | 20 ++++++++--------- ccpp/physics | 2 +- 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index ee5bd0e84..615f983ba 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -458,18 +458,18 @@ module GFS_typedefs real (kind=kind_phys), pointer :: emanoc (:) => null() !< instantaneous anthro. oc emission !--- Smoke. These 2 arrays are input smoke emission and frp - real (kind=kind_phys), pointer :: ebb_smoke_in(:) => null() !< input smoke emission - real (kind=kind_phys), pointer :: frp_output (:) => null() !< output FRP + real (kind=kind_phys), pointer :: ebb_smoke_in(:) => null() !< input smoke emission + real (kind=kind_phys), pointer :: frp_output (:) => null() !< output FRP !--- For fire diurnal cycle real (kind=kind_phys), pointer :: fhist (:) => null() !< instantaneous fire coef_bb real (kind=kind_phys), pointer :: coef_bb_dc (:) => null() !< instantaneous fire coef_bb - integer, pointer :: fire_type_out (:) => null() !< fire type - real (kind=kind_phys), pointer :: peak_hr_out (:) => null() !< peak hour of fire emissions - real (kind=kind_phys), pointer :: lu_nofire_out (:) =>null() !null() ! null() !< fire type + real (kind=kind_phys), pointer :: peak_hr (:) => null() !< peak hour of fire emissions + real (kind=kind_phys), pointer :: lu_nofire (:) => null() ! null() ! null() !< heat flux from wildfire - real (kind=kind_phys), pointer :: frac_grid_burned_out (:) => null() !< fraction of grid cell burning + real (kind=kind_phys), pointer :: fire_heat_flux (:) => null() !< heat flux from wildfire + real (kind=kind_phys), pointer :: frac_grid_burned (:) => null() !< fraction of grid cell burning !--- For smoke and dust auxiliary inputs real (kind=kind_phys), pointer :: fire_in (:,:) => null() !< fire auxiliary inputs @@ -2690,8 +2690,8 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%acsnow_land (IM)) allocate (Sfcprop%acsnow_ice (IM)) allocate (Sfcprop%xlaixy (IM)) - allocate (Sfcprop%fire_heat_flux_out (IM)) - allocate (Sfcprop%frac_grid_burned_out (IM)) + allocate (Sfcprop%fire_heat_flux (IM)) + allocate (Sfcprop%frac_grid_burned(IM)) ! Sfcprop%wetness = clear_val @@ -2712,8 +2712,8 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%acsnow_land = clear_val Sfcprop%acsnow_ice = clear_val Sfcprop%xlaixy = clear_val - Sfcprop%fire_heat_flux_out = clear_val - Sfcprop%frac_grid_burned_out = clear_val + Sfcprop%fire_heat_flux = clear_val + Sfcprop%frac_grid_burned= clear_val ! end if @@ -2810,10 +2810,10 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%frp_output (IM)) allocate (Sfcprop%fhist (IM)) allocate (Sfcprop%coef_bb_dc(IM)) - allocate (Sfcprop%fire_type_out (IM)) - allocate (Sfcprop%peak_hr_out(IM)) - allocate (Sfcprop%lu_nofire_out(IM)) - allocate (Sfcprop%lu_qfire_out(IM)) + allocate (Sfcprop%fire_type (IM)) + allocate (Sfcprop%peak_hr (IM)) + allocate (Sfcprop%lu_nofire (IM)) + allocate (Sfcprop%lu_qfire (IM)) allocate (Sfcprop%fire_in (IM,Model%fire_aux_data_levels)) ! IMPORTANT: This initialization must match rrfs_sd_fill_data @@ -2824,11 +2824,11 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%frp_output = clear_val Sfcprop%fhist = 1. Sfcprop%coef_bb_dc = clear_val - Sfcprop%fire_type_out = 0 + Sfcprop%fire_type = 0 Sfcprop%fire_in = clear_val - Sfcprop%peak_hr_out = clear_val - Sfcprop%lu_nofire_out = clear_val - Sfcprop%lu_qfire_out = clear_val + Sfcprop%peak_hr = clear_val + Sfcprop%lu_nofire = clear_val + Sfcprop%lu_qfire = clear_val endif end subroutine sfcprop_create diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index a02abae55..1f5ff7c55 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -979,7 +979,7 @@ type = real kind = kind_phys active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme) -[fire_heat_flux_out] +[fire_heat_flux] standard_name = surface_fire_heat_flux long_name = heat flux of fire at the surface units = W m-2 @@ -987,7 +987,7 @@ type = real kind = kind_phys active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme) -[frac_grid_burned_out] +[frac_grid_burned] standard_name = fraction_of_grid_cell_burning long_name = ration of the burnt area to the grid cell area units = frac @@ -2312,31 +2312,31 @@ type = real kind = kind_phys active = (do_smoke_coupling) -[fire_type_out] - standard_name = fire_type_out +[fire_type] + standard_name = fire_type long_name = type of fire - units = none + units = 1 dimensions = (horizontal_loop_extent) type = integer active = (do_smoke_coupling) -[peak_hr_out] +[peak_hr] standard_name = peak_hr_fire - long_name = hour of peak fire emissions - units = none + long_name = time_of_peak_fire_emissions + units = s dimensions = (horizontal_loop_extent) type = real kind = kind_phys active = (do_smoke_coupling) -[lu_nofire_out] - standard_name = lu_nofire_out +[lu_nofire] + standard_name = sum_of_land_use_fractions_for_no_fire_pixels long_name = land use of no fire pixels for type units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys active = (do_smoke_coupling) -[lu_qfire_out] - standard_name = lu_qfire_out +[lu_qfire] + standard_name = sum_of_land_use_fractions_for_cropland_fire_pixels long_name = land use of fire pixels for type units = frac dimensions = (horizontal_loop_extent) @@ -3084,17 +3084,17 @@ kind = kind_phys active = (do_smoke_coupling) [uspdavg] - standard_name = bl_averaged_wind_speed + standard_name = mean_wind_speed_in_boundary_layer long_name = average wind speed within the boundary layer - units = none + units = m s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys active = (do_smoke_coupling) [hpbl_thetav] - standard_name = pbl_height_thetav + standard_name = atmosphere_boundary_layer_thickness_from_modified_parcel long_name = pbl height based on modified parcel method - units = none + units = m dimensions = (horizontal_loop_extent) type = real kind = kind_phys diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 7b0ca752f..def71566d 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -4580,7 +4580,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_sfc' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks - ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%fire_heat_flux_out + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%fire_heat_flux enddo idx = idx + 1 @@ -4591,7 +4591,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%mod_name = 'gfs_sfc' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks - ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%frac_grid_burned_out + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%frac_grid_burned enddo idx = idx + 1 @@ -4806,46 +4806,46 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop idx = idx + 1 ExtDiag(idx)%axes = 2 - ExtDiag(idx)%name = 'peak_hr_out' + ExtDiag(idx)%name = 'peak_hr' ExtDiag(idx)%desc = 'hour of peak smoke emissions' ExtDiag(idx)%unit = ' ' ExtDiag(idx)%mod_name = 'gfs_sfc' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks - ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%peak_hr_out + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%peak_hr enddo idx = idx + 1 ExtDiag(idx)%axes = 2 - ExtDiag(idx)%name = 'fire_type_out' + ExtDiag(idx)%name = 'fire_type' ExtDiag(idx)%desc = 'fire type' ExtDiag(idx)%unit = '' ExtDiag(idx)%mod_name = 'gfs_sfc' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks - ExtDiag(idx)%data(nb)%int2 => Sfcprop(nb)%fire_type_out + ExtDiag(idx)%data(nb)%int2 => Sfcprop(nb)%fire_type enddo idx = idx + 1 ExtDiag(idx)%axes = 2 - ExtDiag(idx)%name = 'lu_nofire_out' + ExtDiag(idx)%name = 'lu_nofire' ExtDiag(idx)%desc = 'lu nofire pixes' ExtDiag(idx)%unit = '' ExtDiag(idx)%mod_name = 'gfs_sfc' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks - ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%lu_nofire_out + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%lu_nofire enddo idx = idx + 1 ExtDiag(idx)%axes = 2 - ExtDiag(idx)%name = 'lu_qfire_out' + ExtDiag(idx)%name = 'lu_qfire' ExtDiag(idx)%desc = 'lu qfire pixes' ExtDiag(idx)%unit = '' ExtDiag(idx)%mod_name = 'gfs_sfc' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks - ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%lu_qfire_out + ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%lu_qfire enddo idx = idx + 1 diff --git a/ccpp/physics b/ccpp/physics index 02b344037..c0544c218 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 02b3440378e5bb04ddc4ba50b44f2532eb7cab08 +Subproject commit c0544c218776d4a94169d45cb7dae102800594a1 From 3009def68140af1b424a13a1866df1232f1b7b7c Mon Sep 17 00:00:00 2001 From: "Haiqin.Li" Date: Wed, 24 Jan 2024 16:37:31 +0000 Subject: [PATCH 3/4] "update to resolve code managers' comments" --- ccpp/data/GFS_typedefs.meta | 4 ++-- ccpp/physics | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 1f5ff7c55..87dcfe885 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -2330,7 +2330,7 @@ [lu_nofire] standard_name = sum_of_land_use_fractions_for_no_fire_pixels long_name = land use of no fire pixels for type - units = frac + units = 1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys @@ -2338,7 +2338,7 @@ [lu_qfire] standard_name = sum_of_land_use_fractions_for_cropland_fire_pixels long_name = land use of fire pixels for type - units = frac + units = 1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys diff --git a/ccpp/physics b/ccpp/physics index c0544c218..a0acaedeb 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit c0544c218776d4a94169d45cb7dae102800594a1 +Subproject commit a0acaedeb7512f9c3cc062922b83466ffdfc2478 From 49fada688be749a2861b418cad2d064839bf8c98 Mon Sep 17 00:00:00 2001 From: uturuncoglu Date: Wed, 24 Jan 2024 13:46:13 -0700 Subject: [PATCH 4/4] update ccpp/physics by merging #161 --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index ca1a6e3f1..042d156a7 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit ca1a6e3f10188c2f480ee58d4a487698ffc9234b +Subproject commit 042d156a7b8e3d94fd3dbca4e97ea22e974cb2d7