遇见数据集

Code and Data Description: Rivers as The Largest Nitrogen Source to Chinese Coastal Seas: Its Variations and Controls

收藏
Zenodo2026-03-10 更新2026-05-26 收录
官方服务:

资源简介:

Code and Data Description: Rivers as The Largest Nitrogen Source to Chinese Coastal Seas: Its Variations and Controls This dataset contains the complete R code and associated data used to estimate total nitrogen (TN) flux from 968 Chinese exorheic rivers into coastal seas. The study covers the period from 2021 to 2023 and aims to quantify the spatial and temporal patterns of riverine nitrogen export and its drivers. Code Files The analysis pipeline consists of 8 sequential R scripts, designed for reproducibility and transparency: 1.TNc.R Processes raw total nitrogen concentration (TNc) monitoring data from 157 river stations. Performs quality control, outlier removal, and calculates monthly/annual median concentrations for spatial and temporal analysis. 2.station_var.R Extracts and compiles watershed-level predictor variables (climate, hydrology, land use, soil, and socioeconomic factors) for each monitoring station. Matches station locations to corresponding watershed attributes from GIS databases. 3.correlation analysis.R Conducts Pearson correlation analysis between TN concentrations and watershed predictors. Identifies key environmental drivers of TN variability and supports variable selection for modeling. 4.downstream_var.R Extends the predictor variable dataset to all 968 exorheic rivers (including unmonitored ones) for national-scale extrapolation. Prepares the input data matrix for the downstream prediction models. 5.TNranfor.R Builds and trains a random forest model to predict daily TN concentrations across all rivers. Performs model tuning, validation, and performance assessment using metrics such as NSE, RMSE, and Pbias. 6.Q_var.R Processes and quality-controls river discharge (Q) data from hydrological stations. Compiles discharge-related predictor variables for the discharge model. 7.Q_ranfor.R Constructs a random forest model to predict daily river discharge for all 968 rivers. Validates model performance and ensures consistency with observed discharge data. 8.TNflux.R Calculates daily TN flux (TNf) as the product of predicted TN concentration and discharge. Aggregates daily flux estimates to annual totals for each river and at the national scale. Data Files The dataset includes both raw data, structured to support the code pipeline: Raw Data (raw_data/): quality_2021_2023.csv: Daily total nitrogen (TN) concentration monitoring data from 157 river stations (2021–2023). discharge.csv: Daily river discharge data from 41 hydrological stations. Software and Dependencies R version:4.4.0 or later Key packages: randomForest, tidyverse, lubridate, raster, rgdal (full list in requirements.txt) Usage Notes Set the working directory in each script to match your local file structure (e.g., dir = 'E:/flux2'). Run the scripts in numerical order (1–8) to ensure the correct data flow.

提供机构:
Zenodo
创建时间:
2026-03-10
二维码
社区交流群
二维码
科研交流群
商业服务