-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4770 from ver078/cotton
Cotton
- Loading branch information
Showing
13 changed files
with
872 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
+6.34 KB
(150%)
Prototypes/Cotton/munge-experiment-data/output/APSIMClassicValidation.xlsx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
Prototypes/Cotton/munge-experiment-data/scripts/narrabri/narrabri.r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#! /bin/bash | ||
|
||
|
||
library(tidyverse) | ||
|
||
library(readxl) | ||
library(writexl) | ||
|
||
library(lubridate) | ||
|
||
|
||
dir_sourcedata <- file.path("C:","Users","ver078","Dropbox","CottonModel","OldData","Narrabri(Stephen)", "Soil Probe Data") | ||
path <- file.path(dir_sourcedata, "ProbeReading Summary.xls") | ||
|
||
|
||
#nb. the probes only went down to 120cm. So all the sw measurments are the cumulative sw down to 120cm | ||
|
||
|
||
|
||
|
||
|
||
# ADD SimulationName Column and Clock.Today column | ||
# ------------------------------------------------ | ||
# nb. this is needed to do predicted vs observed in ApsimX | ||
|
||
yield <- yield %>% mutate("Clock.Today" = format(date, "%d/%m/%Y")) | ||
yield <- yield %>% mutate(SimulationName = paste("Narrabri_", year, "Sow", Treatment, sep = "")) | ||
yield <- yield %>% select(Clock.Today, SimulationName, everything()) | ||
|
||
plant <- plant %>% mutate("Clock.Today" = format(date, "%d/%m/%Y")) | ||
plant <- plant %>% mutate(SimulationName = paste("Narrabri_", year, "Sow", Treatment, sep = "")) | ||
plant <- plant %>% select(Clock.Today, SimulationName, everything()) | ||
|
||
soilwater <- soilwater %>% mutate("Clock.Today" = format(date, "%d/%m/%Y")) | ||
soilwater <- soilwater %>% mutate(SimulationName = paste("Narrabri_", year, "Sow", treatment, sep = "")) | ||
soilwater <- soilwater %>% select(Clock.Today, SimulationName, everything()) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# WRITE TO SPREADSHEET | ||
# -------------------- | ||
|
||
sheets <- list(Narrabri_Yield = yield, Narrabri_Plant = plant, Narrabri_SoilWater = soilwater) | ||
write_xlsx(x = sheets, path = "./output/narrabri.xlsx") | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.