Skip to content

Commit 6ad603e

Browse files
committed
add descriptor box for IC fields
1 parent 4b74b9f commit 6ad603e

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

components/eamxx/src/share/atm_process/atmosphere_process_dag.cpp

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ void AtmProcDAG::write_dag (const std::string& fname, const int verbosity) const
183183
ofile << "strict digraph G {\n"
184184
<< "rankdir=\"LR\"\n";
185185

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

@@ -268,10 +269,11 @@ void AtmProcDAG::write_dag (const std::string& fname, const int verbosity) const
268269
}
269270
fc += "\"> ";
270271
ofile << " <tr><td align=\"left\">" << fc << html_fix(print_fid(m_fids[fid],fid_verb));
271-
if (ekat::contains(m_unmet_deps.at(n.id), fid)) {
272+
if (ekat::contains(unmet, fid)) {
272273
ofile << "<b> *** MISSING ***</b>";
273-
} else if (ekat::contains(m_unmet_deps.at(n.id), -fid)) {
274+
} else if (ekat::contains(unmet, -fid)) {
274275
ofile << "<b> (Init. Cond.)</b>";
276+
has_IC_field = true;
275277
}
276278
ofile << "</font></td></tr>\n";
277279
}
@@ -339,7 +341,7 @@ void AtmProcDAG::write_dag (const std::string& fname, const int verbosity) const
339341
fc += (ekat::contains(unmet,gr_fid) ? "red" : "black");
340342
fc += "\"> ";
341343
ofile << " <tr><td align=\"left\">" << fc << html_fix(print_fid(m_fids[gr_fid],fid_verb));
342-
if (ekat::contains(m_unmet_deps.at(n.id),gr_fid)) {
344+
if (ekat::contains(unmet, gr_fid)) {
343345
ofile << "<b> *** MISSING ***</b>";
344346
}
345347
ofile << "</font></td></tr>\n";
@@ -407,6 +409,24 @@ void AtmProcDAG::write_dag (const std::string& fname, const int verbosity) const
407409
<< "];\n";
408410
}
409411

412+
if (m_IC_processed && has_IC_field) {
413+
int this_node_id = m_nodes.size() + 1;
414+
ofile << this_node_id << " [\n"
415+
<< " shape=box\n"
416+
<< " color=\"#605d57\"\n"
417+
<< " fontcolor=\"#031576\"\n"
418+
<< " penwidth=8\n"
419+
<< " fontsize=40\n"
420+
<< " style=filled\n"
421+
<< " fillcolor=\"#cccccc\"\n"
422+
<< " align=\"center\"\n"
423+
<< " label=<<b><font color=\"#3d2906\">NOTE:</font> Fields denoted "
424+
"with <font color=\"#006219\"><b>green text</b></font> "
425+
"<br align=\"center\"/>indicate the field was provided by the "
426+
"<br align=\"center\"/>initial conditions and never updated</b>>\n"
427+
<< "];\n";
428+
}
429+
410430
// Close the file
411431
ofile << "}";
412432
ofile.close();

0 commit comments

Comments
 (0)