Skip to content

Commit

Permalink
large model setup
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-v-k committed Oct 23, 2023
1 parent da41f81 commit 682908c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/Simulation/Simulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ namespace GlobalFlow {
out = out + fun1(j);
in = in + fun2(j);
}
error = in - abs(out);
/*if (abs(in - abs(out)) > 0.00001) {
//error = in - abs(out);
if (abs(in - abs(out)) > 0.00001) {
error = 200 * ((in - abs(out))/ (in + abs(out)));
}*/
}
MassError err(out, in, error);
return err;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/LargeModel/GlobalDataReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class GlobalDataReader : public DataReader {
return (((recharge / 1000) * area) / 365);});


/*if (op.isKRiverFromFile()) {
if (op.isKRiverFromFile()) {
LOG(userinfo) << "Reading river conductance";
readRiverConductance(buildDir(op.getKRiver()));
} else {
Expand All @@ -143,7 +143,7 @@ class GlobalDataReader : public DataReader {
readLakesAndWetlands(buildDir(op.getGlobalLakes()),
buildDir(op.getGlobalWetlands()),
buildDir(op.getLocalLakes()),
buildDir(op.getLocalWetlands()));*/
buildDir(op.getLocalWetlands()));

if (op.isDensityVariable()) {
LOG(userinfo) << "Setting initial heights of " << op.getDensityZones().size() << " active zeta surfaces"; // requires elevation to be set
Expand Down
14 changes: 7 additions & 7 deletions tests/LargeModel/config_na.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"edge_length_left_right": -0,
"edge_length_front_back": -0,
"layers": 2,
"use_efolding": "false",
"use_efolding": "true",
"confinement": [
"true",
"true"
Expand All @@ -33,14 +33,14 @@
"vdf_lock": 0.001
},
"numerics": {
"threads": 50,
"threads": 20,
"solver": "PCG",
"iterations": 100,
"inner_itter": 10,
"closing_crit_head": 1e-185,
"iterations": 20,
"inner_itter": 5,
"closing_crit_head": 1e-180,
"closing_crit_zeta": 1e-8,
"head_change": 1,
"zeta_change": 0.01,
"zeta_change": 0.1,
"damping": "false",
"min_damp": 0.3,
"max_damp": 0.95
Expand All @@ -64,7 +64,7 @@
"effective_porosity": 0.002,
"initial_head": 0,
"K": [
0.027,
0.27,
0.027
],
"ghb_K": 10,
Expand Down
5 changes: 2 additions & 3 deletions tests/LargeModel/config_nz.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"efold_as_array": "true",
"eq_wtd_from_file": "true",
"initial_head_from_file": "false",
"initial_zetas_as_array": "true",
"initial_zetas_as_array": "false",
"k_from_file": "true",
"k_ghb_from_file": "true",
"k_river_from_file": "false",
Expand All @@ -61,7 +61,7 @@
"zones_sources_sinks_from_file": "false"
},
"default_data": {
"effective_porosity": 0.2,
"effective_porosity": 0.002,
"initial_head": 0,
"K": [
0.27,
Expand All @@ -87,7 +87,6 @@
"elevation": "elevation.csv",
"effective_porosity": "effective_porosity.csv",
"equal_water_table_depth": "mean_wtd.csv",
"initial_zetas": "initial_zetas_global.csv",
"global_lakes": "G_GLOLAK.csv",
"global_wetlands": "G_GLOWET.csv",
"ghb_conductance": "caspian_data.csv",
Expand Down
4 changes: 2 additions & 2 deletions tests/LargeModel/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace GlobalFlow {

void Runner::loadSettings() {
op = Simulation::Options();
op.load("data/config_nz.json");
op.load("data/config_na.json");
}

void Runner::setupSimulation() {
Expand All @@ -16,7 +16,7 @@ namespace GlobalFlow {
}

void Runner::simulate() {
Simulation::Stepper stepper = Simulation::Stepper(_eq, Simulation::DAY, 1);
Simulation::Stepper stepper = Simulation::Stepper(_eq, Simulation::MONTH, 1);
for (Simulation::step step : stepper) {
LOG(userinfo) << "Running a steady state step";
step.first->toggleSteadyState();
Expand Down

0 comments on commit 682908c

Please sign in to comment.