diff --git a/components/eamxx/cime_config/namelist_defaults_scream.xml b/components/eamxx/cime_config/namelist_defaults_scream.xml index e82ed0452074..ce75cf70f6ab 100644 --- a/components/eamxx/cime_config/namelist_defaults_scream.xml +++ b/components/eamxx/cime_config/namelist_defaults_scream.xml @@ -192,7 +192,7 @@ be lost if SCREAM_HACK_XML is not enabled. true - true + false false true false diff --git a/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp b/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp index d38e92e7a55d..c2e6a488fbf8 100644 --- a/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp +++ b/components/eamxx/src/physics/p3/disp/p3_main_impl_disp.cpp @@ -257,7 +257,7 @@ ::p3_main_internal_disp( p3_main_part2_disp( nj, nk, runtime_options.max_total_ni, infrastructure.predictNc, infrastructure.prescribedCCN, infrastructure.dt, inv_dt, - infrastructure.use_hetfrz_classnuc, hetfrz_immersion_nucleation_tend, hetfrz_contact_nucleation_tend, hetfrz_deposition_nucleation_tend, + runtime_options.use_hetfrz_classnuc, hetfrz_immersion_nucleation_tend, hetfrz_contact_nucleation_tend, hetfrz_deposition_nucleation_tend, lookup_tables.dnu_table_vals, lookup_tables.ice_table_vals, lookup_tables.collect_table_vals, lookup_tables.revap_table_vals, pres, dpres, dz, nc_nuceat_tend, inv_exner, exner, inv_cld_frac_l, inv_cld_frac_i, inv_cld_frac_r, ni_activated, inv_qc_relvar, cld_frac_i, diff --git a/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp b/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp index 3ecfc61b01e7..47bce1e9a459 100644 --- a/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp +++ b/components/eamxx/src/physics/p3/eamxx_p3_process_interface.cpp @@ -44,7 +44,6 @@ void P3Microphysics::set_grids(const std::shared_ptr grids_m infrastructure.kte = m_num_levs-1; infrastructure.predictNc = m_params.get("do_predict_nc",true); infrastructure.prescribedCCN = m_params.get("do_prescribed_ccn",true); - infrastructure.use_hetfrz_classnuc = m_params.get("use_hetfrz_classnuc",true); // Define the different field layouts that will be used for this process using namespace ShortFieldTagsNames; diff --git a/components/eamxx/src/physics/p3/impl/p3_CNT_couple_impl.hpp b/components/eamxx/src/physics/p3/impl/p3_CNT_couple_impl.hpp index 05c364767c42..0c10dbf2a5f2 100644 --- a/components/eamxx/src/physics/p3/impl/p3_CNT_couple_impl.hpp +++ b/components/eamxx/src/physics/p3/impl/p3_CNT_couple_impl.hpp @@ -23,8 +23,12 @@ ::CNT_couple( { constexpr Scalar pi = C::Pi; constexpr Scalar rho_h2o = C::RHO_H2O; - constexpr Scalar qsmall = 1.0e-18; // BAD_CONSTANT! + + // TODO: Verify if qsmall can be unified with other "small" numeric literals + constexpr Scalar qsmall = 1.0e-18; constexpr Scalar piov3 = pi/3.0; + + // TODO: Verify if 1.0e-18 can be unified with other "small" numeric literals constexpr Scalar mi0 = 4.0*piov3*900.0*1.0e-18; // BAD_CONSTANT! const Spack Zero(0.0); @@ -48,6 +52,7 @@ ::CNT_couple( qinuc_cnt.set(mask, ninuc_cnt*mi0, Zero); break; default: + EKAT_KERNEL_ERROR_MSG("Error! Unhandled case in switch statement for Iflag in p3_CNT_couple_impl.hpp .\n"); break; } } diff --git a/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp b/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp index 5194f3ceb0e8..745fbf523b8d 100644 --- a/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp +++ b/components/eamxx/src/physics/p3/impl/p3_main_impl.hpp @@ -248,7 +248,7 @@ ::p3_main_internal( p3_main_part2( team, nk_pack, runtime_options.max_total_ni, infrastructure.predictNc, infrastructure.prescribedCCN, infrastructure.dt, inv_dt, - infrastructure.use_hetfrz_classnuc, ohetfrz_immersion_nucleation_tend, ohetfrz_contact_nucleation_tend, ohetfrz_deposition_nucleation_tend, + runtime_options.use_hetfrz_classnuc, ohetfrz_immersion_nucleation_tend, ohetfrz_contact_nucleation_tend, ohetfrz_deposition_nucleation_tend, lookup_tables.dnu_table_vals, lookup_tables.ice_table_vals, lookup_tables.collect_table_vals, lookup_tables.revap_table_vals, opres, odpres, odz, onc_nuceat_tend, oinv_exner, exner, inv_cld_frac_l, inv_cld_frac_i, inv_cld_frac_r, oni_activated, oinv_qc_relvar, ocld_frac_i, ocld_frac_l, ocld_frac_r, oqv_prev, ot_prev, T_atm, rho, inv_rho, qv_sat_l, qv_sat_i, qv_supersat_i, rhofacr, rhofaci, acn, diff --git a/components/eamxx/src/physics/p3/p3_functions.hpp b/components/eamxx/src/physics/p3/p3_functions.hpp index afdd55901908..d4f3cc62b455 100644 --- a/components/eamxx/src/physics/p3/p3_functions.hpp +++ b/components/eamxx/src/physics/p3/p3_functions.hpp @@ -134,6 +134,7 @@ struct Functions bool set_cld_frac_l_to_one = false; bool set_cld_frac_i_to_one = false; bool set_cld_frac_r_to_one = false; + bool use_hetfrz_classnuc = false; // Set to true to use het frz from MAM4xx-ACI void load_runtime_options_from_file(ekat::ParameterList& params) { max_total_ni = params.get("max_total_ni", max_total_ni); @@ -159,6 +160,7 @@ struct Functions set_cld_frac_l_to_one = params.get("set_cld_frac_l_to_one", set_cld_frac_l_to_one); set_cld_frac_i_to_one = params.get("set_cld_frac_i_to_one", set_cld_frac_i_to_one); set_cld_frac_r_to_one = params.get("set_cld_frac_r_to_one", set_cld_frac_r_to_one); + use_hetfrz_classnuc = params.get("use_hetfrz_classnuc", use_hetfrz_classnuc); } }; @@ -271,8 +273,6 @@ struct Functions bool predictNc; // Set to true to use prescribed CCN bool prescribedCCN; - // Set to true to use het frz from MAM4xx-ACI - bool use_hetfrz_classnuc; // Coordinates of columns, nj x 3 view_2d col_location; }; diff --git a/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp b/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp index 7b8b6569a44c..9d7fcbec3f60 100644 --- a/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp +++ b/components/eamxx/src/physics/p3/tests/infra/p3_test_data.cpp @@ -1373,7 +1373,7 @@ Int p3_main_host( precip_ice_surf_d, diag_eff_radius_qc_d, diag_eff_radius_qi_d, diag_eff_radius_qr_d, rho_qi_d,precip_liq_flux_d, precip_ice_flux_d, precip_total_tend_d, nevapr_d}; P3F::P3Infrastructure infrastructure{dt, it, its, ite, kts, kte, - do_predict_nc, do_prescribed_CCN, use_hetfrz_classnuc, col_location_d}; + do_predict_nc, do_prescribed_CCN, col_location_d}; P3F::P3HistoryOnly history_only{liq_ice_exchange_d, vap_liq_exchange_d, vap_ice_exchange_d};