From 83aa1eea587469eb6ee6c44972f9bea68b6dbdb4 Mon Sep 17 00:00:00 2001 From: Raffaele Montuoro Date: Fri, 13 Aug 2021 10:07:38 -0500 Subject: [PATCH] Enable UFS-Aerosols in P7 configurations (#362) Add changes to support fully-coupled UFS configurations (P7) that include prognostic aerosols (UFS-Aerosols) --- atmos_model.F90 | 14 ++++++-------- ccpp/data/GFS_typedefs.meta | 6 +++--- ccpp/physics | 2 +- cpl/module_cplfields.F90 | 28 ++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/atmos_model.F90 b/atmos_model.F90 index 07732294f09..83cd0937356 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index a484301b4f1..277d0a32584 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -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] diff --git a/ccpp/physics b/ccpp/physics index aaa479215ba..55e0814905d 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit aaa479215babac5fcbbdd9fb8e0566145c56279c +Subproject commit 55e0814905d849be0cc103288522122aa6f55afc diff --git a/cpl/module_cplfields.F90 b/cpl/module_cplfields.F90 index 4a9abc6c1f8..380c49c7706 100644 --- a/cpl/module_cplfields.F90 +++ b/cpl/module_cplfields.F90 @@ -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