vicelab / cen-sierra-pywr

Code base for modeling the central Sierra Nevada hydropower systems
3 stars 5 forks source link

Stanislaus new melones index #79

Closed drheinheimer closed 4 years ago

drheinheimer commented 4 years ago
  1. Fix IFR below Goodwin Dam to use the New Melones Index per the NMFS 2009 Bi-Op & 2011 followup. This includes developing a routine to approximate end-of-February New Melones storage in any given Mar-June in the planning model. If the first month in the planning model is March, then actual end-of-Feb storage is used. Otherwise, a linear regression-based estimate is used to approximate end-of-Feb storage from the first planning month, based on historical data. Though this is not perfect, the historical relationship is fairly tight, especially when it matters in the model (e.g., Jan -> end-of-Feb storage relationship is quite tight, with R2=0.94; this will be good enough for modeling purposes, and any on-the-fly estimation from model state and inflow estimates probably wouldn't pay off in terms of time invested and model improvement).
  2. Add/change the broader model to accommodate the above: a. The scheduling model is now available as an attribute of the planning model. I.e., when in planning mode, the scheduling model is available as self.model.scheduling, which allows access to, say, scheduling model nodes, parameters, and recorders. b. the WaterLPParameter.get() method now requires timestep and scenario_index. I.e. they are no longer optional. @asood12 this is important for all models that have this.get(...). If timestep and scenario_index are missing, they need to be added.