Skip to content

Commit

Permalink
add check to exit in update_dt
Browse files Browse the repository at this point in the history
  • Loading branch information
whannah1 committed Apr 12, 2024
1 parent b8a7ccb commit 8f9538d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dynamics/spam/Dycore.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,13 @@ class Dycore {
}

void update_dt(pam::PamCoupler &coupler) {
if (params.tstype != "si") {
params.dt_crm_phys = coupler.get_option<real>("crm_dt");
params.dtcrm = params.dt_crm_phys / params.crm_per_phys;
if (params.tstype=="si") {
serial_print("ERROR - update_dt: time step cannot be updated in SI mode", par.masterproc);
exit(-1);
}
params.dt_crm_phys = coupler.get_option<real>("crm_dt");
params.dtcrm = params.dt_crm_phys / params.crm_per_phys;

}

// Given the model data and CFL value, compute the maximum stable time step
Expand Down

0 comments on commit 8f9538d

Please sign in to comment.