
Interpolate Atmospheric Profile to New Pressure Levels
interpolate_profile.Rd
This function interpolates a 4D atmospheric variable [lon, lat, lev, time] to a new set of pressure levels using either logarithmic or linear interpolation.
Usage
interpolate_profile(
var4d,
input_pressure,
output_pressure,
log_interp = FALSE,
nthreads = 1
)
Arguments
- var4d
A 4D array [lon, lat, lev, time] representing the atmospheric variable to interpolate.
- input_pressure
A 1D numeric vector representing the original pressure levels in hPa.
- output_pressure
A 1D numeric vector representing the desired output pressure levels in hPa.
- log_interp
Logical. If `TRUE`, performs interpolation in log-pressure space; otherwise, uses linear interpolation.
- nthreads
an integer specifying the number of threads to use for computation (OpenMP). Default is 1.