Skip to content

Commit

Permalink
EAMxx: always use output control specs for creating the rhist file name
Browse files Browse the repository at this point in the history
This avoid clashing of streams with same prefix, but different freq specs
  • Loading branch information
bartgol committed Sep 9, 2024
1 parent 429d757 commit fe64b7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions components/eamxx/src/share/io/scream_output_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ void OutputManager::run(const util::TimeStamp& timestamp)

// Check if we need to open a new file
if (not filespecs.is_open) {
filespecs.filename = compute_filename (control,filespecs,timestamp);
filespecs.filename = compute_filename (filespecs,timestamp);
// Register all dims/vars, write geometry data (e.g. lat/lon/hyam/hybm)
setup_file(filespecs,control);
}
Expand Down Expand Up @@ -613,11 +613,11 @@ long long OutputManager::res_dep_memory_footprint () const {
}

std::string OutputManager::
compute_filename (const IOControl& control,
const IOFileSpecs& file_specs,
compute_filename (const IOFileSpecs& file_specs,
const util::TimeStamp& timestamp) const
{
auto filename = m_filename_prefix + file_specs.suffix();
const auto& control = m_output_control;

// Always add avg type and frequency info
filename += "." + e2str(m_avg_type);
Expand Down
3 changes: 1 addition & 2 deletions components/eamxx/src/share/io/scream_output_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ class OutputManager
long long res_dep_memory_footprint () const;
protected:

std::string compute_filename (const IOControl& control,
const IOFileSpecs& file_specs,
std::string compute_filename (const IOFileSpecs& file_specs,
const util::TimeStamp& timestamp) const;

void set_file_header(const IOFileSpecs& file_specs);
Expand Down

0 comments on commit fe64b7f

Please sign in to comment.