From 70810f134fda5cb5fbb8ace9b79fe263768671dc Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 21 May 2024 13:42:57 -0600 Subject: [PATCH] Add support for optional arguments in ccpp physics and framework (#807) * In ccpp/data/GFS_typedefs.meta: change units 'flashes 5 min-1' to 'flashes min-1' and update long name to make clear this is per 5 minutes * In ccpp/driver/GFS_diagnostics.F90, scale lightning threat from flashes per minute to flashes per 5 minutes to match diagnostic units * Fix wrong long names for lightning threat indices in ccpp/data/GFS_typedefs.meta * Remove invalid active attributes in ccpp/data/GFS_typedefs.meta * Bug fix for GFDL-MP in CCPP: use correct allocation of variables but internally bend everything back to where it's expected (affects some, but not all variables in CCPP_typedefs.{F90,meta}) * Bug fix in ccpp/data/GFS_typedefs.meta: sncovr_ice is always allocated, remove active attribute * Bug fix in ccpp/data/CCPP_typedefs.meta small-scale gravity wave drag variables are active for options 2,3,22,33 of gwd, not just 3,33 * Bug fix in ccpp/data/GFS_typedefs.meta: three variables are always allocated, remove active attribute * More bug fixes for active attributes in ccpp/data/GFS_typedefs.meta * More bug fixes for allocation dimensions in ccpp/data/CCPP_typedefs.*; optional arguments in stochastic_physics/stochastic_physics_wrapper.F90 * Set ccpp_data's thrd_cnt in ccpp/driver/CCPP_driver.F90 * No default in OMP pragmas in ccpp/driver/CCPP_driver.F90 --- atmos_cubed_sphere | 2 +- ccpp/data/CCPP_typedefs.F90 | 30 +++++++ ccpp/data/CCPP_typedefs.meta | 88 ++++++++++++++----- ccpp/data/GFS_typedefs.F90 | 13 +-- ccpp/data/GFS_typedefs.meta | 40 +-------- ccpp/driver/CCPP_driver.F90 | 10 ++- ccpp/framework | 2 +- ccpp/physics | 2 +- .../stochastic_physics_wrapper.F90 | 1 + 9 files changed, 120 insertions(+), 68 deletions(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index cc8afe64b..061a73663 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit cc8afe64b9420dd7379e47cee5e3f30f4ac44b58 +Subproject commit 061a73663f2bab9799eab7345c2ff8a34c789573 diff --git a/ccpp/data/CCPP_typedefs.F90 b/ccpp/data/CCPP_typedefs.F90 index 83b6d4df0..32abd412a 100644 --- a/ccpp/data/CCPP_typedefs.F90 +++ b/ccpp/data/CCPP_typedefs.F90 @@ -452,10 +452,18 @@ module CCPP_typedefs integer :: ie integer :: isd integer :: ied + integer :: isc1 + integer :: iec1 + integer :: isc2 + integer :: iec2 integer :: js integer :: je integer :: jsd integer :: jed + integer :: jsc1 + integer :: jec1 + integer :: jsc2 + integer :: jec2 integer :: ng integer :: npz integer :: npzp1 @@ -1557,6 +1565,18 @@ subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd integer, intent(in) :: mpirank integer, intent(in) :: mpiroot ! + integer :: isc1, jsc1, iec1, jec1 + integer :: isc2, jsc2, iec2, jec2 + ! + isc1 = lbound(delp, dim=1) + jsc1 = lbound(delp, dim=2) + iec1 = ubound(delp, dim=1) + jec1 = ubound(delp, dim=2) + isc2 = lbound(delz, dim=1) + jsc2 = lbound(delz, dim=2) + iec2 = ubound(delz, dim=1) + jec2 = ubound(delz, dim=2) + ! #ifdef MOIST_CAPPA Interstitial%npzcappa = npz allocate (Interstitial%cappa (isd:ied, jsd:jed, 1:npz) ) @@ -1594,13 +1614,22 @@ subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd Interstitial%ie = ie Interstitial%isd = isd Interstitial%ied = ied + Interstitial%isc1 = isc1 + Interstitial%iec1 = iec1 + Interstitial%isc2 = isc2 + Interstitial%iec2 = iec2 Interstitial%js = js Interstitial%je = je Interstitial%jsd = jsd Interstitial%jed = jed + Interstitial%jsc1 = jsc1 + Interstitial%jec1 = jec1 + Interstitial%jsc2 = jsc2 + Interstitial%jec2 = jec2 Interstitial%ng = ng Interstitial%npz = npz Interstitial%npzp1 = npz+1 + ! ! Set up links from GFDL_interstitial DDT to ATM DDT Interstitial%delp => delp Interstitial%delz => delz @@ -1617,6 +1646,7 @@ subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd if (do_qs) Interstitial%qs => qs if (do_qg) Interstitial%qg => qg if (do_qa) Interstitial%qc => qc + ! #ifdef USE_COND Interstitial%npzq_con = npz #else diff --git a/ccpp/data/CCPP_typedefs.meta b/ccpp/data/CCPP_typedefs.meta index 37201eb08..d1a06abf0 100644 --- a/ccpp/data/CCPP_typedefs.meta +++ b/ccpp/data/CCPP_typedefs.meta @@ -344,7 +344,7 @@ dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) + active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33) [cmm_water] standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water long_name = momentum exchange coefficient over water @@ -1526,7 +1526,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) + active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33) [oa4ss] standard_name = asymmetry_of_subgrid_orography_small_scale long_name = asymmetry of subgrid height_above_mean_sea_level small scale @@ -1534,7 +1534,7 @@ dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) + active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33) [oc] standard_name = convexity_of_subgrid_orography long_name = convexity of subgrid height_above_mean_sea_level @@ -1549,7 +1549,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) + active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33) [olyr] standard_name = ozone_concentration_at_layer_for_radiation long_name = ozone concentration layer @@ -2964,6 +2964,30 @@ units = count dimensions = () type = integer +[isc1] + standard_name = starting_x_direction_index_alloc1 + long_name = starting X direction index for allocation + units = count + dimensions = () + type = integer +[iec1] + standard_name = ending_x_direction_index_alloc1 + long_name = ending X direction index for allocation + units = count + dimensions = () + type = integer +[isc2] + standard_name = starting_x_direction_index_alloc2 + long_name = starting X direction index for allocation + units = count + dimensions = () + type = integer +[iec2] + standard_name = ending_x_direction_index_alloc2 + long_name = ending X direction index for allocation + units = count + dimensions = () + type = integer [js] standard_name = starting_y_direction_index long_name = starting Y direction index @@ -2988,25 +3012,49 @@ units = count dimensions = () type = integer +[jsc1] + standard_name = starting_y_direction_index_alloc1 + long_name = starting X direction index for allocation + units = count + dimensions = () + type = integer +[jec1] + standard_name = ending_y_direction_index_alloc1 + long_name = ending X direction index for allocation + units = count + dimensions = () + type = integer +[jsc2] + standard_name = starting_y_direction_index_alloc2 + long_name = starting X direction index for allocation + units = count + dimensions = () + type = integer +[jec2] + standard_name = ending_y_direction_index_alloc2 + long_name = ending X direction index for allocation + units = count + dimensions = () + type = integer [delp] standard_name = pressure_thickness_at_Lagrangian_surface long_name = pressure thickness at Lagrangian surface units = Pa - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics) type = real kind = kind_dyn [delz] standard_name = thickness_at_Lagrangian_surface long_name = thickness at Lagrangian_surface units = m - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_thickness_at_Lagrangian_surface) + dimensions = (starting_x_direction_index_alloc2:ending_x_direction_index_alloc2,starting_y_direction_index_alloc2:ending_y_direction_index_alloc2,1:vertical_dimension_for_thickness_at_Lagrangian_surface) type = real kind = kind_dyn [area] standard_name = cell_area_for_fast_physics long_name = area of the grid cell for fast physics units = m2 - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1) type = real kind = kind_grid [ng] @@ -3049,35 +3097,35 @@ standard_name = log_pressure_at_Lagrangian_surface long_name = logarithm of pressure at Lagrangian surface units = Pa - dimensions = (starting_x_direction_index:ending_x_direction_index,1:vertical_dimension_for_fast_physics_plus_one,starting_y_direction_index:ending_y_direction_index) + dimensions = (starting_x_direction_index_alloc2:ending_x_direction_index_alloc2,1:vertical_dimension_for_fast_physics_plus_one,starting_y_direction_index_alloc2:ending_y_direction_index_alloc2) type = real kind = kind_dyn [phis] standard_name = surface_geopotential_at_Lagrangian_surface long_name = surface geopotential at Lagrangian surface units = m2 s-2 - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1) type = real kind = kind_dyn [pkz] standard_name = finite_volume_mean_edge_pressure_raised_to_the_power_of_kappa long_name = finite-volume mean edge pressure raised to the power of kappa units = 1 - dimensions = (starting_x_direction_index:ending_x_direction_index,starting_y_direction_index:ending_y_direction_index,1:vertical_dimension_for_fast_physics) + dimensions = (starting_x_direction_index_alloc2:ending_x_direction_index_alloc2,starting_y_direction_index_alloc2:ending_y_direction_index_alloc2,1:vertical_dimension_for_fast_physics) type = real kind = kind_dyn [pt] standard_name = virtual_temperature_at_Lagrangian_surface long_name = virtual temperature at Lagrangian surface units = K - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics) type = real kind = kind_dyn [qvi] standard_name = gas_tracers_for_multi_gas_physics_at_Lagrangian_surface long_name = gas tracers for multi gas physics at Lagrangian surface units = kg kg-1 - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics,0:number_of_gases_for_multi_gases_physics) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics,1:number_of_gases_for_multi_gases_physics) type = real kind = kind_dyn active = (number_of_gases_for_multi_gases_physics > 0) @@ -3085,56 +3133,56 @@ standard_name = water_vapor_specific_humidity_at_Lagrangian_surface long_name = water vapor specific humidity updated by fast physics at Lagrangian surface units = kg kg-1 - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics) type = real kind = kind_dyn [ql] standard_name = cloud_liquid_water_specific_humidity_at_Lagrangian_surface long_name = cloud liquid water specific humidity updated by fast physics at Lagrangian surface units = kg kg-1 - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics) type = real kind = kind_dyn [qi] standard_name = cloud_ice_specific_humidity_at_Lagrangian_surface long_name = cloud ice specific humidity updated by fast physics at Lagrangian surface units = kg kg-1 - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics) type = real kind = kind_dyn [qr] standard_name = cloud_rain_specific_humidity_at_Lagrangian_surface long_name = cloud rain specific humidity updated by fast physics at Lagrangian surface units = kg kg-1 - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics) type = real kind = kind_dyn [qs] standard_name = cloud_snow_specific_humidity_at_Lagrangian_surface long_name = cloud snow specific humidity updated by fast physics at Lagrangian surface units = kg kg-1 - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics) type = real kind = kind_dyn [qg] standard_name = cloud_graupel_specific_humidity_at_Lagrangian_surface long_name = cloud graupel specific humidity updated by fast physics at Lagrangian surface units = kg kg-1 - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics) type = real kind = kind_dyn [qc] standard_name = cloud_fraction_at_Lagrangian_surface long_name = cloud fraction at Lagrangian surface units = none - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics) type = real kind = kind_dyn [q_con] standard_name = cloud_condensed_water_specific_humidity_at_Lagrangian_surface long_name = cloud condensed water specific humidity updated by fast physics at Lagrangian surface units = kg kg-1 - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_condensed_water_at_Lagrangian_surface) + dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_condensed_water_at_Lagrangian_surface) type = real kind = kind_dyn [nthreads] diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index a15b053d0..31f48bf5d 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -2746,12 +2746,13 @@ subroutine sfcprop_create (Sfcprop, IM, Model) ! end if - allocate (Sfcprop%rmol (IM )) - allocate (Sfcprop%flhc (IM )) - allocate (Sfcprop%flqc (IM )) - Sfcprop%rmol = clear_val - Sfcprop%flhc = clear_val - Sfcprop%flqc = clear_val + allocate (Sfcprop%rmol (IM )) + allocate (Sfcprop%flhc (IM )) + allocate (Sfcprop%flqc (IM )) + Sfcprop%rmol = clear_val + Sfcprop%flhc = clear_val + Sfcprop%flqc = clear_val + if (Model%do_mynnsfclay) then ! For MYNN surface layer scheme !print*,"Allocating all MYNN-sfclay variables" diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 0986bdf41..5ac00e403 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -992,7 +992,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme) [fire_heat_flux] standard_name = surface_fire_heat_flux long_name = heat flux of fire at the surface @@ -1179,7 +1178,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection) + active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection) [conv_act] standard_name = consecutive_calls_for_grell_freitas_convection long_name = Memory counter for GF @@ -1943,7 +1942,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_surface_layer_scheme) [flhc] standard_name = surface_exchange_coefficient_for_heat long_name = surface exchange coefficient for heat @@ -1951,7 +1949,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_surface_layer_scheme) [flqc] standard_name = surface_exchange_coefficient_for_moisture long_name = surface exchange coefficient for moisture @@ -1959,7 +1956,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_surface_layer_scheme) [chs2] standard_name = surface_exchange_coefficient_for_heat_at_2m long_name = exchange coefficient for heat at 2 meters @@ -2763,7 +2759,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_ocean_wave_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_ocean_wave_coupling) [v10mi_cpl] standard_name = y_wind_at_10m_for_coupling long_name = instantaneous V10m @@ -2771,7 +2767,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_ocean_wave_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_ocean_wave_coupling) [tsfci_cpl] standard_name = surface_skin_temperature_for_coupling long_name = instantaneous sfc temperature @@ -2779,7 +2775,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_chemistry_coupling .or. flag_for_land_coupling) [psurfi_cpl] standard_name = surface_air_pressure_for_coupling long_name = instantaneous sfc pressure @@ -3379,7 +3375,6 @@ dimensions = (number_of_lines_in_internal_namelist) type = character kind = len=256 - active = (number_of_lines_in_internal_namelist > 0) [logunit] standard_name = iounit_of_log long_name = fortran unit number for logfile @@ -6721,14 +6716,12 @@ units = flag dimensions = () type = logical - active = (do_smoke_coupling) [enh_mix] standard_name = do_planetary_boundary_layer_fire_enhancement long_name = flag for rrfs smoke mynn enh vermix units = flag dimensions = () type = logical - active = (do_smoke_coupling) [smoke_dir_fdb_coef] standard_name = smoke_dust_direct_fdb_coef long_name = smoke dust direct feedback coefficents @@ -6736,7 +6729,6 @@ dimensions = (7) type = real kind = kind_phys - active = (do_smoke_coupling) [smoke_conv_wet_coef] standard_name = smoke_dust_conv_wet_coef long_name = smoke dust convetive wet scavanging coefficents @@ -6744,7 +6736,6 @@ dimensions = (3) type = real kind = kind_phys - active = (do_smoke_coupling) [dust_moist_correction] standard_name = dust_moist_correction_fengsha_dust_scheme long_name = moisture correction term for fengsha dust emission @@ -6752,7 +6743,6 @@ dimensions = () type = real kind = kind_phys - active = (do_smoke_coupling) [dust_drylimit_factor] standard_name = dust_drylimit_factor_fengsha_dust_scheme long_name = moisture correction term for drylimit in fengsha dust emission @@ -6760,14 +6750,12 @@ dimensions = () type = real kind = kind_phys - active = (do_smoke_coupling) [dust_moist_opt] standard_name = control_for_dust_soil_moisture_option long_name = smoke dust moisture parameterization 1 - fecan 2 - shao units = index dimensions = () type = integer - active = (do_smoke_coupling) [dust_alpha] standard_name = alpha_fengsha_dust_scheme long_name = alpha paramter for fengsha dust scheme @@ -6775,7 +6763,6 @@ dimensions = () type = real kind = kind_phys - active = (do_smoke_coupling) [dust_gamma] standard_name = gamma_fengsha_dust_scheme long_name = gamma paramter for fengsha dust scheme @@ -6783,7 +6770,6 @@ dimensions = () type = real kind = kind_phys - active = (do_smoke_coupling) [wetdep_ls_alpha] standard_name = alpha_for_ls_wet_depoistion long_name = alpha paramter for ls wet deposition @@ -6791,126 +6777,108 @@ dimensions = () type = real kind = kind_phys - active = (do_smoke_coupling) [ebb_dcycle] standard_name = control_for_diurnal_cycle_of_biomass_burning_emissions long_name = rrfs smoke diurnal cycle option units = index dimensions = () type = integer - active = (do_smoke_coupling) [seas_opt] standard_name = control_for_smoke_sea_salt long_name = rrfs smoke sea salt emission option units = index dimensions = () type = integer - active = (do_smoke_coupling) [dust_opt] standard_name = control_for_smoke_dust long_name = rrfs smoke dust chem option units = index dimensions = () type = integer - active = (do_smoke_coupling) [drydep_opt] standard_name = control_for_smoke_dry_deposition long_name = rrfs smoke dry deposition option units = index dimensions = () type = integer - active = (do_smoke_coupling) [coarsepm_settling] standard_name = control_for_smoke_pm_settling long_name = rrfs smoke coarsepm settling option units = index dimensions = () type = integer - active = (do_smoke_coupling) [plume_wind_eff] standard_name = option_for_wind_effects_on_smoke_plumerise long_name = wind effect plumerise option units = index dimensions = () type = integer - active = (do_smoke_coupling) [extended_sd_diags] standard_name = flag_for_extended_smoke_dust_diagnostics long_name = flag for extended smoke dust diagnostics units = flag dimensions = () type = logical - active = (do_smoke_coupling) [wetdep_ls_opt] standard_name = control_for_smoke_wet_deposition long_name = rrfs smoke large scale wet deposition option units = index dimensions = () type = integer - active = (do_smoke_coupling) [do_plumerise] standard_name = do_smoke_plumerise long_name = rrfs smoke plumerise option units = index dimensions = () type = logical - active = (do_smoke_coupling) [plumerisefire_frq] standard_name = smoke_plumerise_frequency long_name = rrfs smoke add smoke option units = min dimensions = () type = integer - active = (do_smoke_coupling) [n_dbg_lines] standard_name = smoke_debug_lines long_name = rrfs smoke add smoke option units = index dimensions = () type = integer - active = (do_smoke_coupling) [addsmoke_flag] standard_name = control_for_smoke_biomass_burning_emissions long_name = rrfs smoke add smoke option units = index dimensions = () type = integer - active = (do_smoke_coupling) [smoke_forecast] standard_name = do_smoke_forecast long_name = index for rrfs smoke forecast units = index dimensions = () type = integer - active = (do_smoke_coupling) [aero_ind_fdb] standard_name = do_smoke_aerosol_indirect_feedback long_name = flag for wfa ifa emission indirect feedback units = flag dimensions = () type = logical - active = (do_smoke_coupling) [aero_dir_fdb] standard_name = do_smoke_aerosol_direct_feedback long_name = flag for smoke and dust radiation feedback units = flag dimensions = () type = logical - active = (do_smoke_coupling) [rrfs_smoke_debug] standard_name = do_smoke_debug long_name = flag for rrfs smoke plumerise debug units = flag dimensions = () type = logical - active = (do_smoke_coupling) [do_smoke_transport] standard_name = do_smoke_conv_transport long_name = flag for rrfs smoke convective transport units = flag dimensions = () type = logical - active = (do_smoke_coupling) [ncnvcld3d] standard_name = number_of_convective_cloud_variables_in_xyz_dimensioned_restart_array long_name = number of convective 3d clouds fields diff --git a/ccpp/driver/CCPP_driver.F90 b/ccpp/driver/CCPP_driver.F90 index ec36e2ad3..8e4c019b3 100644 --- a/ccpp/driver/CCPP_driver.F90 +++ b/ccpp/driver/CCPP_driver.F90 @@ -85,6 +85,7 @@ subroutine CCPP_step (step, nblks, ierr) ! number are not used; set to safe values cdata_domain%blk_no = 1 cdata_domain%thrd_no = 1 + cdata_domain%thrd_cnt = 1 ! Allocate cdata structures for blocks and threads if (.not.allocated(cdata_block)) allocate(cdata_block(1:nblks,1:nthrdsX)) @@ -95,6 +96,7 @@ subroutine CCPP_step (step, nblks, ierr) ! Assign the correct block and thread numbers cdata_block(nb,nt)%blk_no = nb cdata_block(nb,nt)%thrd_no = nt + cdata_block(nb,nt)%thrd_cnt = nthrdsX end do end do @@ -166,9 +168,11 @@ subroutine CCPP_step (step, nblks, ierr) ! because threads are used on the host model side for blocking GFS_control%nthreads = 1 -!$OMP parallel num_threads (nthrds) & -!$OMP default (shared) & -!$OMP private (nb,nt,ntX,ierr2) & +!$OMP parallel num_threads (nthrds) & +!$OMP default (none) & +!$OMP shared (nblks, nthrdsX, non_uniform_blocks, & +!$OMP cdata_block,ccpp_suite, step) & +!$OMP private (nb,nt,ntX,ierr2) & !$OMP reduction (+:ierr) #ifdef _OPENMP nt = omp_get_thread_num()+1 diff --git a/ccpp/framework b/ccpp/framework index 741212e49..ccfefcd0b 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit 741212e4962d371520f773e2be9481142f79635e +Subproject commit ccfefcd0b426e011f94137031d5f7c2a4dda2659 diff --git a/ccpp/physics b/ccpp/physics index 89ddce75d..16a1d8817 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 89ddce75d4d64252f1871c095a362ad391065b89 +Subproject commit 16a1d881774d795f46db16017aeed7fc351d661a diff --git a/stochastic_physics/stochastic_physics_wrapper.F90 b/stochastic_physics/stochastic_physics_wrapper.F90 index b76c52a39..842495569 100644 --- a/stochastic_physics/stochastic_physics_wrapper.F90 +++ b/stochastic_physics/stochastic_physics_wrapper.F90 @@ -282,6 +282,7 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr) endif select case (trim(GFS_Control%lndp_var_list(v))) + ! DH* is this correct? shouldn't this be slc ? case('smc') ! stype used to fetch soil params stype(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%stype(1:GFS_Control%blksz(nb))