Skip to contents

Reads one HaNi NHx or NOy deposition NetCDF (native 5-arcmin grid, total grams N deposited per native cell per year) and aggregates it to WHEP's 0.5-degree grid by summing the 6x6 fine cells inside each 0.5-degree block, since the source quantity is an extensive mass. Returns the summed mass per 0.5-degree cell; converting to a per-hectare rate needs the true cell area and is done downstream by build_n_deposition().

Usage

read_n_deposition(
  species = c("nhx", "noy"),
  hani_dir = NULL,
  years = NULL,
  example = FALSE
)

Source

Tian, H., Bian, Z., Shi, H., Qin, X., Pan, N., Lu, C., Pan, S., Tubiello, F. N., Chang, J., Conchedda, G., Liu, J., Mueller, N., Nishina, K., Xu, R., Yang, J., You, L. and Zhang, B. (2022). History of anthropogenic Nitrogen inputs (HaNi) to the terrestrial biosphere: a 5 arcmin resolution annual dataset from 1860 to 2019. Earth System Science Data 14(10), 4551-4568. doi:10.5194/essd-14-4551-2022

Arguments

species

Which HaNi species to read, "nhx" or "noy".

hani_dir

Path to the directory holding ndep_nhx.nc and ndep_noy.nc. Defaults to Sys.getenv("WHEP_HANI_DIR").

years

Optional integer vector of calendar years to keep. NULL reads every year present in the file.

example

If TRUE, return a small fixture instead of reading data. Defaults to FALSE.

Value

A tibble with lon, lat, year, value_g (total grams N deposited in the 0.5-degree cell that year).

Examples

read_n_deposition(example = TRUE)
#> # A tibble: 1 × 4
#>     lon   lat  year  value_g
#>   <dbl> <dbl> <int>    <dbl>
#> 1 -0.25 -0.25  2020 30800000