Problem getting data when using multiple parameterCds for multiple gages
Created by: laurareads
Hi, I encountered an issue when pulling data using readNWISuv for the case of multiple gages and parameter codes. I am suspecting the issue occurs when a parameterCd is missing? I am posting my code below. Essentially the result when I pull both gages in one call is not the true values (it returns a bunch of streamflow values = 1). If I pull them individually, I get the real values.
#using one call to retrieve multiple gages with multiple param codes
obs.iv <- readNWISuv(siteNumbers=c("04282500","04282000"),
parameterCd=c('00060','00061'),
startDate='2010-07-01', endDate='2011-09-15')
#retrieving data for one gage
obs.iv3 <- readNWISuv(siteNumbers=c("04282000"),
parameterCd=c('00060','00061'),
startDate='2010-07-01', endDate='2011-09-15')
#check the diffs in a plot
plot(obs.iv$dateTime,obs.iv$X_00060_00000)
lines(obs.iv3$dateTime,obs.iv3$X_00060_00000,col='red')
Thanks!