import_water_balance: Import water balance data

View source: R/import_water_balance.R

import_water_balanceR Documentation

Import water balance data

Description

This function imports daily or monthly water balance data from ClimateAnalyzer.org into R.

Usage

import_water_balance(
  station_id,
  start_year,
  end_year = NULL,
  table_type,
  pet_type,
  soil_water = 100,
  forgiving = "very"
)

Arguments

station_id

The character string of the station_id field from stations.

start_year

The four digit number of the first year of interest.

end_year

The four digit number of the last year of interest. Default is NULL. If NULL, current year will be used.

table_type

A character string for 'daily' or 'monthly' data.

pet_type

A character string for the model type. Options are 'hamon' or 'Penman_Montieth'.

soil_water

a number (integer) for the soil depth in millimeter. Default is 100cm. If you are not sure use the default.

forgiving

A string for the tolerance of the model. Options are 'no', 'mild' and 'very'. Default is 'very'.

Value

A tibble.

See Also

The import_data wrapper function.

Examples

library(climateAnalyzeR)

# Import monthly water balance data using the Hamon model
import_water_balance(station_id = "bryce_canyon_np", start_year = 2015,
                     end_year = 2020, table_type = "monthly", soil_water = 100,
                     pet_type = "hamon", forgiving = "very")

# Import daily water balance data using the Penman Montieth model
import_water_balance(station_id = "pipe_springs_nm", start_year = 2015,
                     end_year = 2020, table_type = "daily", soil_water = 100,
                     pet_type = "Penman_Montieth", forgiving = "very")


scoyoc/climateAnalyzeR documentation built on April 19, 2023, 9:57 p.m.