Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
cmahony committed Nov 28, 2024
1 parent bebcdd0 commit a7cb7bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/manual_tests/check_TimeSeriesVsNormals.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ ts <- extract(temp, point, id=F)
ts.x <- names(ts)[2:123]
ts.y <- as.numeric(ts[2:123])
ts.n <- as.numeric(ts[124:length(ts)])
ref.cru <- mean(ts.y[ts.x%in%1961:1990])

## climateNA time series from climr Data
points <- data.frame(lon = c(-120), lat = c(50), elev = c(1385), id = 1)
Expand All @@ -138,7 +139,6 @@ ts.y.climatena <- ts.y.climatena + (ref.cru - ref.climatena) # shift to cru base
## plot comparing CRU and climateNA time series.
par(mar = c(4,4,0.5,0.5), mgp = c(1.75, 0.25, 0))
plot(ts.x, ts.y)
ref.cru <- mean(ts.y[ts.x%in%1961:1990])
lines(1902:2020,ts.y.climatena, col="red")
lines(c(1961,1990), rep(mean(ts.y.climatena[ts.x.climatena%in%1961:1990]),2), col="red")
lines(c(2001,2020), rep(mean(ts.y.climatena[ts.x.climatena%in%2001:2020]),2), col="red")
Expand Down

0 comments on commit a7cb7bd

Please sign in to comment.