Skip to content

markopposite/iceJamModeling

Repository files navigation

Ice Jam Modeling

Repo is organized to lead the user through the process of updating the models for the ice jam monitoring project.

Scripts

  • 01_dataRetrieval.r Pulls data from NWIS AQ, and other sources
  • 02_dataAggegator.r Pieces all data to a large table
  • 03_dataCleaning.r Plotly tooltip to find major event dates, filtering techniques
  • 04_exploratoryPlotting.r Has reach-multiplots prelim regressions, screening etc...
  • 05_autoPullAndPlot.r Pull recent nwis data and plot against gam models
  • 06_fitParamBuild.py Model and save fit params
  • 07_modelCompareTableStats.r Build table, return stats on params, find best fit
  • 08_pubModels.r Build final table of model results and observed data
  • 09_pubPlots.r Best fit models and plots ready for publication
  • 0100_modelResults.py Build and save json of model parameters and site info

Major Steps

  • Data pulled from:

    • NWIS through dataRetrieval R package
    • Aquarius time series web portal
  • Data filtered by:

    • Non-navigational Seasons (Nov - Apr) from Fall 2012 - Spring 2023,
    • For water ${ \ temps> 1 ^{\deg} \ C }$
    • Major events that were left in the dataset after these filters were
      applied were found by inspection using plotly tooltip
      and further screened in R
  • Data modelled with:

    • Non-linear least squares scipy.optimize.curvefit function in sciPy library used to model Stage ( ${S}$ )
    • Polynomial for Lock 9 :
      • ${S = a \times Q^{b} + c } $
    • Linear model for Lock 8, Freeman's Bridge, and Rexford:
      • ${S = S_{DS} + a \times Q + b }$
  • Used ifnnCleanData.csv cleaned up data set for all models: in ../../iceJamData/csvData/CompleteSets

  • Saved publicationModels.csv as complete table with best-fit models and recently (12/23-03/24) observed stages in "../../iceJamData/csvData/"

Further

  • A table with seven models per site run against recent data was saved as bestFitsInpsect.csv in ../../iceJamData/csvData/fitInspection/

  • ./ancillary/

    • The ancillary folder contains code that was used for the exploration and fitting of data for the ice jam modeling project, but that was ultimately unused in the final publication-ready models and plots.

Fit Parameters

(last updated on 03/06/2024):
    L9: [a, b, c] = [8.738932e-02, 0.50406682, 10.784357492]
    L8: [a, b] = [5.99570998e-05, -1.48471579e-01]
    FB: [a, b] = [4.763305e-05, -0.13590172]
    RX: [a, b] = [2.376977e-05, -0.08692065]

USGS Gage Info

  • Lock 9
    • 01354230
    • 42°52'41.8"N 74°02'26.7"W
  • Lock 8
    • 01354330
    • 42°49'41.37"N 73°59'25.34"W
  • Freeman's Bridge
    • 01354500
    • 42°49'49.9"N 73°55'50.7"W
  • Rexford
    • 01355475
    • 42°51'04.0"N 73°53'14.1"W
  • Lock 7
    • 01356000
    • 42°48'15.1"N 73°50'51.6"W

Parameters used in analysis

  • 00065 (Stage)

  • 00060 (Discharge)

  • 00010 (Water Temp)

  • 00020 (Air Temp)

About

R and python, hydrologic data used to create models of river features for flagging ice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published