R/WellRedundancyUtils.R

Defines functions RefitModel

RefitModel<-function(csite,substance,WellsToOmit){

All.Data<-csite$All.Data
#All.Data$Cont.Data<-subset(All.Data$Cont.Data, !WellName %in% WellsToOmit) #Cran not keen on this. 
All.Data$Cont.Data<-All.Data$Cont.Data[!All.Data$Cont.Data$WellName %in% WellsToOmit,]

csite[["Reduced.Fitted.Data"]]<-fitData(All.Data=All.Data,params=csite$GWSDAT_Options,showProgress = TRUE,calcTrend=FALSE)$Fitted.Data

### Refit GW flows.
temp.GW.Flows <- csite$GW.Flows
temp.GW.Flows<-temp.GW.Flows[!temp.GW.Flows$WellName %in% WellsToOmit,]
temp.GW.Flows<-evalGWFlow(temp.GW.Flows,showErrorMessage=FALSE)
csite[["Reduced.Fitted.Data.GW.Flows"]]<-temp.GW.Flows 
return(csite)
}
andrejadd/GWSDAT documentation built on March 7, 2024, 12:55 p.m.