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,
  soil.name,
  wrt.dir,
  filename,
  verbose = FALSE
)

Arguments

lonlat

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

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’

Value

it returns a list with objects of class ‘soil_profile’. If ‘filename’ is specified it also creates a file with extension ‘soils’, which can be read using function read_apsim_soils.

Author(s)

Brian Collins (University of Southern Queensland) and Fernando Miguez

Examples

## Not run: 
## Get soil profile properties for a single point
  sp1 <- get_worldmodeler_soil_profile(lonlat = c(-93, 42))
  
  if(inherits(sp1[[1]], 'soil_profile')){
    plot(sp1[[1]], property = "Carbon")
  }

## End(Not run)

apsimx documentation built on Sept. 11, 2024, 5:42 p.m.