Skip to main content

Cubic spline interpolation of hydrographs

Project description

Smoothing

Cubic Spline Hydrograph Interpolation

This utility is designed to upsample a daily hydrogrph to hourly using cubic spline interpolation.

The utility is designed to work with the following sturcture

Smoothing
├───core - utility codes
├───OUTFILES - directory for data processing outputs
├───USBC_1DAY - directory for input daily time series
└───USBC_PEAKS - directory for input peak flow time series

The input text files are structured as text files saved from MS excel.

A		KERN
B		ISABELLA
C	GMT-08:00	FLOW-RES IN
E		
F		POR
Units		CFS
Type		PER-AVER
1	01Oct1952	403
2	02Oct1952	395
3	03Oct1952	385
4	04Oct1952	384

Basic Usage

import pandas as pd
from core.Spline import spline
from core.dss_util import import_smooth_ts

locations = (
"ISB_POR",
)

inputfile = {}
outfile = {}
peaksfile = {} 

for i in locations:
  inputfile[i] = r"USBC_1DAY/%s.txt" %(i)
  outfile[i] = r"%s_UNREG_SMTHD" %(i)
  peaksfile[i] = False

out_dss = r"OUTFILES\isabella_smooth.dss"

for location in locations:
  spline(inputfile[location], outfile[location], peaksfile[location])
  import_smooth_ts(outfile[location],out_dss,'/ISABELLA/ISABELLA LAKE/FLOW-RES-IN//1HOUR/SYNTHETIC/', day_offset=1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CVHSSmoothing-1.1.tar.gz (9.1 kB view hashes)

Uploaded Source

Built Distribution

CVHSSmoothing-1.1-py3-none-any.whl (14.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page