From 67e550497db6c50525140307358b5d2a48c47552 Mon Sep 17 00:00:00 2001 From: masih Date: Wed, 18 Oct 2023 15:18:32 -0600 Subject: [PATCH 1/3] add fire behavior tendencies to physics * added hflx_fire and evap_fire to GFS_surface_composite_post * added cpl_fire flag --- physics/GFS_surface_composites_post.F90 | 14 +++++++++----- physics/GFS_surface_composites_post.meta | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/physics/GFS_surface_composites_post.F90 b/physics/GFS_surface_composites_post.F90 index ab7528a62..8d8596b2d 100644 --- a/physics/GFS_surface_composites_post.F90 +++ b/physics/GFS_surface_composites_post.F90 @@ -23,22 +23,22 @@ module GFS_surface_composites_post !! \htmlinclude GFS_surface_composites_post_run.html !! subroutine GFS_surface_composites_post_run ( & - im, kice, km, rd, rvrdm1, cplflx, cplwav2atm, frac_grid, flag_cice, thsfc_loc, islmsk, dry, wet, icy, wind, t1, q1, prsl1, & + im, kice, km, rd, rvrdm1, cplflx, cplwav2atm, cpl_fire, frac_grid, flag_cice, thsfc_loc, islmsk, dry, wet, icy, wind, t1, q1, prsl1, & landfrac, lakefrac, oceanfrac, zorl, zorlo, zorll, zorli, garea, frac_ice, & cd, cd_wat, cd_lnd, cd_ice, cdq, cdq_wat, cdq_lnd, cdq_ice, rb, rb_wat, rb_lnd, rb_ice, stress, stress_wat, stress_lnd, & stress_ice, ffmm, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh, ffhh_wat, ffhh_lnd, ffhh_ice, uustar, uustar_wat, uustar_lnd, & uustar_ice, fm10, fm10_wat, fm10_lnd, fm10_ice, fh2, fh2_wat, fh2_lnd, fh2_ice, tsurf_wat, tsurf_lnd, tsurf_ice, & cmm, cmm_wat, cmm_lnd, cmm_ice, chh, chh_wat, chh_lnd, chh_ice, gflx, gflx_wat, gflx_lnd, gflx_ice, ep1d, ep1d_wat, & ep1d_lnd, ep1d_ice, weasd, weasd_lnd, weasd_ice, snowd, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & - tprcp_lnd, tprcp_ice, evap, evap_wat, evap_lnd, evap_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, qss, qss_wat, qss_lnd, & - qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tisfc, hice, cice, tiice, & + tprcp_lnd, tprcp_ice, evap, evap_wat, evap_lnd, evap_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, hflx_fire, evap_fire, & + qss, qss_wat, qss_lnd, qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tisfc, hice, cice, tiice, & sigmaf, zvfun, lheatstrg, h0facu, h0facs, hflxq, hffac, stc, lkm, iopt_lake, iopt_lake_clm, use_lake_model, & grav, prsik1, prslk1, prslki, z1, ztmax_wat, ztmax_lnd, ztmax_ice, huge, errmsg, errflg) implicit none integer, intent(in) :: im, kice, km, lkm, iopt_lake, iopt_lake_clm - logical, intent(in) :: cplflx, frac_grid, cplwav2atm, frac_ice + logical, intent(in) :: cplflx, frac_grid, cplwav2atm, frac_ice, cpl_fire logical, intent(in) :: lheatstrg logical, dimension(:), intent(in) :: flag_cice, dry, icy logical, dimension(:), intent(inout) :: wet @@ -49,7 +49,7 @@ subroutine GFS_surface_composites_post_run ( fm10_wat, fm10_lnd, fm10_ice, fh2_wat, fh2_lnd, fh2_ice, tsurf_wat, tsurf_lnd, tsurf_ice, cmm_wat, cmm_lnd, cmm_ice, & chh_wat, chh_lnd, chh_ice, gflx_wat, gflx_lnd, gflx_ice, ep1d_wat, ep1d_lnd, ep1d_ice, weasd_lnd, weasd_ice, & snowd_lnd, snowd_ice, tprcp_wat, tprcp_lnd, tprcp_ice, evap_wat, evap_lnd, evap_ice, hflx_wat, hflx_lnd, & - hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat, zorlo, zorll, zorli, garea + hflx_ice, hflx_fire, evap_fire, qss_wat, qss_lnd, qss_ice, tsfc_wat, zorlo, zorll, zorli, garea real(kind=kind_phys), dimension(:), intent(inout) :: zorl, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, & fh2, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc @@ -275,6 +275,10 @@ subroutine GFS_surface_composites_post_run ( else if (islmsk(i) == 1) then !-- land call composite_land + if (cpl_fire) then + hflx(i) = hflx(i) + hflx_fire(i) + evap(i) = evap(i) + evap_fire(i) + endif elseif (islmsk(i) == 0) then !-- water call composite_wet diff --git a/physics/GFS_surface_composites_post.meta b/physics/GFS_surface_composites_post.meta index a78610cc7..d0c465452 100644 --- a/physics/GFS_surface_composites_post.meta +++ b/physics/GFS_surface_composites_post.meta @@ -815,6 +815,29 @@ type = real kind = kind_phys intent = in +[hflx_fire] + standard_name = kinematic_surface_upward_sensible_heat_flux_of_fire + long_name = kinematic surface upward sensible heat flux of fire + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[evap_fire] + standard_name = surface_upward_specific_humidity_flux_of_fire + long_name = kinematic surface upward latent heat flux of fire + units = kg kg-1 m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[cpl_fire] + standard_name = do_fire_coupling + long_name = flag controlling fire_behavior collection (default off) + units = flag + dimensions = () + type = logical + intent = in [qss] standard_name = surface_specific_humidity long_name = surface air saturation specific humidity From 8a0c85c55aa73f31e720921b3149cdf70798daa1 Mon Sep 17 00:00:00 2001 From: masih Date: Tue, 2 Jan 2024 15:30:57 -0700 Subject: [PATCH 2/3] fire_behavior smoke coupling * added fsmoke tracer * added surface emissions to fsmoke in rrfs_smoke_wrapper --- physics/smoke_dust/rrfs_smoke_wrapper.F90 | 29 ++++++++++++----- physics/smoke_dust/rrfs_smoke_wrapper.meta | 36 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 7 deletions(-) diff --git a/physics/smoke_dust/rrfs_smoke_wrapper.F90 b/physics/smoke_dust/rrfs_smoke_wrapper.F90 index 1f9ef6340..d892d19ef 100755 --- a/physics/smoke_dust/rrfs_smoke_wrapper.F90 +++ b/physics/smoke_dust/rrfs_smoke_wrapper.F90 @@ -38,17 +38,18 @@ module rrfs_smoke_wrapper !! !>\section rrfs_smoke_wrapper rrfs-sd Scheme General Algorithm !> @{ - subroutine rrfs_smoke_wrapper_run(im, kte, kme, ktau, dt, garea, land, jdate, & + subroutine rrfs_smoke_wrapper_run(im, flag_init, flag_restart, kte, kme, ktau, dt, garea, land, jdate, & u10m, v10m, ustar, rlat, rlon, tskin, pb2d, t2m, dpt2m, & pr3d, ph3d,phl3d, prl3d, tk3d, us3d, vs3d, spechum, w, & nsoil, smc, vegtype, soiltyp, sigmaf, dswsfc, zorl, snow, julian, & idat, rain_cpl, rainc_cpl, exch, hf2d, g, pi, con_cp, con_rd, con_fv, & dust12m_in, emi_in, smoke_RRFS, ntrac, qgrs, gq0, chem3d, tile_num, & - ntsmoke, ntdust, ntcoarsepm, imp_physics, imp_physics_thompson, & - nwfa, nifa, emanoc, emdust, emseas, & + ntfsmoke, ntsmoke, ntdust, ntcoarsepm, & + imp_physics, imp_physics_thompson,nwfa, nifa, emanoc, emdust, emseas, & ebb_smoke_hr, frp_hr, frp_std_hr, & coef_bb, ebu_smoke,fhist, min_fplume, max_fplume, hwp, wetness, & - smoke_ext, dust_ext, ndvel, ddvel_inout,rrfs_sd, & + smoke_ext, dust_ext, ndvel, ddvel_inout,rrfs_sd,cpl_fire, & + smoke_fire, & dust_alpha_in, dust_gamma_in, fire_in, & seas_opt_in, dust_opt_in, drydep_opt_in, coarsepm_settling_in, & do_plumerise_in, plumerisefire_frq_in, addsmoke_flag_in, & @@ -59,7 +60,8 @@ subroutine rrfs_smoke_wrapper_run(im, kte, kme, ktau, dt, garea, land, jdate, integer, intent(in) :: im,kte,kme,ktau,nsoil,tile_num,jdate(8),idat(8) - integer, intent(in) :: ntrac, ntsmoke, ntdust, ntcoarsepm, ndvel + logical, intent(in) :: flag_init, flag_restart + integer, intent(in) :: ntrac, ntfsmoke, ntsmoke, ntdust, ntcoarsepm, ndvel real(kind_phys),intent(in) :: dt, julian, g, pi, con_cp, con_rd, con_fv logical, intent(in) :: aero_ind_fdb_in,dbg_opt_in integer, intent(in) :: smoke_forecast_in @@ -75,7 +77,7 @@ subroutine rrfs_smoke_wrapper_run(im, kte, kme, ktau, dt, garea, land, jdate, real(kind_phys), dimension(:,:), intent(in) :: emi_in real(kind_phys), dimension(:), intent(in) :: u10m, v10m, ustar, dswsfc, & garea, rlat,rlon, tskin, pb2d, sigmaf, zorl, snow, & - rain_cpl, rainc_cpl, hf2d, t2m, dpt2m + rain_cpl, rainc_cpl, hf2d, t2m, dpt2m, smoke_fire real(kind_phys), dimension(:,:), intent(in) :: ph3d, pr3d real(kind_phys), dimension(:,:), intent(in) :: phl3d, prl3d, tk3d, & us3d, vs3d, spechum, exch, w @@ -97,7 +99,7 @@ subroutine rrfs_smoke_wrapper_run(im, kte, kme, ktau, dt, garea, land, jdate, integer, intent(in) :: seas_opt_in, dust_opt_in, drydep_opt_in, & coarsepm_settling_in, plumerisefire_frq_in, & addsmoke_flag_in, wetdep_ls_opt_in - logical, intent(in ) :: do_plumerise_in, rrfs_sd + logical, intent(in ) :: do_plumerise_in, rrfs_sd, cpl_fire character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -164,6 +166,19 @@ subroutine rrfs_smoke_wrapper_run(im, kte, kme, ktau, dt, garea, land, jdate, errmsg = '' errflg = 0 + if (cpl_fire) then + if (flag_init) then + do i=1,im + do k=kts,kte + qgrs(i,k,ntfsmoke) = 0. + end do + end do + endif + do i=1,im + qgrs(i,kts,ntfsmoke) = qgrs(i,kts,ntfsmoke) + smoke_fire(i) ! units wrong + end do + endif + if (.not. rrfs_sd) return !>-- options to turn on/off sea-salt, dust, plume-rising diff --git a/physics/smoke_dust/rrfs_smoke_wrapper.meta b/physics/smoke_dust/rrfs_smoke_wrapper.meta index bf2fddd60..498f5fddd 100755 --- a/physics/smoke_dust/rrfs_smoke_wrapper.meta +++ b/physics/smoke_dust/rrfs_smoke_wrapper.meta @@ -14,6 +14,20 @@ dimensions = () type = integer intent = in +[flag_init] + standard_name = flag_for_first_timestep + long_name = flag signaling first time step for time integration loop + units = flag + dimensions = () + type = logical + intent = in +[flag_restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in [kte] standard_name = vertical_layer_dimension long_name = vertical layer dimension @@ -426,6 +440,13 @@ dimensions = () type = integer intent = in +[ntfsmoke] + standard_name = index_for_fire_smoke_in_tracer_concentration_array + long_name = tracer index for fire smoke + units = index + dimensions = () + type = integer + intent = in [ntdust] standard_name = index_for_dust_in_tracer_concentration_array long_name = tracer index for dust @@ -636,6 +657,21 @@ type = real kind = kind_phys intent = inout +[smoke_fire] + standard_name = smoke_emission_of_fire + long_name = smoke emission of fire + units = kg m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[cpl_fire] + standard_name = do_fire_coupling + long_name = flag controlling fire_behavior collection (default off) + units = flag + dimensions = () + type = logical + intent = in [seas_opt_in] standard_name = control_for_smoke_sea_salt long_name = rrfs smoke sea salt emission option From 9057f6d6c5ea18794ff2faead4c650302d9d1767 Mon Sep 17 00:00:00 2001 From: masih Date: Mon, 20 May 2024 10:56:40 -0600 Subject: [PATCH 3/3] added fire flag for t2, q2 and surface pres --- .../GFS_surface_generic_post.F90 | 17 +++++++++++++---- .../GFS_surface_generic_post.meta | 7 +++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.F90 index 7e8cfa753..f8feb2b5b 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.F90 @@ -45,7 +45,7 @@ end subroutine GFS_surface_generic_post_init !> \section arg_table_GFS_surface_generic_post_run Argument Table !! \htmlinclude GFS_surface_generic_post_run.html !! - subroutine GFS_surface_generic_post_run (im, cplflx, cplaqm, cplchm, cplwav, cpllnd, lssav, dry, icy, wet, & + subroutine GFS_surface_generic_post_run (im, cplflx, cplaqm, cplchm, cplwav, cpllnd, cpl_fire, lssav, dry, icy, wet, & lsm, lsm_noahmp, dtf, ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, & adjsfcdlw, adjsfcdsw, adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjsfculw_wat, adjnirbmu, adjnirdfu, & adjvisbmu, adjvisdfu, t2m, q2m, u10m, v10m, tsfc, tsfc_wat, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf, pah, pahi, & @@ -59,7 +59,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplaqm, cplchm, cplwav, cpl implicit none integer, intent(in) :: im - logical, intent(in) :: cplflx, cplaqm, cplchm, cplwav, cpllnd, lssav + logical, intent(in) :: cplflx, cplaqm, cplchm, cplwav, cpllnd, cpl_fire, lssav logical, dimension(:), intent(in) :: dry, icy, wet integer, intent(in) :: lsm, lsm_noahmp real(kind=kind_phys), intent(in) :: dtf @@ -134,9 +134,20 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplaqm, cplchm, cplwav, cpl dswsfci_cpl (i) = adjsfcdsw(i) dlwsfc_cpl (i) = dlwsfc_cpl(i) + adjsfcdlw(i)*dtf dswsfc_cpl (i) = dswsfc_cpl(i) + adjsfcdsw(i)*dtf + enddo + endif + + if (cplflx .or. cpllnd .or. cpl_fire) then + do i=1,im psurfi_cpl (i) = pgr(i) enddo endif + if (cplflx .or. cpl_fire) then + do i=1,im + t2mi_cpl (i) = t2m(i) + q2mi_cpl (i) = q2m(i) + enddo + endif if (cplflx) then do i=1,im @@ -153,8 +164,6 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplaqm, cplchm, cplwav, cpl nlwsfci_cpl(i) = adjsfcdlw(i) - adjsfculw_wat(i) endif nlwsfc_cpl (i) = nlwsfc_cpl(i) + nlwsfci_cpl(i)*dtf - t2mi_cpl (i) = t2m(i) - q2mi_cpl (i) = q2m(i) enddo endif diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.meta index 2c28b17d7..2a314e367 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.meta @@ -126,6 +126,13 @@ dimensions = () type = logical intent = in +[cpl_fire] + standard_name = do_fire_coupling + long_name = flag controlling fire_behavior collection (default off) + units = flag + dimensions = () + type = logical + intent = in [lssav] standard_name = flag_for_diagnostics long_name = logical flag for storing diagnostics