get_worldmodeler_soil_profile: Obtain a synthetic APSIM soil profile from the World Modeler...

View source: R/get_worldmodeler_soil_profile.R

get_worldmodeler_soil_profileR Documentation

Obtain a synthetic APSIM soil profile from the World Modeler database

Description

Retrieves soil data from the World Modeler global database and (optionally) saves it to a soils file

Usage

get_worldmodeler_soil_profile(
  lonlat,
  fix = FALSE,
  check = FALSE,
  soil.name,
  wrt.dir,
  filename,
  verbose = FALSE,
  cleanup = FALSE
)

Arguments

lonlat

Longitude and latitude vector (e.g. c(-93, 42)) or matrix.

fix

whether to fix the soil profiles

check

whether to check the soil profiles

soil.name

optional soil name

wrt.dir

optional directory where to save a file with ‘soils’ extension. If missing it will be written to a temporary directory.

filename

optional name to be used when saving the file

verbose

verbose argument passed to read_apsim_soils

cleanup

argument used to delete the file after download

Value

it creates a file with extension ‘soils’

Author(s)

Brian Collins (University of Southern Queensland) and Fernando Miguez

Examples

## Not run: 
## Get soil profile properties for a single point
if(FALSE){
  tdir <- tempdir()
  sp1 <- get_worldmodeler_soil_profile(lonlat = c(-93, 42), wrt.dir = tdir, 
                                      filename = "temp_soils.soils")
  plot(sp1[[1]], property = "Carbon")
}

## End(Not run)

femiguez/apsimx documentation built on April 13, 2024, 12:04 a.m.