Package: preMetabolizer 0.0.0.9000

preMetabolizer: A Utility Package for the streamMetabolizer Package

Tools for preparing environmental time series before fitting stream metabolism models. The package includes helpers for downloading meteorological and elevation data, aligning irregular observations, converting units, and calculating light, pressure, dissolved gas, and water property inputs for streamMetabolizer.

Authors:Connor Brown [aut, cre]

preMetabolizer_0.0.0.9000.tar.gz
preMetabolizer_0.0.0.9000.zip(r-4.7)preMetabolizer_0.0.0.9000.zip(r-4.6)preMetabolizer_0.0.0.9000.zip(r-4.5)
preMetabolizer_0.0.0.9000.tgz(r-4.6-x86_64)preMetabolizer_0.0.0.9000.tgz(r-4.6-arm64)preMetabolizer_0.0.0.9000.tgz(r-4.5-x86_64)preMetabolizer_0.0.0.9000.tgz(r-4.5-arm64)
preMetabolizer_0.0.0.9000.tar.gz(r-4.7-arm64)preMetabolizer_0.0.0.9000.tar.gz(r-4.7-x86_64)preMetabolizer_0.0.0.9000.tar.gz(r-4.6-arm64)preMetabolizer_0.0.0.9000.tar.gz(r-4.6-x86_64)
preMetabolizer_0.0.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
preMetabolizer/json (API)

# Install 'preMetabolizer' in R:
install.packages('preMetabolizer', repos = c('https://connorb.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/connorb/premetabolizer/issues

Pkgdown/docs site:https://connorb.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

dissolved-oxygenhydrologynasanoaastream-metabolismusgswater-dataquartocpp

4.63 score 19 scripts 63 exports 61 dependencies

Last updated from:f1b97fa2d9. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK197
linux-devel-x86_64OK207
source / vignettesOK275
linux-release-arm64OK229
linux-release-x86_64OK201
macos-release-arm64OK149
macos-release-x86_64OK309
macos-oldrel-arm64OK152
macos-oldrel-x86_64OK267
windows-develOK271
windows-releaseOK238
windows-oldrelOK209
wasm-releaseOK172

Exports:calc_Arsatcalc_bin_widthcalc_CH4satcalc_CO2_mgLcalc_CO2_molKgcalc_CO2satcalc_cvcalc_exceedance_probcalc_K0calc_modecalc_N2Osatcalc_N2satcalc_O2satcalc_parcalc_vapor_presscalc_water_densitycalc_water_heightcdo_datacdo_datacategoriescdo_datasetscdo_datatypescdo_locationcategoriescdo_locationscdo_request_countcdo_reset_request_countcdo_stationsclosest_noaa_stationsconvert_flowconvert_from_solar_timeconvert_pressureconvert_to_solar_timecorrect_bpeven_timestepsflag_zget_ghcnhget_nasa_dataget_noaa_ghgget_noaa_stationsget_seasonget_usgs_eleviem_currentiem_dailyiem_networksiem_obhistoryiem_stationiem_stationsks_meso_fw13ks_meso_most_recentks_meso_station_activityks_meso_stationsks_meso_timeseriesks_meso_varsncei_bboxncei_datancei_datasetsncei_stationspCO2_to_xCO2rcpp_calc_exceedance_probread_shptex_meso_currenttex_meso_stationstex_meso_timeseriesxCO2_to_pCO2

Dependencies:askpassbitbit64cachemclassclassIntclicliprcpp11crayoncrulcurlDBIdplyre1071fastmapgenericsgeospheregluehmshttpcodehttr2jsonliteKernSmoothlifecyclelubridatemagrittrMASSmemoisemimenasapoweropensslpillarpkgconfigprettyunitsprogressproxyR6rappdirsRcppreadrrlangs2sfstringistringrSunCalcMeeussystibbletidyselecttimechangetriebeardtzdbunitsurltoolsutf8vctrsvroomwithrwkyyjsonr

Preparing French Creek Data for Stream Metabolism Modeling
Introduction | The french_creek dataset | Remove anomalous values | Ensure even timesteps | Convert datetime to solar time | Calculate modeled light (PAR) | Estimate barometric pressure | Optional: get pressure and observed light from NASA POWER | Calculate O~2~ saturation | Assemble the final tibble | References

Last update: 2026-06-11
Started: 2026-05-09

Chemistry calculations
Introduction | Dissolved oxygen saturation | CO2 partial pressure | Dissolved CO2 concentration | Vapor pressure and solubility | Combine calculations for model input

Last update: 2026-06-11
Started: 2026-05-10

Physical properties and unit conversions
Introduction | Flow conversions | Pressure conversions and elevation correction | Water density and water height | Modeled light

Last update: 2026-05-12
Started: 2026-05-10

Time-series and summary utilities
Introduction | Fill missing timesteps | Convert UTC and solar time | Assign seasons | Flag potential outliers | Summary statistics | Histogram bin widths | Flow exceedance probabilities

Last update: 2026-05-12
Started: 2026-05-10

Analyzing discharge at Kings Creek
Introduction | Load and reshape the data | Convert units | Add season | Time series overview | Flag anomalous values | Flow duration curve | Discharge variability by season | Discharge histogram

Last update: 2026-05-11
Started: 2026-05-09

Finding NOAA stations
Introduction | Study site | Search for stations | Find nearby stations | Download daily weather data | Barometric pressure and PAR | Use station IDs with GHCNh data

Last update: 2026-05-11
Started: 2026-05-10

Downloading Kansas Mesonet data
Introduction | Caching downloaded data | Explore the variable catalog | Discover stations | Check station activity | Check the most recent observation | Retrieve time-series data | Example workflow: monthly precipitation | FW13 fire weather data

Last update: 2026-05-11
Started: 2026-05-09

Working with Iowa Environmental Mesonet data
Introduction | Caching downloaded data | Discover networks and stations | Retrieve current observations | Retrieve one day of observations | Retrieve daily summaries | Practical notes

Last update: 2026-05-11
Started: 2026-05-10

Working with TexMesonet data
Introduction | Caching downloaded data | Discover TWDB stations | Retrieve current observations | Retrieve recent time series | Retrieve one variable | Example workflow: station weather summary | API scope

Last update: 2026-05-11
Started: 2026-05-10

Readme and manuals

Help Manual

Help pageTopics
preMetabolizer: Prepare data for stream metabolism modelingpreMetabolizer-package preMetabolizer
Calculate dissolved argon saturationcalc_Arsat
Calculate histogram bin widthcalc_bin_width
Calculate dissolved methane saturationcalc_CH4sat
Calculate dissolved CO2 concentration in mg/Lcalc_CO2_mgL
Calculate dissolved CO2 concentration in mol/kgcalc_CO2_molKg
Calculate dissolved carbon dioxide saturationcalc_CO2sat
Calculate the coefficient of variationcalc_cv
Calculate flow exceedance probabilitiescalc_exceedance_prob
Calculate the CO2 solubility coefficientcalc_K0
Calculate the mode of a vectorcalc_mode
Calculate dissolved nitrous oxide saturationcalc_N2Osat
Calculate dissolved nitrogen saturationcalc_N2sat
Calculate dissolved oxygen saturationcalc_O2sat
Calculate modeled photosynthetically active radiationcalc_par
Saturation vapor pressure of watercalc_vapor_press
Calculate water densitycalc_water_density
Calculate water height from pressurecalc_water_height
Query the NCEI Climate Data Online (CDO) Web Services v2 APIcdo cdo_data cdo_datacategories cdo_datasets cdo_datatypes cdo_locationcategories cdo_locations cdo_stations
Inspect and reset the NCEI CDO session request countercdo_request_count cdo_reset_request_count
Find NOAA stations near a locationclosest_noaa_stations
Convert stream discharge between unitsconvert_flow
Convert barometric pressure between unitsconvert_pressure
Convert a datetime to local solar timeconvert_from_solar_time convert_to_solar_time
Correct barometric pressure for elevation changecorrect_bp
Fill missing rows in an even time serieseven_timesteps
Flag outliers with robust Z-scoresflag_z
French Creek stream metabolism datafrench_creek
Get GHCNh hourly observationsget_ghcnh
Download NASA POWER hourly dataget_nasa_data
Get NOAA global monthly mean greenhouse gas concentrationsget_noaa_ghg
Get NOAA station informationget_noaa_stations
Determine the astronomical season from a dateget_season
Get elevation from the USGS Elevation Point Query Serviceget_usgs_elev
Get current Iowa Environmental Mesonet observationsiem_current
Get Iowa Environmental Mesonet daily summariesiem_daily
Get Iowa Environmental Mesonet network identifiersiem_networks
Get one day of Iowa Environmental Mesonet observationsiem_obhistory
Get Iowa Environmental Mesonet station metadataiem_station iem_stations
Kings Creek daily water datakings_discharge
Get Kansas Mesonet FW13 dataks_meso_fw13
Get most recent Kansas Mesonet data timestampks_meso_most_recent
Get Kansas Mesonet station activityks_meso_station_activity
Get Kansas Mesonet station informationks_meso_stations
Get Kansas Mesonet time-series dataks_meso_timeseries
Fetch Kansas Mesonet variable metadataks_meso_vars
Compute a bounding box around a pointncei_bbox
Get data from the NCEI Data Service APIncei_data
List available NCEI datasetsncei_datasets
Search for NCEI weather stationsncei_stations
Convert CO2 partial pressure to mole fractionpCO2_to_xCO2
Calculate flow exceedance probabilities with C++rcpp_calc_exceedance_prob
Read a shapefile or zipped shapefileread_shp
Get current TexMesonet datatex_meso_current
Get TexMesonet station informationtex_meso_stations
Get recent TexMesonet time-series datatex_meso_timeseries
Convert CO2 mole fraction to partial pressurexCO2_to_pCO2