Skip to content

Commit d136551

Browse files
committed
Merge branch 'bartgol/eamxx/fix-avg-count-bug' into next (PR #7533)
This bug was somehow causing ERS/ERP fails, since avg count vars were full of zeros in restart files. [BFB] except for the avg count vars data type in EAMxx output
2 parents 88f4372 + c716dea commit d136551

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

components/eamxx/src/share/io/scorpio_output.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,6 @@ register_variables(const std::string& filename,
725725
}
726726

727727
// Now register the average count variables (if any)
728-
std::string unitless = "unitless";
729728
for (const auto& f : m_avg_counts) {
730729
const auto& name = f.name();
731730
const auto& dimnames = m_vars_dims.at(name);
@@ -742,12 +741,6 @@ register_variables(const std::string& filename,
742741
" - varname : " + name + "\n"
743742
" - var dims : " + ekat::join(dimnames,",") + "\n"
744743
" - var dims from file: " + ekat::join(var.dim_names(),",") + "\n");
745-
EKAT_REQUIRE_MSG (var.units==unitless,
746-
"Error! Cannot append, due to variable units mismatch.\n"
747-
" - filename : " + filename + "\n"
748-
" - varname : " + name + "\n"
749-
" - var units: " + unitless + "\n"
750-
" - var units from file: " + var.units + "\n");
751744
EKAT_REQUIRE_MSG (var.time_dep==m_add_time_dim,
752745
"Error! Cannot append, due to time dependency mismatch.\n"
753746
" - filename : " + filename + "\n"
@@ -758,8 +751,7 @@ register_variables(const std::string& filename,
758751
// Note, unlike with regular output variables, for the average counting
759752
// variables we don't need to add all of the extra metadata. So we simply
760753
// define the variable.
761-
scorpio::define_var(filename, name, unitless, dimnames,
762-
"real",fp_precision, m_add_time_dim);
754+
scorpio::define_var(filename, name, dimnames, "int", m_add_time_dim);
763755
}
764756
}
765757
} // register_variables

0 commit comments

Comments
 (0)