@@ -264,11 +264,13 @@ void AtmosphereProcess::setup_step_tendencies () {
264264
265265 auto f = gn==" UNSET" ? get_field_out (fn) : get_field_out (fn,gn);
266266
267- const auto & tname = this ->name () + " _" + tn + " _tend" ;
267+ const auto & tname = this ->name () + " _" + fn + " _tend" ;
268+
269+ const auto fn_gn = fn + " @" + f.get_header ().get_identifier ().get_grid_name ();
268270
269271 // Create tend and start-of-step fields
270- auto & tend = m_proc_tendencies[fn ] = f.clone (tname);
271- m_start_of_step_fields[fn ] = f.clone ();
272+ auto & tend = m_proc_tendencies[fn_gn ] = f.clone (tname);
273+ m_start_of_step_fields[fn_gn ] = f.clone ();
272274 add_internal_field (tend,{" ACCUMULATED" ," DIVIDE_BY_DT" });
273275 }
274276}
@@ -515,10 +517,10 @@ void AtmosphereProcess::init_step_tendencies () {
515517 }
516518
517519 start_timer (m_timer_prefix + this ->name () + " ::compute_tendencies" );
518- for (auto & it : m_start_of_step_fields) {
519- const auto & fname = it. first ;
520- const auto & f = get_field_out (fname) ;
521- auto & f_beg = it. second ;
520+ for (auto & [fn_gn,f_beg] : m_start_of_step_fields) {
521+ const auto fname = ekat::split (fn_gn, " @ " )[ 0 ] ;
522+ const auto gname = ekat::split (fn_gn, " @ " )[ 1 ] ;
523+ const auto & f = get_field_out (fname,gname) ;
522524 f_beg.deep_copy (f);
523525 }
524526 stop_timer (m_timer_prefix + this ->name () + " ::compute_tendencies" );
@@ -531,10 +533,12 @@ void AtmosphereProcess::compute_step_tendencies () {
531533
532534 m_atm_logger->debug (" [" + this ->name () + " ] computing tendencies..." );
533535 start_timer (m_timer_prefix + this ->name () + " ::compute_tendencies" );
534- for (auto & [fname,tend] : m_proc_tendencies) {
536+ for (auto & [fn_gn,tend] : m_proc_tendencies) {
537+ const auto fname = ekat::split (fn_gn," @" )[0 ];
538+ const auto gname = ekat::split (fn_gn," @" )[1 ];
535539 // Note: f_beg is nonconst, so we can store step tendency in it
536- auto & f_beg = m_start_of_step_fields.at (fname );
537- const auto & f_end = get_field_out (fname);
540+ auto & f_beg = m_start_of_step_fields.at (fn_gn );
541+ const auto & f_end = get_field_out (fname,gname );
538542
539543 // Compute tend from this atm proc step, then sum into overall atm timestep tendency
540544 // Note: don't add -f_beg to tend during init_step_tendencies, b/c the field magnitude
0 commit comments