@@ -245,12 +245,10 @@ void AtmosphereDriver::create_atm_processes()
245
245
if (verb_lvl > 0 ) {
246
246
// create an initial DAG with only atm_process nodes
247
247
AtmProcDAG dag;
248
-
249
248
// First, add all atm processes
250
249
dag.init_atm_proc_nodes (*m_atm_process_group);
251
-
252
250
// Write a dot file for visualization
253
- dag.write_dag (" dag_createAtmProcs-nodesOnly .dot" , std::max (verb_lvl, 0 ));
251
+ dag.write_dag (" createProc_dag .dot" , std::max (verb_lvl, 0 ));
254
252
}
255
253
}
256
254
@@ -711,7 +709,7 @@ void AtmosphereDriver::create_fields()
711
709
dag.create_dag (*m_atm_process_group);
712
710
713
711
// Write a dot file for visualization
714
- dag.write_dag (" dag_createFields .dot" ,std::max (verb_lvl,0 ));
712
+ dag.write_dag (" createField_dag .dot" , std::max (verb_lvl,0 ));
715
713
}
716
714
717
715
m_ad_status |= s_fields_created;
@@ -902,15 +900,12 @@ initialize_fields ()
902
900
// generate the full DAG, resolving any spurious unmet dependencies that
903
901
// may be provided by initial conditions
904
902
AtmProcDAG dag;
905
-
906
903
// First, add all atm processes
907
904
dag.create_dag (*m_atm_process_group);
908
-
909
905
// process the initial conditions to maybe fulfill unmet dependencies
910
- dag.process_initial_conditions (m_fields_inited);
911
-
906
+ dag.process_IC_alt (m_fields_inited);
912
907
// Write a dot file for visualization
913
- dag.write_dag (" dag_init_fields-after_IC .dot" ,std::max (verb_lvl,0 ));
908
+ dag.write_dag (" initField_dag .dot" , std::max (verb_lvl,0 ));
914
909
}
915
910
916
911
// Initialize fields
@@ -1134,6 +1129,7 @@ void AtmosphereDriver::set_initial_conditions ()
1134
1129
grid_name == " Point Grid" ) {
1135
1130
this_grid_topo_file_fnames.push_back (" PHIS_d" );
1136
1131
this_grid_topo_eamxx_fnames.push_back (fname);
1132
+ // FIXME:
1137
1133
m_fields_inited[grid_name].push_back (fname);
1138
1134
} else {
1139
1135
EKAT_ERROR_MSG (" Error! Requesting phis on an unknown grid: " + grid_name + " .\n " );
@@ -1146,7 +1142,7 @@ void AtmosphereDriver::set_initial_conditions ()
1146
1142
" topo file only has sgh30 for Physics PG2.\n " );
1147
1143
topography_file_fields_names[grid_name].push_back (" SGH30" );
1148
1144
topography_eamxx_fields_names[grid_name].push_back (fname);
1149
- m_fields_inited[grid_name].push_back (fname);
1145
+ m_fields_inited[grid_name].push_back (fname);
1150
1146
}
1151
1147
} else if (not (fvphyshack and grid_name == " Physics PG2" )) {
1152
1148
// The IC file is written for the GLL grid, so we only load
@@ -1158,7 +1154,7 @@ void AtmosphereDriver::set_initial_conditions ()
1158
1154
// If this field is the parent of other subfields, we only read from file the subfields.
1159
1155
if (not ekat::contains (this_grid_ic_fnames,fname)) {
1160
1156
this_grid_ic_fnames.push_back (fname);
1161
- m_fields_inited[grid_name].push_back (fname);
1157
+ m_fields_inited[grid_name].push_back (fname);
1162
1158
}
1163
1159
} else if (fvphyshack and grid_name == " Physics GLL" ) {
1164
1160
// [CGLL ICs in pg2] I tried doing something like this in
@@ -1175,7 +1171,7 @@ void AtmosphereDriver::set_initial_conditions ()
1175
1171
} else {
1176
1172
this_grid_ic_fnames.push_back (fname);
1177
1173
}
1178
- m_fields_inited[grid_name].push_back (fname);
1174
+ m_fields_inited[grid_name].push_back (fname);
1179
1175
}
1180
1176
}
1181
1177
}
@@ -1239,17 +1235,21 @@ void AtmosphereDriver::set_initial_conditions ()
1239
1235
// lat/lon data in topo file is defined in terms of PG2 grid,
1240
1236
// so if we have a topo field on GLL grid, we need to setup
1241
1237
// io info using the IC file (which is always GLL).
1242
- for (const auto & it : m_field_mgrs) {
1243
- const auto & grid_name = it.first ;
1238
+ for (const auto & it : m_field_mgrs) {
1239
+ const auto & grid_name = it.first ;
1244
1240
if (ic_fields_names[grid_name].size () > 0 or
1245
- topography_eamxx_fields_names[grid_name].size () > 0 ) {
1246
- const auto & file_name = grid_name == " Physics GLL"
1247
- ?
1248
- ic_pl.get <std::string>(" Filename" )
1249
- :
1250
- ic_pl.get <std::string>(" topography_filename" );
1241
+ topography_eamxx_fields_names[grid_name].size () > 0 ) {
1242
+ const auto &file_name =
1243
+ grid_name == " Physics GLL"
1244
+ ? ic_pl.get <std::string>(" Filename" )
1245
+ : ic_pl.get <std::string>(" topography_filename" );
1251
1246
m_iop->setup_io_info (file_name, it.second ->get_grid ());
1252
1247
}
1248
+ // // f_iop is std::map<std::string, Field>
1249
+ // auto f_iop = m_iop->get_iop_field_map();
1250
+ // for (const auto &f : f_iop) {
1251
+ // m_fields_inited[grid_name].push_back(f.first);
1252
+ // }
1253
1253
}
1254
1254
}
1255
1255
@@ -1269,6 +1269,7 @@ void AtmosphereDriver::set_initial_conditions ()
1269
1269
ic_fields_names[grid_name],
1270
1270
m_current_ts,
1271
1271
it.second );
1272
+ // m_fields_inited[grid_name].push_back(ic_fields_names[grid_name]);
1272
1273
}
1273
1274
}
1274
1275
}
@@ -1293,6 +1294,8 @@ void AtmosphereDriver::set_initial_conditions ()
1293
1294
// Get the two fields, and copy src to tgt
1294
1295
auto f_tgt = fm->get_field (tgt_fname);
1295
1296
auto f_src = fm->get_field (src_fname);
1297
+ // FIXME:
1298
+ // m_fields_inited[gname].push_back(tgt_fname);
1296
1299
f_tgt.deep_copy (f_src);
1297
1300
1298
1301
// Set the initial time stamp
@@ -1348,6 +1351,10 @@ void AtmosphereDriver::set_initial_conditions ()
1348
1351
read_fields_from_file (topography_file_fields_names[grid_name],
1349
1352
topography_eamxx_fields_names[grid_name],
1350
1353
io_grid,file_name,m_current_ts);
1354
+ // auto &f_grid = topography_eamxx_fields_names[grid_name];
1355
+ // for (const auto &f : f_grid) {
1356
+ // m_fields_inited[grid_name].push_back(f);
1357
+ // }
1351
1358
} else {
1352
1359
// For IOP enabled, we load from file and copy data from the closest
1353
1360
// lat/lon column to every other column
@@ -1356,6 +1363,7 @@ void AtmosphereDriver::set_initial_conditions ()
1356
1363
topography_eamxx_fields_names[grid_name],
1357
1364
m_current_ts,
1358
1365
it.second );
1366
+ // m_fields_inited[grid_name].push_back(topography_eamxx_fields_names[grid_name]);
1359
1367
}
1360
1368
}
1361
1369
// Store in provenance list, for later usage in output file metadata
@@ -1526,6 +1534,8 @@ read_fields_from_file (const std::vector<std::string>& field_names,
1526
1534
std::vector<Field> fields;
1527
1535
for (const auto & fn : field_names) {
1528
1536
fields.push_back (field_mgr->get_field (fn));
1537
+ // // FIXME:
1538
+ // m_fields_inited[grid->name()].push_back(fn);
1529
1539
}
1530
1540
1531
1541
AtmosphereInput ic_reader (file_name,grid,fields);
@@ -1643,6 +1653,21 @@ void AtmosphereDriver::initialize_atm_procs ()
1643
1653
m_atm_logger->info (" [EAMxx] initialize_atm_procs ... done!" );
1644
1654
1645
1655
report_res_dep_memory_footprint ();
1656
+
1657
+ auto & driver_options_pl = m_atm_params.sublist (" driver_options" );
1658
+ const int verb_lvl = driver_options_pl.get <int >(" atmosphere_dag_verbosity_level" ,-1 );
1659
+ if (verb_lvl>0 ) {
1660
+ // now that we've got fields, generate a DAG with fields and dependencies
1661
+ // NOTE: at this point, fields provided by initial conditions may (will)
1662
+ // appear as unment dependencies
1663
+ AtmProcDAG dag;
1664
+ // First, add all atm processes
1665
+ dag.create_dag (*m_atm_process_group);
1666
+ // process the initial conditions to maybe fulfill unmet dependencies
1667
+ dag.process_IC_alt (m_fields_inited);
1668
+ // Write a dot file for visualization
1669
+ dag.write_dag (" initProc_dag.dot" , std::max (verb_lvl,0 ));
1670
+ }
1646
1671
}
1647
1672
1648
1673
void AtmosphereDriver::
0 commit comments