Skip to content

Commit

Permalink
Enable UFS-Aerosols in P7 configurations (NOAA-EMC#362)
Browse files Browse the repository at this point in the history
Add changes to support fully-coupled UFS configurations (P7) that include prognostic aerosols (UFS-Aerosols)
  • Loading branch information
rmontuoro authored Aug 13, 2021
1 parent 949656b commit 83aa1ee
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 12 deletions.
14 changes: 6 additions & 8 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,8 @@ subroutine update_atmos_radiation_physics (Atmos)
endif

!--- if coupled, assign coupled fields

if (.not. GFS_control%cplchm) then
call assign_importdata(jdat(:),rc)
endif
call assign_importdata(jdat(:),rc)
if (rc/=0) call mpp_error(FATAL, 'Call to assign_importdata failed')

! Calculate total non-physics tendencies by substracting old GFS Stateout
! variables from new/updated GFS Statein variables (gives the tendencies
Expand Down Expand Up @@ -2557,7 +2555,7 @@ subroutine setup_exportdata(rc)

use ESMF

use module_cplfields, only: exportFields
use module_cplfields, only: exportFields, chemistryFieldNames

!--- arguments
integer, optional, intent(out) :: rc
Expand All @@ -2584,9 +2582,6 @@ subroutine setup_exportdata(rc)
!--- begin
if (present(rc)) rc = ESMF_SUCCESS

!--- disable if coupling with chemistry
if (GFS_control%cplchm) return

isc = Atm_block%isc
iec = Atm_block%iec
jsc = Atm_block%jsc
Expand Down Expand Up @@ -2636,6 +2631,9 @@ subroutine setup_exportdata(rc)
end if
end if

!--- skip field if only required for chemistry
if (isFound .and. GFS_control%cplchm) isFound = .not.any(trim(fieldname) == chemistryFieldNames)

if (isFound) then
!$omp parallel do default(shared) private(nb) reduction(max:localrc)
do nb = 1, Atm_block%nblks
Expand Down
6 changes: 3 additions & 3 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -8814,9 +8814,9 @@
dimensions = (horizontal_loop_extent)
type = integer
[itc]
standard_name = number_of_aerosol_tracers_for_convection
long_name = number of aerosol tracers transported/scavenged by convection
units = count
standard_name = index_of_first_chemical_tracer_for_convection
long_name = index of first chemical tracer transported/scavenged by convection
units = index
dimensions = ()
type = integer
[wet]
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics
28 changes: 28 additions & 0 deletions cpl/module_cplfields.F90
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,34 @@ module module_cplfields
FieldInfo("zorl ", "s"), &
FieldInfo("t2m ", "s") ]

! Fields exported exclusively for coupling with chemistry
character(*), public, parameter :: chemistryFieldNames(*) = [ &
"inst_pres_interface ", &
"inst_pres_levels ", &
"inst_geop_interface ", &
"inst_geop_levels ", &
"inst_temp_levels ", &
"inst_zonal_wind_levels ", &
"inst_merid_wind_levels ", &
"inst_tracer_mass_frac ", &
"inst_pbl_height ", &
"surface_cell_area ", &
"inst_convective_rainfall_amount ", &
"inst_friction_velocity ", &
"inst_rainfall_amount ", &
"inst_up_sensi_heat_flx ", &
"inst_surface_roughness ", &
"inst_soil_moisture_content ", &
"inst_liq_nonconv_tendency_levels", &
"inst_ice_nonconv_tendency_levels", &
"inst_cloud_frac_levels ", &
"inst_surface_soil_wetness ", &
"ice_fraction_in_atm ", &
"lake_fraction ", &
"ocean_fraction ", &
"surface_snow_area_fraction " &
]

! Methods
public queryImportFields, queryExportFields
public cplFieldGet
Expand Down

0 comments on commit 83aa1ee

Please sign in to comment.