Skip to content
Snippets Groups Projects
Commit 2d05cbff authored by Svajunas Plunge's avatar Svajunas Plunge
Browse files

git ignore bits

parent b94d18d7
No related branches found
No related tags found
No related merge requests found
^.*\.Rproj$
^\.Rproj\.user$
test*
template*
\ No newline at end of file
template*
env*
\ No newline at end of file
......@@ -28,4 +28,5 @@ vignettes/*.pdf
rsconnect/
.Rproj.user
test*
template*
\ No newline at end of file
template*
env*
\ No newline at end of file
......@@ -119,7 +119,7 @@ Management operation inputs in a SWAT+ model setup can be very complex and compr
Function `report_mgt()` can be applied to identify discrepancies between management operations in model input files and what operations are actually triggered in the model. If `write_report` parameter is set to TRUE, function also provides a report in *"schedule_report.txt"* text file.
```{r}
mgt_report <- report_mgt(sim_nostress, TRUE)
mgt_report <- report_mgt(sim_nostress)
mgt_report
print(paste("Issues were identified in", length(mgt_report$schedule), "schedules."))
```
......@@ -136,6 +136,8 @@ if(length(mgt_report$schedule)>=sel_nb){
##Print selected case into interactive table
print(paste("Table of issues for selected management", sel_mgt))
create_dt(mgt_report$schedule_report[[sel_nb]])
} else {
id <- get_hru_id_by_attribute(sim_nostress)
}
```
......@@ -211,17 +213,19 @@ The next step includes activating potential sources for plant growth stresses, s
Setting `nostress = 0` while running `run_swat_verification()` function will activate all stresses, however turning off the nutrient plant stress only can as well be a useful option for analyses (`nostress = 2`). This is particularly useful for eliminating the fertilization impact on the plant growth and focusing only on the weather/climate and structural setting of the plant. Particularly, the aeration, temperature, and water stress, alongside yields are relevant outputs to be analyzed. A simulation with inactive nutrient stress will provide a good approximation of possible yields with an optimal fertilization and ideal plant nutrient supply. All other stresses will indicate the need of irrigation, drainage or plant-specific parameter adjustments for a plant to grow.
```{r, include=FALSE}
rm(sim_nostress)
sim_stress_nutrient <- readRDS(file = rpath[3])
sim_except_nutrient <- readRDS(file = rpath[3])
sim_stress_all <- readRDS(file = rpath[1])
sim_list <- list(no_stress = sim_nostress["mgt_out"],
except_nutrient = sim_except_nutrient["mgt_out"],
stress_all = sim_stress_all["mgt_out"])
rm(sim_nostress)
```
### Examine stress factors
It is possible to plot each case side-by-side for examination with same functions applied. For instance `plot_variable_at_harvkill()` could be run to check how much stress factors affect in each case.
```{r fig.width = 10, fig.height = 6}
plot_variable_at_harvkill(sim_stress_nutrient, variable = 'stress')
```{r fig.width = 15, fig.height = 10}
plot_variable_at_harvkill(sim_stress_all, variable = 'stress')
```
......@@ -230,24 +234,16 @@ plot_variable_at_harvkill(sim_stress_all, variable = 'stress')
Additionally, we can look how plant growth is different in the same HRUs.
```{r fig.width = 10, fig.height = 6}
plot_hru_pw(sim_stress_nutrient, id$id[1], var = c('lai', 'bioms'))
plot_hru_pw(sim_except_nutrient, id$id[1], var = c('lai', 'bioms'))
plot_hru_pw(sim_stress_all, id$id[1], var = c('lai', 'bioms'))
```
### Assess difference at the harvest for PHU
```{r fig.width = 10, fig.height = 6}
plot_variable_at_harvkill(sim_stress_nutrient, variable = 'phu')
plot_variable_at_harvkill(sim_stress_all, variable = 'phu')
```
### Assess difference for yields
Could be useful to examine how harvest is affected by stresses factors.
```{r fig.width = 10, fig.height = 6}
plot_variable_at_harvkill(sim_stress_nutrient, variable = 'yield')
plot_variable_at_harvkill(sim_stress_all, variable = 'yield')
plot_variable_at_harvkill(sim_list, variable = 'yield')
```
## Simulated point sources and tile drains
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment