Skip to content

Commit

Permalink
minor fix in pr_ts2eir_history
Browse files Browse the repository at this point in the history
  • Loading branch information
smitdave committed Jan 29, 2025
1 parent 9acc07c commit 2885ee2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ docs/reference/ar_compare.html
*.html
/docs/articles
/docs
/vignettes/Trend_files
4 changes: 2 additions & 2 deletions R/pr2eir_history.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pr_ts2eir_history <- function(pr_ts, times, model){

# First pass: fit the inter-annual variability
N = diff(range(round(times/365)))+1
fit_splinef(N, obs_pr, tt, model) -> Ts1
fit_splinef(N, pr_ts, times, model) -> Ts1

# Second pass: adjust eir
fac = mean(Ts1$yy)
Expand All @@ -43,7 +43,7 @@ pr_ts2eir_history <- function(pr_ts, times, model){
model$EIRpar$F_season <- make_function(Fs2)

# Second pass: refit interannual variability
fit_splinef(N, obs_pr, tt, model) -> Ts2
fit_splinef(N, pr_ts, times, model) -> Ts2
model$EIRpar$F_trend <- make_function(Ts2)
model$fits <- list()
model$fits$par_season <- Fs2
Expand Down
3 changes: 3 additions & 0 deletions docs/articles/Scaling.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<url>
<loc>https://dd-harp.github.io/ramp.xds/articles/Seasonality.html</loc>
</url>
<url>
<loc>https://dd-harp.github.io/ramp.xds/articles/Trend.html</loc>
</url>
<url>
<loc>https://dd-harp.github.io/ramp.xds/articles/index.html</loc>
</url>
Expand Down Expand Up @@ -90,6 +93,9 @@
<url>
<loc>https://dd-harp.github.io/ramp.xds/reference/fit_sin_season.html</loc>
</url>
<url>
<loc>https://dd-harp.github.io/ramp.xds/reference/fit_splinef.html</loc>
</url>
<url>
<loc>https://dd-harp.github.io/ramp.xds/reference/hello.html</loc>
</url>
Expand Down Expand Up @@ -126,6 +132,9 @@
<url>
<loc>https://dd-harp.github.io/ramp.xds/reference/sse_season.html</loc>
</url>
<url>
<loc>https://dd-harp.github.io/ramp.xds/reference/sse_splinef.html</loc>
</url>
<url>
<loc>https://dd-harp.github.io/ramp.xds/reference/update_by_ar.html</loc>
</url>
Expand Down
1 change: 0 additions & 1 deletion vignettes/Trend.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## -----------------------------------------------------------------------------
library(ramp.xds)
library(ramp.work)
devtools::load_all()

## -----------------------------------------------------------------------------
tt <- round(seq(0, 2500, by = 365/12))
Expand Down

0 comments on commit 2885ee2

Please sign in to comment.