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

Next steps from WW, BBL, NM meeting 9/18 #37

Open
5 of 7 tasks
stephpenn1 opened this issue Sep 18, 2020 · 9 comments
Open
5 of 7 tasks

Next steps from WW, BBL, NM meeting 9/18 #37

stephpenn1 opened this issue Sep 18, 2020 · 9 comments

Comments

@stephpenn1
Copy link
Collaborator

stephpenn1 commented Sep 18, 2020

  • PACF: Check is theres an error in Js calculation or numbers
  • Q1: Calculate on ecosystem scale
  • Q2: Calculate on ecosystem scale
  • Q3: Use better colors for sunny/cloudy; improve graphs
  • Overall analysis: Calculate a Js_peak daily variable using Js from 11-1p
  • Overall analysis: Add sapwood area into Js
  • Make sure all figures self-explanatory (clear labels, etc)
@bpbond
Copy link
Collaborator

bpbond commented Sep 18, 2020

using Js from 11-1p

Or, Js for peak daylight hours, which might be more defensible (and not much harder).

@bpbond
Copy link
Collaborator

bpbond commented Sep 21, 2020

PACF

  • Look at one tree to start
  • Check calculation - are we doing for each tree separately?
  • Are data ordered correctly?
  • Does this negative pacf show up for a single tree in a single week/month?

@bpbond
Copy link
Collaborator

bpbond commented Sep 21, 2020

Q1 and Q2

  • For each hour take average of Js and Rs across all trees

@bpbond
Copy link
Collaborator

bpbond commented Sep 21, 2020

Add sapwood area into Js

  • Read Wenzhi area data, merge, multiply

@bpbond
Copy link
Collaborator

bpbond commented Sep 21, 2020

Calculate a Js_peak daily variable using Js from 11-1p

  • Could do that (fixed hour) but weak
  • Could do hours of maximum sunlight
  • Could do n largest Js values
  • Could use quantile()

@stephpenn1
Copy link
Collaborator Author

@bpbond could you help with investigating the PACF errors and Js_peak calculation?

@stephpenn1
Copy link
Collaborator Author

How about we take use the top 3 hours of maximum sunlight via PAR to compute Js_peak? Should we do for each day, week, or month?

@bpbond
Copy link
Collaborator

bpbond commented Oct 8, 2020

@stephpenn1 I took a close look at what's going on with the PACF. Start by isolating just the first day of data:

combined_pacf[38:60,] -> tst
plot(tst$Js_avg)

Screen Shot 2020-10-08 at 6 01 30 AM

OK, this is nice and simple for us to examine now.

pacf(tst$Js_avg, na.action = na.pass)

Screen Shot 2020-10-08 at 6 02 44 AM

This is reassuring--we're seeing a similar pattern to the mysterious (to us) pattern for the full dataset currently produced in the Rmd:
Screen Shot 2020-10-08 at 6 05 43 AM

The ACF gives us straight lagged correlations:

acf(tst$Js_avg)

Screen Shot 2020-10-08 at 6 10 38 AM

This makes sense. Js is highly correlated with itself at a 1-hour lag, less correlated at 2, etc., and anti-correlated at 10-12 hours.

@bpbond
Copy link
Collaborator

bpbond commented Oct 8, 2020

So, we think the PACF plot is OK actually. How do we interpret it? From Wikipedia:

In time series analysis, the partial autocorrelation function (PACF) gives the partial correlation of a stationary time series with its own lagged values, regressed the values of the time series at all shorter lags. It contrasts with the autocorrelation function, which does not control for other lags.

In the PACF plot being produced by the RMarkdown file

  • PACF at lag 1 is 0.94, meaning that Js values at a one-hour lag are highly correlated with each other. This makes sense.
  • PACF at lag 2 is -0.68, meaning that Js values at a two-hour are anti-correlated after the effects of the one-hour lag correlation are removed. My interpretation: at a two-hour lag, we're likely to cross the midpoint (average Js) as the flux goes up in the morning or down in the afternoon, and so this produces a negative PACF at 2.

So in summary: I think we're OK here. The negative PACF at lag 2 is a mathematical consequence of the sharp diurnal cycle of Js.

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

No branches or pull requests

2 participants