diff --git a/share/run/UA/inputs/defaults.json b/share/run/UA/inputs/defaults.json index e4735e1b..1f9c296a 100644 --- a/share/run/UA/inputs/defaults.json +++ b/share/run/UA/inputs/defaults.json @@ -101,7 +101,8 @@ "Sources" : { "Grid" : { "Centripetal" : true, - "Coriolis" : true }, + "Coriolis" : true, + "Cent_acc": true }, "Neutrals" : { "NO_cool" : false, "O_cool": false } }, diff --git a/src/inputs.cpp b/src/inputs.cpp index f5fa1065..50981d04 100644 --- a/src/inputs.cpp +++ b/src/inputs.cpp @@ -547,10 +547,13 @@ std::vector Inputs::get_omniweb_files() { precision_t Inputs::get_dt_output(int iOutput) { precision_t value = 0.0; - int nOutputs = settings.at("Outputs").at("type").size(); + int nOutputs = settings.at("Outputs").at("dt").size(); if (iOutput < nOutputs) value = settings.at("Outputs").at("dt").at(iOutput); + else{ + report.error("Output Error; more output types than dt's provided."); + } return value; } diff --git a/src/main/main.cpp b/src/main/main.cpp index aa5f465a..f8395890 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -177,7 +177,7 @@ int main() { didWork = output(neutralsMag, ionsMag, mGrid, time, planet); } if (!didWork) - throw std::string("output failed!"); + throw std::string("Initial output failed!"); // This is advancing now... We are not coupling, so set dt_couple to the // end of the simulation diff --git a/src/output.cpp b/src/output.cpp index 2c0e58f6..2a16a8c0 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -87,7 +87,14 @@ bool output(const Neutrals &neutrals, for (int iOutput = 0; iOutput < nOutputs; iOutput++) { - if (time.check_time_gate(input.get_dt_output(iOutput))) { + // make sure the output dt is set correctly. Otherwise these errors aren't caught correctly. + precision_t dt_output = input.get_dt_output(iOutput); + if (dt_output == 0.0){ + report.exit(function); + return false; + } + + if (time.check_time_gate(dt_output)) { // ------------------------------------------------------------ // Store time in all of the files: @@ -244,7 +251,7 @@ bool output(const Neutrals &neutrals, grid.radius_scgc); } - if (type_output == "bfield") { + if (type_output == "bfield" || type_output == "ions") { AllOutputContainers[iOutput].store_variable("mlat", "Magnetic Latitude", "degrees",