Learn R Programming

meteoland (version 2.2.2)

read_interpolator: Read interpolator files

Description

Read interpolator files created with write_interpolator

Usage

read_interpolator(filename)

Value

an interpolator (stars) object

Arguments

filename

interpolator file name

Author

Victor Granda García, EMF-CREAF

Details

This function takes the file name of the nc file storing an interpolator object and load it into the work environment

See Also

Other interpolator functions: add_topo(), create_meteo_interpolator(), get_interpolation_params(), set_interpolation_params(), with_meteo(), write_interpolator()

Examples

Run this code

# \donttest{
# example interpolator
data(meteoland_interpolator_example)

# temporal folder
tmp_dir <- tempdir()

# write interpolator
write_interpolator(
  meteoland_interpolator_example,
  file.path(tmp_dir, "meteoland_interpolator_example.nc")
)

# check file exists
file.exists(file.path(tmp_dir, "meteoland_interpolator_example.nc"))

# read it again
read_interpolator(file.path(tmp_dir, "meteoland_interpolator_example.nc"))
# }

Run the code above in your browser using DataLab