Skip to content

Commit

Permalink
updates to GFS_typedefs for ufs/dev PR#220
Browse files Browse the repository at this point in the history
  • Loading branch information
grantfirl committed Oct 18, 2024
1 parent 10fd4d0 commit 5bb81e1
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[submodule "ccpp-physics"]
path = ccpp/physics
url = https://github.com/grantfirl/ccpp-physics
branch = ufs-dev-PR223
branch = ufs-dev-PR220
[submodule "CMakeModules"]
path = CMakeModules
url = https://github.com/noaa-emc/CMakeModules
Expand Down
34 changes: 29 additions & 5 deletions scm/src/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: spec_sh_flux (:) => null() !< specified kinematic surface sensible heat flux
real (kind=kind_phys), pointer :: spec_lh_flux (:) => null() !< specified kinematic surface latent heat flux

!--- fire_behavior
real (kind=kind_phys), pointer :: hflx_fire (:) => null() !< kinematic surface upward sensible heat flux of fire
real (kind=kind_phys), pointer :: evap_fire (:) => null() !< kinematic surface upward latent heat flux of fire
real (kind=kind_phys), pointer :: smoke_fire (:) => null() !< smoke emission of fire

!-- In/Out
real (kind=kind_phys), pointer :: maxupmf(:) => null() !< maximum up draft mass flux for Grell-Freitas
real (kind=kind_phys), pointer :: conv_act(:) => null() !< convective activity counter for Grell-Freitas
Expand Down Expand Up @@ -760,6 +765,7 @@ module GFS_typedefs
logical :: cpllnd !< default no cpllnd collection
logical :: cpllnd2atm !< default no lnd->atm coupling
logical :: rrfs_sd !< default no rrfs_sd collection
logical :: cpl_fire !< default no fire_behavior collection
logical :: use_cice_alb !< default .false. - i.e. don't use albedo imported from the ice model
logical :: cpl_imp_mrg !< default no merge import with internal forcings
logical :: cpl_imp_dbg !< default no write import data to file post merge
Expand Down Expand Up @@ -1480,6 +1486,7 @@ module GFS_typedefs
integer :: nto2 !< tracer index for oxygen
integer :: ntwa !< tracer index for water friendly aerosol
integer :: ntia !< tracer index for ice friendly aerosol
integer :: ntfsmoke !< tracer index for fire smoke
integer :: ntsmoke !< tracer index for smoke
integer :: ntdust !< tracer index for dust
integer :: ntcoarsepm !< tracer index for coarse PM
Expand Down Expand Up @@ -2873,6 +2880,16 @@ subroutine sfcprop_create (Sfcprop, Model)
Sfcprop%lu_qfire = clear_val
endif

!--- if fire_behavior is on
if(Model%cpl_fire) then
allocate (Sfcprop%hflx_fire (IM))
allocate (Sfcprop%evap_fire (IM))
allocate (Sfcprop%smoke_fire (IM))
Sfcprop%hflx_fire = zero
Sfcprop%evap_fire = zero
Sfcprop%smoke_fire = zero
endif

end subroutine sfcprop_create


Expand Down Expand Up @@ -2932,7 +2949,7 @@ subroutine coupling_create (Coupling, Model)
Coupling%tsfc_radtime = clear_val
endif

if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global .or. Model%cpllnd) then
if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global .or. Model%cpllnd .or. Model%cpl_fire) then
allocate (Coupling%rain_cpl (IM))
allocate (Coupling%snow_cpl (IM))
Coupling%rain_cpl = clear_val
Expand Down Expand Up @@ -2961,7 +2978,7 @@ subroutine coupling_create (Coupling, Model)
! Coupling%zorlwav_cpl = clear_val
! endif

if (Model%cplflx .or. Model%cpllnd) then
if (Model%cplflx .or. Model%cpllnd .or. Model%cpl_fire) then
allocate (Coupling%dlwsfci_cpl (IM))
allocate (Coupling%dswsfci_cpl (IM))
allocate (Coupling%dlwsfc_cpl (IM))
Expand Down Expand Up @@ -2995,7 +3012,7 @@ subroutine coupling_create (Coupling, Model)
Coupling%nvisdf_cpl = clear_val
end if

if (Model%cplflx) then
if (Model%cplflx .or. Model%cpl_fire) then
!--- incoming quantities
allocate (Coupling%slimskin_cpl (IM))
allocate (Coupling%dusfcin_cpl (IM))
Expand Down Expand Up @@ -3160,7 +3177,7 @@ subroutine coupling_create (Coupling, Model)
Coupling%pfl_lsan = clear_val
endif

if (Model%cplchm .or. Model%cplflx .or. Model%cpllnd) then
if (Model%cplchm .or. Model%cplflx .or. Model%cpllnd .or. Model%cpl_fire) then
!--- accumulated convective rainfall
allocate (Coupling%rainc_cpl (IM))
Coupling%rainc_cpl = clear_val
Expand Down Expand Up @@ -3369,6 +3386,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: cpllnd = .false. !< default no cpllnd collection
logical :: cpllnd2atm = .false. !< default no cpllnd2atm coupling
logical :: rrfs_sd = .false. !< default no rrfs_sd collection
logical :: cpl_fire = .false. !< default no fire behavior colleciton
logical :: use_cice_alb = .false. !< default no cice albedo
logical :: cpl_imp_mrg = .false. !< default no merge import with internal forcings
logical :: cpl_imp_dbg = .false. !< default no write import data to file post merge
Expand Down Expand Up @@ -4030,7 +4048,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- coupling parameters
cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplaqm, &
cplchm, cpllnd, cpllnd2atm, cpl_imp_mrg, cpl_imp_dbg, &
rrfs_sd, use_cice_alb, &
cpl_fire, rrfs_sd, use_cice_alb, &
#ifdef IDEA_PHYS
lsidea, weimer_model, f107_kp_size, f107_kp_interval, &
f107_kp_skip_size, f107_kp_data_size, f107_kp_read_in_start, &
Expand Down Expand Up @@ -4452,6 +4470,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

!--- RRFS-SD
Model%rrfs_sd = rrfs_sd
Model%cpl_fire = cpl_fire
Model%dust_drylimit_factor = dust_drylimit_factor
Model%dust_moist_correction = dust_moist_correction
Model%dust_moist_opt = dust_moist_opt
Expand Down Expand Up @@ -5265,6 +5284,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%nqrimef = get_tracer_index(Model%tracer_names, 'q_rimef', Model%me, Model%master, Model%debug)
Model%ntwa = get_tracer_index(Model%tracer_names, 'liq_aero', Model%me, Model%master, Model%debug)
Model%ntia = get_tracer_index(Model%tracer_names, 'ice_aero', Model%me, Model%master, Model%debug)
if (Model%cpl_fire) then
Model%ntfsmoke = get_tracer_index(Model%tracer_names, 'fsmoke', Model%me, Model%master, Model%debug)
endif
if (Model%rrfs_sd) then
Model%ntsmoke = get_tracer_index(Model%tracer_names, 'smoke', Model%me, Model%master, Model%debug)
Model%ntdust = get_tracer_index(Model%tracer_names, 'dust', Model%me, Model%master, Model%debug)
Expand Down Expand Up @@ -6577,6 +6599,7 @@ subroutine control_print(Model)
print *, ' cpllnd : ', Model%cpllnd
print *, ' cpllnd2atm : ', Model%cpllnd2atm
print *, ' rrfs_sd : ', Model%rrfs_sd
print *, ' cpl_fire : ', Model%cpl_fire
print *, ' use_cice_alb : ', Model%use_cice_alb
print *, ' cpl_imp_mrg : ', Model%cpl_imp_mrg
print *, ' cpl_imp_dbg : ', Model%cpl_imp_dbg
Expand Down Expand Up @@ -7049,6 +7072,7 @@ subroutine control_print(Model)
print *, ' nto2 : ', Model%nto2
print *, ' ntwa : ', Model%ntwa
print *, ' ntia : ', Model%ntia
print *, ' ntfsmoke : ', Model%ntfsmoke
print *, ' ntsmoke : ', Model%ntsmoke
print *, ' ntdust : ', Model%ntdust
print *, ' ntcoarsepm : ', Model%ntcoarsepm
Expand Down
46 changes: 41 additions & 5 deletions scm/src/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,30 @@
type = real
kind = kind_phys
active = (do_smoke_coupling)
[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
active = (do_fire_coupling)
[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
active = (do_fire_coupling)
[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
active = (do_fire_coupling)

########################################################################
[ccpp-table-properties]
Expand Down Expand Up @@ -2486,15 +2510,15 @@
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_land_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_land_coupling .or. do_fire_coupling)
[snow_cpl]
standard_name = cumulative_lwe_thickness_of_snow_amount_for_coupling
long_name = total snow precipitation
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata .or. flag_for_land_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata .or. flag_for_land_coupling .or. do_fire_coupling)
[dusfc_cpl]
standard_name = cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestep
long_name = cumulative sfc x momentum flux multiplied by timestep
Expand Down Expand Up @@ -2758,15 +2782,15 @@
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. do_fire_coupling)
[q2mi_cpl]
standard_name = specific_humidity_at_2m_for_coupling
long_name = instantaneous Q2m
units = kg kg-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. do_fire_coupling)
[u10mi_cpl]
standard_name = x_wind_at_10m_for_coupling
long_name = instantaneous U10m
Expand Down Expand Up @@ -2798,7 +2822,7 @@
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. flag_for_land_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. flag_for_land_coupling .or. do_fire_coupling)
[ulwsfcin_cpl]
standard_name = surface_upwelling_longwave_flux_from_coupled_process
long_name = surface upwelling LW flux for coupling
Expand Down Expand Up @@ -3648,6 +3672,12 @@
units = flag
dimensions = ()
type = logical
[cpl_fire]
standard_name = do_fire_coupling
long_name = flag controlling fire_behavior collection (default off)
units = flag
dimensions = ()
type = logical
[cpl_imp_mrg]
standard_name = flag_for_merging_imported_data
long_name = flag controlling cpl_imp_mrg for imported data (default off)
Expand Down Expand Up @@ -6563,6 +6593,12 @@
units = index
dimensions = ()
type = integer
[ntfsmoke]
standard_name = index_for_fire_smoke_in_tracer_concentration_array
long_name = tracer index for fire smoke
units = index
dimensions = ()
type = integer
[ntdust]
standard_name = index_for_dust_in_tracer_concentration_array
long_name = tracer index for dust
Expand Down

0 comments on commit 5bb81e1

Please sign in to comment.