You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sum 1: For each drainage, sum daily variable by water year.
Results: Rows years; Columns Drainage
Sum 2: For each Sum1, average annual sum for each variable
Results: Rows Drainage; Columns 1 value per drainage
Here is example code in R:
`yearlySummary_Precipitation_in.txt` <- Precipitation_in.txt %>%
# group by TimeStep and Month
select(-c(TimeStep, yyyymmdd, year, day)) %>%
melt(., id.vars = c('month', 'water_year'), variable.name = 'Drainages', value.name = 'Precipitation')
# calculate total by month, wateryear, and drainage
group_by(month, water_year, Drainages) %>%
summarise(sumByMonthByWateryearByDrainage = sum(Precipitation)) %>%
# calculate mean by wateryear, and drainage
group_by(water_year, Drainages) %>%
summarise(meanByWateryearByDrainage = sum(sumByMonthByWateryearByDrainage)) %>%
# calculate mean
group_by(water_year) %>%
mutate(meanByWateryear = mean(meanByWateryearByDrainage),
# reformat the table to wide for each DrainageID
dcast(., water_year + meanByWateryear ~ Drainages, value.var = 'meanByWateryearByDrainage') %>%
data.table()`
Variables= Precip, ET, Recharge (Rd), Upwelling (r3), Return flow
and User Withdrawal
Slight change for users, group by user type
loop through user = 1:6
User Sum 1: For each drainage, sum daily variable by water year.
Results: Rows years; Columns Drainage, append Source Mixing ID, ReturnFlowID
User Sum 2: For each Sum1, average annual sum for each variable
Results: Rows Drainage; Columns 1 value per drainage, append Source Mixing ID, ReturnFlowID
Ideal future outcome: Annual average sum of water depth
Total P, ET, Rd, R2 per drainage
Total of user Groundwater withdrawal per drainage
Total of user Surface water withddrawal per drainage
Total return flow per drainage
The text was updated successfully, but these errors were encountered:
Water year = Oct 1- Sept 30
Sum 1: For each drainage, sum daily variable by water year.
Results: Rows years; Columns Drainage
Sum 2: For each Sum1, average annual sum for each variable
Results: Rows Drainage; Columns 1 value per drainage
Here is example code in R:
Variables= Precip, ET, Recharge (Rd), Upwelling (r3), Return flow
and User Withdrawal
Slight change for users, group by user type
loop through user = 1:6
User Sum 1: For each drainage, sum daily variable by water year.
Results: Rows years; Columns Drainage, append Source Mixing ID, ReturnFlowID
User Sum 2: For each Sum1, average annual sum for each variable
Results: Rows Drainage; Columns 1 value per drainage, append Source Mixing ID, ReturnFlowID
print user withdrawal for each user type
Ideal future outcome: Annual average sum of water depth
Total P, ET, Rd, R2 per drainage
Total of user Groundwater withdrawal per drainage
Total of user Surface water withddrawal per drainage
Total return flow per drainage
The text was updated successfully, but these errors were encountered: