Skip to content

Commit

Permalink
add descriptor box for IC fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mjs271 committed Nov 21, 2024
1 parent 2e6e29e commit cf476bb
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions components/eamxx/src/share/atm_process/atmosphere_process_dag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ void AtmProcDAG::write_dag (const std::string& fname, const int verbosity) const
ofile << "strict digraph G {\n"
<< "rankdir=\"LR\"\n";

bool has_IC_field = false;
for (const auto& n : m_nodes) {
const auto& unmet = m_unmet_deps.at(n.id);

Expand Down Expand Up @@ -268,10 +269,11 @@ void AtmProcDAG::write_dag (const std::string& fname, const int verbosity) const
}
fc += "\"> ";
ofile << " <tr><td align=\"left\">" << fc << html_fix(print_fid(m_fids[fid],fid_verb));
if (ekat::contains(m_unmet_deps.at(n.id), fid)) {
if (ekat::contains(unmet, fid)) {
ofile << "<b> *** MISSING ***</b>";
} else if (ekat::contains(m_unmet_deps.at(n.id), -fid)) {
} else if (ekat::contains(unmet, -fid)) {
ofile << "<b> (Init. Cond.)</b>";
has_IC_field = true;
}
ofile << "</font></td></tr>\n";
}
Expand Down Expand Up @@ -339,7 +341,7 @@ void AtmProcDAG::write_dag (const std::string& fname, const int verbosity) const
fc += (ekat::contains(unmet,gr_fid) ? "red" : "black");
fc += "\"> ";
ofile << " <tr><td align=\"left\">" << fc << html_fix(print_fid(m_fids[gr_fid],fid_verb));
if (ekat::contains(m_unmet_deps.at(n.id),gr_fid)) {
if (ekat::contains(unmet, gr_fid)) {
ofile << "<b> *** MISSING ***</b>";
}
ofile << "</font></td></tr>\n";
Expand Down Expand Up @@ -407,6 +409,24 @@ void AtmProcDAG::write_dag (const std::string& fname, const int verbosity) const
<< "];\n";
}

if (m_IC_processed && has_IC_field) {
int this_node_id = m_nodes.size() + 1;
ofile << this_node_id << " [\n"
<< " shape=box\n"
<< " color=\"#605d57\"\n"
<< " fontcolor=\"#031576\"\n"
<< " penwidth=8\n"
<< " fontsize=40\n"
<< " style=filled\n"
<< " fillcolor=\"#cccccc\"\n"
<< " align=\"center\"\n"
<< " label=<<b><font color=\"#3d2906\">NOTE:</font> Fields denoted "
"with <font color=\"#006219\"><b>green text</b></font> "
"<br align=\"center\"/>indicate the field was provided by the "
"<br align=\"center\"/>initial conditions and never updated</b>>\n"
<< "];\n";
}

// Close the file
ofile << "}";
ofile.close();
Expand Down

0 comments on commit cf476bb

Please sign in to comment.