@@ -232,7 +232,7 @@ void SurfaceCouplingExporter::initialize_impl (const RunType /* run_type */)
232232 bool do_export_from_file = are_fields_present and are_files_present;
233233 if (do_export_from_file) {
234234 // Construct a time interpolation object
235- m_time_interp = util::TimeInterpolation (m_grid,export_from_file_names);
235+ auto time_interp = util::TimeInterpolation (m_grid,export_from_file_names);
236236 for (auto fname : export_from_file_fields) {
237237 // Find the index for this field in the list of export fields.
238238 auto v_loc = std::find (m_export_field_names_vector.begin (),m_export_field_names_vector.end (),fname);
@@ -244,9 +244,10 @@ void SurfaceCouplingExporter::initialize_impl (const RunType /* run_type */)
244244 --m_num_from_model_exports;
245245 auto & f_helper = m_helper_fields.at (fname);
246246 // We want to add the field as a deep copy so that the helper_fields are automatically updated.
247- m_time_interp .add_field (f_helper, true );
247+ time_interp .add_field (f_helper, true );
248248 m_export_from_file_field_names.push_back (fname);
249249 }
250+ m_time_interp = time_interp;
250251 m_time_interp.initialize_data_from_files ();
251252 }
252253 }
@@ -544,7 +545,7 @@ void SurfaceCouplingExporter::do_export_to_cpl(const bool called_during_initiali
544545// =========================================================================================
545546void SurfaceCouplingExporter::finalize_impl ()
546547{
547-
548+ // Nothing to do
548549}
549550// =========================================================================================
550551} // namespace scream
0 commit comments