Skip to content

Commit

Permalink
modified examples
Browse files Browse the repository at this point in the history
  • Loading branch information
schwemro committed Nov 5, 2023
1 parent 6350606 commit 1a88e5e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def main():
num_error_sum1 = onp.where(num_error_sum <= 0, onp.nan, num_error_sum)

# plot the numerical error
fig, ax = plt.subplots(figsize=(6,4))
fig, ax = plt.subplots(figsize=(6,3.5))
grid_extent = (0, 80*25, 0, 53*25)
im = ax.imshow(num_error_sum1, extent=grid_extent, cmap='viridis', zorder=2)
im = ax.imshow(num_error_sum1, extent=grid_extent, cmap='viridis', zorder=2, aspect=80/53)
plt.colorbar(im, ax=ax, shrink=0.7, label="Total numerical error [mm]")
plt.xlabel('Distance in x-direction [m]')
plt.ylabel('Distance in y-direction [m]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def main():
ds_sim = ds_sim.assign_coords(date=("Time", days_sim))

# calculate the total sum of the numerical error
num_error = ds_sim["dC_num_error"].values
num_error = ds_sim["dS_num_error"].values
num_error_sum = onp.nansum(num_error, axis=-1)
num_error_sum1 = onp.where(num_error_sum <= 0, onp.nan, num_error_sum)

Expand All @@ -54,7 +54,7 @@ def main():
plt.close(fig)

# load the model parameters
params_file = base_path / "parameters.nc"
params_file = base_path.parent / "svat_distributed" / "parameters.nc"
ds_params = xr.open_dataset(params_file, engine="h5netcdf")

# numerical error and model parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ def set_parameters_setup(self, state):
vs.sas_params_transp = update(vs.sas_params_transp, at[2:-2, 2:-2, 0], 6)
vs.sas_params_transp = update(vs.sas_params_transp, at[2:-2, 2:-2, 1], 0.5)
vs.sas_params_q_rz = update(vs.sas_params_q_rz, at[2:-2, 2:-2, 0], 6)
vs.sas_params_q_rz = update(vs.sas_params_q_rz, at[2:-2, 2:-2, 1], 1.2)
vs.sas_params_q_rz = update(vs.sas_params_q_rz, at[2:-2, 2:-2, 1], 0.65)
vs.sas_params_q_ss = update(vs.sas_params_q_ss, at[2:-2, 2:-2, 0], 6)
vs.sas_params_q_ss = update(vs.sas_params_q_ss, at[2:-2, 2:-2, 1], 1.5)
vs.sas_params_q_ss = update(vs.sas_params_q_ss, at[2:-2, 2:-2, 1], 0.8)

@roger_routine
def set_parameters(self, state):
Expand Down

0 comments on commit 1a88e5e

Please sign in to comment.