importADSOBIN: ADSO/BIN data import function

View source: R/importADSOBIN.R

importADSOBINR Documentation

ADSO/BIN data import function

Description

Import data from ADSO/BIN binary file. It requires an active Python installation with the arinfopy library.

Usage

importADSOBIN(
  file = file.choose(),
  variable = NULL,
  slice = 1,
  deadline = 1,
  k = 1,
  kz = 1,
  dx = 0,
  dy = 0,
  destaggering = FALSE,
  raster.object = FALSE,
  verbose = FALSE
)

Arguments

file

The ADSO/BIN file to be imported.

variable

A string with the name of the variable to be imported.

slice

An integer corresponding to the horizontal slice (vertical level) of 3D variables (default = 1). In the case of a 2D variable, it is ignored.

deadline

An integer representing the temporal deadline (default = 1). It can optionally be a string with date time (see examples).

k

A numeric factor to be applied to x and y coordinates (default = 1).

kz

A numeric factor to be applied to z values to rescale them (default = 1).

dx

A number to shift x coordinates by dx (default = 0).

dy

A number to shift y coordinates by dy (default = 0).

destaggering

Use TRUE to apply destaggering to X and Y coordinates (default = FALSE).

raster.object

Use TRUE to return a raster object instead of a dataframe with (X, Y, Z) columns (default = FALSE).

verbose

Use TRUE to print out basic statistics (default = FALSE).

Details

The importADSIOBIN() function was developed to import data from an ADSO/BIN binary file. It relies on the ‘arinfopy’ (version >= 2.2.0) python library. For more information on the library see the GitHub repository.

For more information on the active python installation, check the documentation of reticulate.

Value

In standard use, importADSOBIN() return a data frame with ⁠(X, Y, Z)⁠ columns. Column Z contains the values of the requested variable. If the raster.object option is set, it returns a RasterLayer object.

See Also

importRaster(), importSurferGrd()

Examples


## Not run: 
# Read ground level (slice = 1) value of variable M001S001.
pm10 <- importADSOBIN(file = "average_2018.bin",
                      variable = "M001S001",
                      slice = 1)

# Read deadline 12 of the second vertical level of temperature:
temperature <- importADSOBIN(file = "swift_surfpro_01-10_01_2018",
                             variable = "TEMPK",
                             slice = 2,
                             deadline = 12)

# Read varibale M001S001 at ground level, at given date and time,
# and print basic information:
nox <- importADSOBIN(file = "conc_01-10_07_2018",
                     variable = "M001S001",
                     slice = 1,
                     deadline = "2018/07/02 12:00",
                     verbose = TRUE)

## End(Not run)


simulariatools documentation built on Nov. 8, 2023, 5:07 p.m.