Skip to content

Commit

Permalink
modified tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
schwemro committed Jul 24, 2023
1 parent ea468f6 commit 8df5072
Show file tree
Hide file tree
Showing 20 changed files with 4,670 additions and 18,456 deletions.
2 changes: 1 addition & 1 deletion examples/plot_scale/oneD_event_tutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Name of model experiment and spatial discretization are defined in `config.yml`.
## Model output
The variables written to the output files are defined in `config.yml`. Available variables
are listed [here](https://roger.readthedocs.io/en/latest/reference/variables.html#available-variables). Generally, storage variables
should be defined for `OUTPUT_COLLECT` and flux variables for `OUTPUT_RATE`.
should be defined in `OUTPUT_COLLECT` and flux variables in `OUTPUT_RATE`.

# Workflow

Expand Down
2 changes: 1 addition & 1 deletion examples/plot_scale/oneD_tutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Name of model experiment and spatial discretization are defined in `config.yml`.
## Model output
The variables written to the output files are defined in `config.yml`. Available variables
are listed [here](https://roger.readthedocs.io/en/latest/reference/variables.html#available-variables). Generally, storage variables
should be defined for `OUTPUT_COLLECT` and flux variables for `OUTPUT_RATE`.
should be defined in `OUTPUT_COLLECT` and flux variables in `OUTPUT_RATE`.

# Workflow

Expand Down
4 changes: 2 additions & 2 deletions examples/plot_scale/svat_bromide_tutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Name of model experiment and spatial discretization are defined in `config.yml`.

## Model output
The variables written to the output files are defined in `config.yml`. Available variables
are listed [here](https://roger.readthedocs.io/en/latest/reference/variables.html#available-variables). Generally, storage variables
should be defined for `OUTPUT_COLLECT` and flux variables for `OUTPUT_RATE`.
are listed [here](https://roger.readthedocs.io/en/latest/reference/variables.html#available-variables). Generally, water age and tracer concentration variables
should be defined in `OUTPUT_AVERAGE`, tracer mass flux variables in `OUTPUT_RATE` and tracer mass storage variables in `OUTPUT_COLLECT`.

# Workflow

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Name of model experiment and spatial discretization are defined in `config.yml`.
## Model output
The variables written to the output files are defined in `config.yml`. Available variables
are listed [here](https://roger.readthedocs.io/en/latest/reference/variables.html#available-variables). Generally, storage variables
should be defined for `OUTPUT_COLLECT` and flux variables for `OUTPUT_RATE`.
should be defined in `OUTPUT_COLLECT` and flux variables in `OUTPUT_RATE`.

# Workflow

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def set_look_up_tables(self, state):
vs.lut_gc = update(vs.lut_gc, at[-1, 1:], 1 - 0.7 ** (vs.lut_ilu[-1, 1:] / 0.2))
# ground cover for custom land cover (-)
vs.lut_gcm = update(vs.lut_gcm, at[-1, 0], 60)
vs.lut_gcm = update(vs.lut_gcm, at[-1, -1], onp.max(vs.lut_gc[-1, 1:], axis=1))
vs.lut_gcm = update(vs.lut_gcm, at[-1, -1], onp.max(vs.lut_gc[-1, 1:]))

@roger_routine
def set_topography(self, state):
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_scale/svat_monte_carlo_tutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Name of model experiment and spatial discretization are defined in `config.yml`.
## Model output
The variables written to the output files are defined in `config.yml`. Available variables
are listed [here](https://roger.readthedocs.io/en/latest/reference/variables.html#available-variables). Generally, storage variables
should be defined for `OUTPUT_COLLECT` and flux variables for `OUTPUT_RATE`.
should be defined in `OUTPUT_COLLECT` and flux variables in `OUTPUT_RATE`.

# Workflow

Expand Down
4 changes: 2 additions & 2 deletions examples/plot_scale/svat_oxygen18_tutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Name of model experiment and spatial discretization are defined in `config.yml`.

## Model output
The variables written to the output files are defined in `config.yml`. Available variables
are listed [here](https://roger.readthedocs.io/en/latest/reference/variables.html#available-variables). Generally, storage variables
should be defined for `OUTPUT_COLLECT` and flux variables for `OUTPUT_RATE`.
are listed [here](https://roger.readthedocs.io/en/latest/reference/variables.html#available-variables). Generally, water age and tracer concentration variables
should be defined in `OUTPUT_AVERAGE`.

# Workflow

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Name of model experiment and spatial discretization are defined in `config.yml`.
## Model output
The variables written to the output files are defined in `config.yml`. Available variables
are listed [here](https://roger.readthedocs.io/en/latest/reference/variables.html#available-variables). Generally, storage variables
should be defined for `OUTPUT_COLLECT` and flux variables for `OUTPUT_RATE`.
should be defined in `OUTPUT_COLLECT` and flux variables in `OUTPUT_RATE`.

# Workflow

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# --- Settings --------------------------------------------------------------
# name of the model run; is used to name the output files
identifier: SVAT
# total number of model runs
# total number of samples
nsamples: 256
# spatial discretization in x-direction (in meters)
dx: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ def main():
# write output to csv
vars_sim = config["OUTPUT_RATE"] + config["OUTPUT_COLLECT"]
for var_sim in vars_sim:
df_var_sim = pd.DataFrame(index=date_sim, columns=[f"sim_{x}" for x in range(config["nx"])])
df_var_sim.iloc[:, :] = ds_sim[var_sim].isel(y=0).values.T
values = ds_sim[var_sim].isel(y=0).values.T
df_var_sim = pd.DataFrame(index=date_sim, columns=[f"sim_{x}" for x in range(values.shape[-1])])
df_var_sim.iloc[:, :] = values
df_var_sim.to_csv(base_path_output / f"{var_sim}.csv", sep=";", index=True, index_label="date")

return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bounds:
- 300
-
- 15
- 2000
- 800
-
- 0.15
- 0.35
Expand Down
Loading

0 comments on commit 8df5072

Please sign in to comment.