Skip to content

Commit 934ad12

Browse files
committed
EAMxx: Removing changes in the RRTMGP interface. It was decided not to couple O3 from the chemistry model.
1 parent 1bb6efb commit 934ad12

File tree

2 files changed

+1
-55
lines changed

2 files changed

+1
-55
lines changed

components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.cpp

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ RRTMGPRadiation (const ekat::Comm& comm, const ekat::ParameterList& params)
8282

8383
// Determine rad timestep, specified as number of atm steps
8484
m_rad_freq_in_steps = m_params.get<Int>("rad_frequency", 1);
85-
// use ozone computed by a chemistry model, e.g., mam4xx
86-
m_prognostic_ozone =m_params.get<bool>("prognostic_ozone",false);
87-
8885
}
8986

9087
void RRTMGPRadiation::set_grids(const std::shared_ptr<const GridsManager> grids_manager) {
@@ -303,11 +300,6 @@ void RRTMGPRadiation::set_grids(const std::shared_ptr<const GridsManager> grids_
303300
m_grid->set_geometry_data(bands);
304301
}
305302
}
306-
// O3 from chemistry model
307-
if (m_prognostic_ozone)
308-
{
309-
add_field<Required>("O3", scalar3d_mid, mol/mol, grid_name);
310-
}
311303
} // RRTMGPRadiation::set_grids
312304

313305
size_t RRTMGPRadiation::requested_buffer_size_in_bytes() const
@@ -391,9 +383,6 @@ void RRTMGPRadiation::init_buffers(const ATMBufferManager &buffer_manager)
391383
mem += m_buffer.d_tint.size();
392384
m_buffer.d_dz = decltype(m_buffer.d_dz)(mem, m_col_chunk_size, m_nlay);
393385
mem += m_buffer.d_dz.size();
394-
//
395-
m_buffer.o3_prog = decltype(m_buffer.o3_prog)(mem, m_col_chunk_size, m_nlay);
396-
mem += m_buffer.o3_prog.size();
397386
// 3d arrays
398387
m_buffer.sw_flux_up_k = decltype(m_buffer.sw_flux_up_k)(mem, m_col_chunk_size, m_nlay+1);
399388
mem += m_buffer.sw_flux_up_k.size();
@@ -560,19 +549,6 @@ void RRTMGPRadiation::initialize_impl(const RunType run_type) {
560549

561550
m_force_run_on_next_step = run_type==RunType::Initial or
562551
m_params.get("force_run_after_restart",false);
563-
564-
// If m_prognostic_ozone is true, we should not use O3 as it is currently employed in RRTMGP.
565-
if (m_prognostic_ozone)
566-
{
567-
for (int igas = 0; igas < m_ngas; igas++) {
568-
auto name = m_gas_names[igas];
569-
EKAT_REQUIRE_MSG(
570-
m_gas_names[igas] !="o3",
571-
"Error! m_prognostic_ozone is set to true,"
572-
"remove o3 from list of active gases.. \n");
573-
}
574-
}
575-
576552
}
577553

578554
// =========================================================================================
@@ -979,28 +955,6 @@ void RRTMGPRadiation::run_impl (const double dt) {
979955
m_gas_concs_k.set_vmr(name, tmp2d_k);
980956
}
981957

982-
if (m_prognostic_ozone)
983-
{
984-
auto o3_dry_vmr = m_buffer.o3_prog;
985-
// get O3 from FM, here we assume that O3 is wet_mmr
986-
auto o3_wet_mmr = get_field_out("O3").get_view<Real**>();
987-
const Real O3_molecular_weigth= PC::get_gas_mol_weight("o3");
988-
const auto policy = ekat::ExeSpaceUtils<ExeSpace>::get_default_team_policy(ncol, m_nlay);
989-
const int nlev_local = m_nlay;
990-
Kokkos::parallel_for(policy, KOKKOS_LAMBDA(const MemberType& team) {
991-
const int icol = team.league_rank();
992-
Kokkos::parallel_for(Kokkos::TeamVectorRange(team, nlev_local), [&] (const int& k) {
993-
// from wet to dry
994-
const Real o3_dry_mmr = PF::calculate_drymmr_from_wetmmr(o3_wet_mmr(icol,k),d_qv(icol,k));
995-
// Question: Do I need to use qv_dry?
996-
// from mmr to vmr
997-
o3_dry_vmr(icol,k) = PF::calculate_vmr_from_mmr(O3_molecular_weigth,
998-
d_qv(icol,k),o3_dry_mmr);
999-
});
1000-
});
1001-
m_gas_concs_k.set_vmr("o3", o3_dry_vmr);
1002-
}
1003-
1004958
// Set layer cloud fraction.
1005959
//
1006960
// If not doing subcolumn sampling for mcica, we want to make sure we use grid-mean

components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.hpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class RRTMGPRadiation : public AtmosphereProcess {
133133
// Structure for storing local variables initialized using the ATMBufferManager
134134
struct Buffer {
135135
static constexpr int num_1d_ncol = 8;
136-
static constexpr int num_2d_nlay = 17;
136+
static constexpr int num_2d_nlay = 16;
137137
static constexpr int num_2d_nlay_p1 = 23;
138138
static constexpr int num_2d_nswbands = 2;
139139
static constexpr int num_3d_nlev_nswbands = 4;
@@ -171,10 +171,6 @@ class RRTMGPRadiation : public AtmosphereProcess {
171171
ureal2dk sw_heating_k;
172172
ureal2dk lw_heating_k;
173173

174-
// ozone prog
175-
ureal2dk o3_prog;
176-
177-
178174
// 2d size (ncol, nlay+1)
179175
ureal2dk d_tint;
180176
ureal2dk p_lev_k;
@@ -244,10 +240,6 @@ class RRTMGPRadiation : public AtmosphereProcess {
244240
Buffer m_buffer;
245241

246242
bool m_force_run_on_next_step = false;
247-
// use a ozone prognostic variable computed by chemistry
248-
bool m_prognostic_ozone = false;
249-
250-
251243
}; // class RRTMGPRadiation
252244

253245
} // namespace scream

0 commit comments

Comments
 (0)