-
Notifications
You must be signed in to change notification settings - Fork 3
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
Configure day-specific Kd feeder data for GLM #3
Comments
Seasonal pattern plus annual variability. How do we balance being true to the observed data with tracking noise? |
My suggestion is that we create a characteristic seasonal curve for the lake and do a simple parameterization of that curve that stretches or amplifies it to fit the year. Maybe we could end up parameterizing it with just the annual median/mean, or perhaps we would need a second parameter for timing. |
I don't want to impose a linear trend over time (year to year) - the peak in 1997 is real I think (many reports from that time reference the unusually high water clarity). There seems to also be a peak in 2013. As for seasonal patterns, I agree that the general trend appears to be the same from year to year (declines later in the year). I am not sure how much creedence we should put in the seasonal patterns early and late in the year since they are so infrequently sampled. So I don't want to tie it too strongly to the bi-weekly data in those parts of the year where we only have one or two sampling dates. So Jordan's suggestion of a single seasonal curve, parameterized by the annual median or mean seems reasonable to me. But then how do we link Dec 31 of one year to Jan 1 of the next? Or does it not matter in ice-covered periods, and we can just have clarity jump up or down to the year-specific pattern after the ice goes off? |
Yeah, sure, the far edges are uncertain, but the lake seems to have reasonable coverage much of the open-water season.
Question here though is what is the parameterizable "single seasonal curve"?
I'm not worried about a dec 31 to jan 1 jump. Won't affect much that time of year. We can pick something reasonable for when there is no observation coverage. I think high during that time makes sense. Secchi of 5 or so. |
The curve I was referring to is like a somewhat complex shape (maybe some loess or something) but boiled down to two parameters: 1) the mean, and 2) the amplitude. A third would be stretching vertically, but that seems harder since you need to know how long the season would be a priori. For mean and amplitude, it is akin to stretching a shape vertically or translating it vertically (amplitude and mean respectively). |
Ok, you want to take first crack at that? Seems like you have a clear vision. |
what about some kind of moving average? |
A moving average of that year's data, or the whole thing flattened to DOY? |
Hmmm, do we not want to fit to that portion of the year? There are very few obs then. |
Yeah, got an equation for that? The challenging part there can be finding something well behaved with the right number of parameters. (hence my advocacy for a more empirical approach). |
empirical sounds good here, but often we may not have enough secchi data and may need to pick a curve off of the shelf (e.g., dystrophic, eutrophic) and apply it. |
The first plot is just a weibull distribution |
Or if we have a year with no/little data, use an adjacent year? Create an
'average' year to use when year-specific data are missing? Like we did for
Wilma Secchi.
…On Thu, Mar 30, 2017 at 3:08 PM, Jordan S Read ***@***.***> wrote:
The first plot is just a weibull distribution
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASiU6krLTfjYRE3nkUNSWoA0BKP5aveKks5rrAutgaJpZM4Mojwv>
.
--
Gretchen Hansen
https://gretchenhansen.squarespace.com
|
interesting...cool |
I am reading some old (early 1990's) PCA reports about Mille Lacs. They describe Secchi as follows: "Under ice readings range from 4.5-5.5m with very low levels of algae and suspended solids. Following ice out, Secchi transparency declines quickly to 3 m or less. Transparency continues to decline, coincident with peak algae concentrations, until late August with a minimum reading of 1.3 m". Given the paucity of under ice data, I think the shape should be something like a flat line (with high Secchi) until ice out, then a fairly steady decline from right around ice out through the end of August, then flat until ice on. The actual values of the starting and ending points could be parameterized based on observed open water medians for the year (where available). When we look at annual mean/medians, it is probably important to remove samples from winter, since they only exist for a few years and will skew the data for those years to be more clear than if only open water season was sampled. This figure has data only from April-Oct. |
Logistic function is just seasonal=function(x,max, min){min+((max-min)/(1+exp(.05*(x-200))))}, where I chose the rate of change as 0.05 and the mid point of transition period as 200. We could fit those to data as well if we wanted to. |
Yeah, I think that would be a decent approach, though my only concern would be the big jump in clarity at the new year transition. It would be a nice fusion of model and empiricism. |
Maybe we apply this to a certain DOY range (100-320?) and then interpolate between the years so that the transition changes aren't abrupt? |
^^ this is what I was thinking too - apply the modeled curve throughout the open water season and then interpolate between ice on and ice off to get from ending value of year x to starting value of year x+1. |
customLogitModel=function(x,max, min){min+((max-min)/(1+exp(.046*(x-192))))} Where 0,046 and 192 were estimated from a simple nonlinear model, and max and min are estimated as year-specific random effects. |
yes, this seems doable. |
Can someone re-create a daily Kd value based on that? I could start running the model then. |
I think it is 1.7/Kd |
ok, so we want daily values for all years, with linear interpolation between end of season in year x and beginning of season in year x+1. I can create this. Question: |
I'd just say arbitrary. You can be conservative if you want. I really don't think the model will be terribly sensitive to these numbers. You're right that we don't have ice on/off so it would be hard to pick them now. |
I think starting out with the system you have above w/ an easy to change set of parameters that we can use to tell us how sensitive the model is to that time range (if we choose to look into it). |
Hmm.. okay here is a stab at it. Modeled Secchi as a function of DOY from DOY 100-320, then linearly interpolated between missing values. @lawinslow data are there ^^^ |
` #data from Heidi year.medians=summarise(group_by(mydata, year), median.secchi=median(secchi_m)) #exclude data outside window used for TOHA #create function for seasonal pattern customLogitModel=function(x,max, min){min+((max-min)/(1+exp(.046*(x-192))))} customLogitModelGradient <- deriv( #starting guesses Fit the modelmodel <- nlmer( summary(model) #create time series - if year is missing or bad estimate, use generic secchi.params=data.frame(year=seq(1974,2016)) #create data frame of secchi depths for(i in 1:nrow(secchi.params)) daily.kd$Secchi=na.approx(daily.kd$Secchi, na.rm=F) ggplot()+geom_path(data=daily.kd, aes(date, kd))+theme_classic() ggplot()+geom_path(data=daily.kd, aes(doy, Secchi, group=year, colour=factor(year)))+theme_classic() |
No description provided.
The text was updated successfully, but these errors were encountered: