marsWritePercentStorageData: Write Percent of Storaged Used Data to Database

View source: R/mars_data_fetch_write_functions.R

marsWritePercentStorageDataR Documentation

Write Percent of Storaged Used Data to Database

Description

Receive vectors of raw and relative percent storage data, calculated with marsPeakStorage_percent, gather data, and write to MARS Analysis performance_percentstorage table

Usage

marsWritePercentStorageData(
  con,
  percentstorageused_peak,
  percentstorageused_relative,
  ow_uid,
  radar_event_uid,
  snapshot_uid,
  observed_simulated_lookup_uid
)

Arguments

con

Formal class PostgreSQL, a connection to the MARS Analysis database

percentstorageused_peak

vector, numeric, peak percent of storage (%)

percentstorageused_relative

vector, numeric, relative percent storage (%)

ow_uid

vector, numeric observation well UID

radar_event_uid

vector, numeric event UIDs for rain events from radar data

snapshot_uid

vector, numeric

observed_simulated_lookup_uid

vector, numeric, 1 if observed, 2 if simulated

Value

TRUE if the write is successful, or an error message if unsuccessful

See Also

marsWriteOvertoppingData, marsWriteDraindownData

Examples


marsWritePercentStorageData(con = mars, 
   percentstorageused_peak = summary_250$percentstorageused_peak,
   percentstorageused_relative = summary_250$percentstorageused_relative,
   ow_uid = summary_250$ow_uid,
   radar_event_uid = summary_250$rainfall_gage_event_uid,
   snapshot_uid = summary_250$snapshot_uid,
   observed_simulated_lookup_uid = summary_250$observed_simulated_lookup_uid)


taywater/pwdgsi documentation built on May 9, 2024, 8:21 p.m.