Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aggregating NWM retro and forecast discharge #46

Merged
merged 3 commits into from
May 14, 2018

Conversation

jzwart
Copy link
Member

@jzwart jzwart commented May 14, 2018

Aggregation of NWM discharge to daily mean discharge. Through visual inspection, the second duplicated sites brought up in issue #42 and PR #44 seem to be the correct discharge values for those sites. These could be chosen in a more intelligent way than visual inspection so I'm leaving #42 still open for now. This PR closes #34

})) # need to figure out what valid date vals mean; what are the time steps?
})) %>%
mutate(valid_date = as.character(as.POSIXlt(ref_date) + as.difftime(valid_date * valid_time_step, units = 'hours'))) %>%
mutate(valid_date = as.Date(valid_date)) %>%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if you merge the above two lines into a single one,

mutate(valid_date = as.Date(as.POSIXlt(ref_date) + as.difftime(valid_date * valid_time_step, units = 'hours')))

? does it work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah, that was dumb; I'll push up edit. good catch!


#need to figure out which site_no of the duplicates are correct;
# looks like the second half of the all the site pulls are correct; but need to check this later if new sites are added
site_inds <- site_inds[4:6]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noted. it'll be good to have something workable in the meantime.

@aappling-usgs aappling-usgs merged commit 4061f16 into USGS-R:master May 14, 2018
@aappling-usgs aappling-usgs mentioned this pull request May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only take reference dateTime's that are at midnight
2 participants