Skip to contents

This function extracts EMEP atmospheric deposition data averaged for a specified catchment.

Usage

get_atmo_dep(
  catchment_boundary_path,
  t_ext = "year",
  start_year = 1990,
  end_year = 2022
)

Arguments

catchment_boundary_path

Path to the basin boundary shape file.

t_ext

(optional) String, specifying the EMEP data to access. 'year' for yearly averages, 'month' for monthly averages. Default t_ext = 'year'.

start_year

(optional) Integer representing the starting year for data extraction. Default start_year = 1990.

end_year

Integer representing the ending year for data extraction. Default end_year = 2022.

Value

A dataframe with columns "DATE", "NH4_RF", "NO3_RF", "NH4_DRY", and "NO3_DRY". Values are in SWAT+ units. "NH4_RF" - ammonia nitrogen in rainfall (mg/l), "NO3_RF" - nitrate nitrogen in rainfall (mg/l), NH4_DRY - ammonia nitrogen dry deposition (kg/ha/yr), "NO3_DRY" - nitrate nitrogen dry deposition (kg/ha/yr).

References

See the EMEP website for more information: https://www.emep.int/mscw/mscw_moddata.html

See also

Please read about SWAT+ atmospheric input data on https://swatplus.gitbook.io/io-docs/introduction/climate/atmo.cli.

Examples

if (FALSE) {
  # Specify the path to the basin boundary shape file
  basin_path <- system.file("extdata", "GIS/basin.shp", package = "SWATprepR")
  
  # Get atmospheric deposition data for the catchment
  df <- get_atmo_dep(basin_path)
  
  # Plot results
  ggplot(pivot_longer(df, !DATE, names_to = "par", values_to = "values"), 
  aes(x = DATE, y = values))+
    geom_line()+
    facet_wrap(~par, scales = "free_y")+
    theme_bw()
}