Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring AQM model into UFS #511

Merged
merged 61 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
f78aa42
Reset to zero coupling arrays for accumulated snow,
rmontuoro Dec 3, 2019
75654ac
Properly set kind type of literal constants
rmontuoro Dec 3, 2019
2870f5e
Initialize to zero canopy resistance output variable
rmontuoro Dec 3, 2019
37fb245
Re-implement radiation diagnostic output involving spectral
rmontuoro Dec 3, 2019
1c0a9ba
Reset to zero instantaneous total moisture tendency
rmontuoro Dec 3, 2019
afb4c67
Merge NOAA-EMC branch 'develop' into develop.
rmontuoro Apr 21, 2020
3004022
Merge NOAA-EMC branch 'develop' into develop.
rmontuoro Apr 24, 2020
617b907
Merge NOAA-EMC branch 'develop' into develop.
rmontuoro May 8, 2020
bdd1131
Merge EMC-NOAA branch 'develop' into develop.
rmontuoro Oct 19, 2020
735eb9e
Temporarily disable filling export fields during
rmontuoro Oct 19, 2020
59cf366
Moving previous commit to a branch.
rmontuoro Oct 19, 2020
6f730ae
Merge EMC branch 'develop' into develop
rmontuoro May 2, 2021
deda93d
Merge NOAA-EMC branch 'develop' into develop
rmontuoro May 11, 2021
bb754cc
Merge EMC branch 'develop' into develop
rmontuoro May 13, 2021
fefc233
Merge NOAA-EMC branch 'develop' into develop
rmontuoro May 21, 2021
0ec3000
Merge NOAA-EMC branch 'develop' into develop
rmontuoro May 21, 2021
3c4d18f
Merge NOAA-EMC branch 'develop' into develop
rmontuoro Jun 3, 2021
a119ee8
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Jul 26, 2021
71a5fd4
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Jul 29, 2021
4c2a7b2
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Aug 9, 2021
80e6ea6
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Aug 10, 2021
f3f4d00
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Aug 12, 2021
24a15fc
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Sep 23, 2021
7b1e88d
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Sep 27, 2021
4f8c34b
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Sep 29, 2021
8f28b16
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Oct 1, 2021
310b4ac
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Oct 4, 2021
c6449b9
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Oct 5, 2021
19eb9b6
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Nov 5, 2021
6c4d2e9
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Dec 15, 2021
f762bb4
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Jan 24, 2022
5910ae6
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Jan 26, 2022
e6832bc
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Jan 27, 2022
dacfe9f
Update ccpp-physics submodule to point to forked repository.
rmontuoro Jan 27, 2022
6e2f3dd
Initial porting of coupling infrastructure for AQM component.
rmontuoro Feb 1, 2022
b21d310
Increase maximum number of input aerosol scavenging factors
rmontuoro Feb 1, 2022
c6af891
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Feb 2, 2022
fff811d
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Feb 5, 2022
7121c60
Update ccpp-physics submodule.
rmontuoro Feb 6, 2022
18b0a9c
Merge branch 'develop' into feature/aqm
rmontuoro Feb 6, 2022
5965071
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Feb 11, 2022
7a78936
Update ccpp-physics submodule.
rmontuoro Feb 14, 2022
f5667a2
Merge branch 'develop' into feature/aqm
rmontuoro Feb 14, 2022
90bdace
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Feb 16, 2022
acaeb47
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Feb 18, 2022
a1640a8
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Feb 25, 2022
a379a2b
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Mar 6, 2022
0ff0e8d
Initialize additional coupling arrays for AQM/CMAQ.
rmontuoro Mar 8, 2022
059693f
Merge branch 'develop' into feature/aqm
rmontuoro Mar 8, 2022
9e1ff4a
Merge branch 'NOAA-EMC:develop' into develop
rmontuoro Mar 15, 2022
116d8ed
Merge branch 'develop' into feature/aqm
rmontuoro Mar 15, 2022
8612e83
Use BrianCurtis-NOAA for ccpp/physics
BrianCurtis-NOAA Mar 18, 2022
27f2be5
gitmodules point to BrianCurtis-NOAA for ccpp/physics
BrianCurtis-NOAA Mar 18, 2022
1656f63
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
BrianCurtis-NOAA Mar 21, 2022
bdb06f4
Remove inst_pres_height_surface from chemistryFieldNames as its impor…
BrianCurtis-NOAA Mar 23, 2022
5249c94
Update ccpp/physics hash
BrianCurtis-NOAA Mar 23, 2022
cab90ae
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
BrianCurtis-NOAA Mar 23, 2022
f004ad8
Update ccpp/physics hash
BrianCurtis-NOAA Mar 31, 2022
cbb732a
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
BrianCurtis-NOAA Mar 31, 2022
b92b391
Add PR ccpp/physics hash and merge upstream
BrianCurtis-NOAA Apr 4, 2022
44b118c
Update .gitmodules and hash for NCAR:Main in ccpp/physics
BrianCurtis-NOAA Apr 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
branch = main
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = main
#url = https://github.com/NCAR/ccpp-physics
#branch = main
url = https://github.com/BrianCurtis-NOAA/ccpp-physics
branch = feature/aqm
[submodule "upp"]
path = upp
url = https://github.com/NOAA-EMC/UPP
Expand Down
272 changes: 209 additions & 63 deletions atmos_model.F90

Large diffs are not rendered by default.

46 changes: 42 additions & 4 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: ffmm (:) => null() !< fm parameter from PBL scheme
real (kind=kind_phys), pointer :: ffhh (:) => null() !< fh parameter from PBL scheme
real (kind=kind_phys), pointer :: f10m (:) => null() !< fm at 10m - Ratio of sigma level 1 wind and 10m wind
real (kind=kind_phys), pointer :: rca (:) => null() !< canopy resistance
real (kind=kind_phys), pointer :: tprcp (:) => null() !< sfc_fld%tprcp - total precipitation
real (kind=kind_phys), pointer :: srflag (:) => null() !< sfc_fld%srflag - snow/rain flag for precipitation
real (kind=kind_phys), pointer :: slc (:,:) => null() !< liquid soil moisture
Expand Down Expand Up @@ -647,6 +648,7 @@ module GFS_typedefs
logical :: cplocn2atm !< default yes ocn->atm coupling
logical :: cplwav !< default no cplwav collection
logical :: cplwav2atm !< default no wav->atm coupling
logical :: cplaqm !< default no cplaqm collection
logical :: cplchm !< default no cplchm 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
Expand Down Expand Up @@ -1840,6 +1842,9 @@ module GFS_typedefs
! Extended output diagnostics for Thompson MP
real (kind=kind_phys), pointer :: thompson_ext_diag3d (:,:,:) => null() ! extended diagnostic 3d output arrays from Thompson MP

! Diagnostics for coupled air quality model
real (kind=kind_phys), pointer :: aod (:) => null() !< instantaneous aerosol optical depth ( n/a )

! Auxiliary output arrays for debugging
real (kind=kind_phys), pointer :: aux2d(:,:) => null() !< auxiliary 2d arrays in output (for debugging)
real (kind=kind_phys), pointer :: aux3d(:,:,:)=> null() !< auxiliary 2d arrays in output (for debugging)
Expand Down Expand Up @@ -2583,6 +2588,12 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%dt_cool = zero
Sfcprop%qrain = zero
endif
if (Model%lsm == Model%lsm_noah) then
allocate (Sfcprop%xlaixy (IM))
allocate (Sfcprop%rca (IM))
Sfcprop%xlaixy = clear_val
Sfcprop%rca = clear_val
end if
if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp) then
allocate(Sfcprop%raincprv (IM))
allocate(Sfcprop%rainncprv (IM))
Expand Down Expand Up @@ -3002,6 +3013,23 @@ subroutine coupling_create (Coupling, IM, Model)
Coupling%pfl_lsan = clear_val
endif

! -- additional coupling options for air quality
if (Model%cplaqm .and. .not.Model%cplflx) then
!--- outgoing instantaneous quantities
allocate (Coupling%dtsfci_cpl (IM))
allocate (Coupling%dqsfci_cpl (IM))
allocate (Coupling%nswsfci_cpl (IM))
allocate (Coupling%t2mi_cpl (IM))
allocate (Coupling%q2mi_cpl (IM))
allocate (Coupling%psurfi_cpl (IM))
Coupling%dtsfci_cpl = clear_val
Coupling%dqsfci_cpl = clear_val
Coupling%nswsfci_cpl = clear_val
Coupling%t2mi_cpl = clear_val
Coupling%q2mi_cpl = clear_val
Coupling%psurfi_cpl = clear_val
endif

!--- stochastic physics option
if (Model%do_sppt .or. Model%ca_global) then
allocate (Coupling%sppt_wts (IM,Model%levs))
Expand Down Expand Up @@ -3145,6 +3173,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: cplocn2atm = .true. !< default yes cplocn2atm coupling (turn on the feedback from ocn to atm)
logical :: cplwav = .false. !< default no cplwav collection
logical :: cplwav2atm = .false. !< default no cplwav2atm coupling
logical :: cplaqm = .false. !< default no cplaqm collection
logical :: cplchm = .false. !< default no cplchm collection
logical :: use_cice_alb = .false. !< default no cice albedo
logical :: cpl_imp_mrg = .false. !< default no merge import with internal forcings
Expand Down Expand Up @@ -3621,7 +3650,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: do_spp = .false.

!--- aerosol scavenging factors
integer, parameter :: max_scav_factors = 25
integer, parameter :: max_scav_factors = 183
character(len=40) :: fscav_aero(max_scav_factors)

real(kind=kind_phys) :: radar_tten_limits(2) = (/ limit_unspecified, limit_unspecified /)
Expand All @@ -3635,8 +3664,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
naux3d, aux2d_time_avg, aux3d_time_avg, fhcyc, &
thermodyn_id, sfcpress_id, &
!--- coupling parameters
cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplchm, &
cpl_imp_mrg, cpl_imp_dbg, &
cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplaqm, &
cplchm, cpl_imp_mrg, cpl_imp_dbg, &
use_cice_alb, &
#ifdef IDEA_PHYS
lsidea, weimer_model, f107_kp_size, f107_kp_interval, &
Expand Down Expand Up @@ -3948,7 +3977,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%cplocn2atm = cplocn2atm
Model%cplwav = cplwav
Model%cplwav2atm = cplwav2atm
Model%cplchm = cplchm
Model%cplaqm = cplaqm
Model%cplchm = cplchm .or. cplaqm
Model%use_cice_alb = use_cice_alb
Model%cpl_imp_mrg = cpl_imp_mrg
Model%cpl_imp_dbg = cpl_imp_dbg
Expand Down Expand Up @@ -5777,6 +5807,7 @@ subroutine control_print(Model)
print *, ' cplocn2atm : ', Model%cplocn2atm
print *, ' cplwav : ', Model%cplwav
print *, ' cplwav2atm : ', Model%cplwav2atm
print *, ' cplaqm : ', Model%cplaqm
print *, ' cplchm : ', Model%cplchm
print *, ' use_cice_alb : ', Model%use_cice_alb
print *, ' cpl_imp_mrg : ', Model%cpl_imp_mrg
Expand Down Expand Up @@ -7028,6 +7059,13 @@ subroutine diag_create (Diag, IM, Model)
Diag%thompson_ext_diag3d = clear_val
endif

! Air quality diagnostics
! -- initialize diagnostic variables
if (Model%cplaqm) then
allocate (Diag%aod(IM))
Diag%aod = zero
end if

! Auxiliary arrays in output for debugging
if (Model%naux2d>0) then
allocate (Diag%aux2d(IM,Model%naux2d))
Expand Down
27 changes: 20 additions & 7 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,13 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[rca]
standard_name = aerodynamic_resistance_in_canopy
long_name = canopy resistance
units = s m-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[tprcp]
standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep
long_name = total precipitation amount in each time step
Expand Down Expand Up @@ -1378,7 +1385,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme .and. flag_for_reading_leaf_area_index_from_input))
active = (control_for_land_surface_scheme == identifier_for_noah_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme .and. flag_for_reading_leaf_area_index_from_input))
[xsaixy]
standard_name = stem_area_index
long_name = stem area index
Expand Down Expand Up @@ -2077,15 +2084,15 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling)
[dqsfci_cpl]
standard_name = surface_upward_latent_heat_flux_for_coupling
long_name = instantaneous sfc latent heat flux
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling)
[dlwsfci_cpl]
standard_name = surface_downwelling_longwave_flux_for_coupling
long_name = instantaneous sfc downward lw flux
Expand Down Expand Up @@ -2149,7 +2156,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling)
[nnirbmi_cpl]
standard_name = surface_net_downwelling_direct_nir_shortwave_flux_for_coupling
long_name = instantaneous net nir beam sfc downward sw flux
Expand Down Expand Up @@ -2189,15 +2196,15 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling)
[q2mi_cpl]
standard_name = specific_humidity_at_2m_for_coupling
long_name = instantaneous Q2m
units = kg kg-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling)
[u10mi_cpl]
standard_name = x_wind_at_10m_for_coupling
long_name = instantaneous U10m
Expand Down Expand Up @@ -2229,7 +2236,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (flag_for_surface_flux_coupling)
active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling)
[ulwsfcin_cpl]
standard_name = surface_upwelling_longwave_flux_from_coupled_process
long_name = surface upwelling LW flux for coupling
Expand Down Expand Up @@ -2747,6 +2754,12 @@
units = flag
dimensions = ()
type = logical
[cplaqm]
standard_name = flag_for_air_quality_coupling
long_name = flag controlling cplaqm collection (default off)
units = flag
dimensions = ()
type = logical
[cplchm]
standard_name = flag_for_chemistry_coupling
long_name = flag controlling cplchm collection (default off)
Expand Down
21 changes: 18 additions & 3 deletions cpl/module_cplfields.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module module_cplfields
! l : model levels (3D)
! s : surface (2D)
! t : tracers (4D)
integer, public, parameter :: NexportFields = 105
integer, public, parameter :: NexportFields = 111
type(ESMF_Field), target, public :: exportFields(NexportFields)

type(FieldInfo), dimension(NexportFields), public, parameter :: exportFieldsInfo = [ &
Expand Down Expand Up @@ -110,6 +110,12 @@ module module_cplfields
FieldInfo("lake_fraction ", "s"), &
FieldInfo("ocean_fraction ", "s"), &
FieldInfo("surface_snow_area_fraction ", "s"), &
FieldInfo("canopy_moisture_storage ", "s"), &
FieldInfo("inst_aerodynamic_conductance ", "s"), &
FieldInfo("inst_canopy_resistance ", "s"), &
FieldInfo("leaf_area_index ", "s"), &
FieldInfo("temperature_of_soil_layer ", "g"), &
FieldInfo("height ", "s"), &


! For JEDI
Expand Down Expand Up @@ -142,7 +148,7 @@ module module_cplfields
FieldInfo("t2m ", "s") ]

! Import Fields ----------------------------------------
integer, public, parameter :: NimportFields = 42
integer, public, parameter :: NimportFields = 43
logical, public :: importFieldsValid(NimportFields)
type(ESMF_Field), target, public :: importFields(NimportFields)

Expand All @@ -164,6 +170,7 @@ module module_cplfields
FieldInfo("inst_ice_vis_dif_albedo ", "s"), &
FieldInfo("inst_ice_vis_dir_albedo ", "s"), &
FieldInfo("wave_z0_roughness_length ", "s"), &
FieldInfo("inst_tracer_diag_aod ", "s"), &

! For JEDI
! dynamics
Expand Down Expand Up @@ -219,7 +226,15 @@ module module_cplfields
"ice_fraction_in_atm ", &
"lake_fraction ", &
"ocean_fraction ", &
"surface_snow_area_fraction " &
"surface_snow_area_fraction ", &
"inst_vegetation_area_frac ", &
"canopy_moisture_storage ", &
"inst_aerodynamic_conductance ", &
"inst_canopy_resistance ", &
"leaf_area_index ", &
"soil_type ", &
"temperature_of_soil_layer ", &
"height " &
]

! Methods
Expand Down