Skip to contents

Vertically Integrated Moisture Flux (VIMF)

Usage

VIMF(hus, ua, va, pa_pl, nthreads = 1)

Arguments

hus

specific humidity [lon, lat, lev, time]on pressure levels (kg/kg).

ua

zonal wind component [lon, lat, lev, time] on pressure levels (m/s).

va

meridional wind component [lon, lat, lev, time] on pressure levels (m/s).

pa_pl

pressure levels [lev] (hPa).

nthreads

an integer specifying the number of threads to use for computation (OpenMP). Default is 1.

Value

List with two arrays [lon, lat, time] representing the x- and y-components of the computed VIMF (kg/m/s).

Examples

data("ERA5_pl")
hus <- ERA5_pl$hus
ua <- ERA5_pl$ua
va <- ERA5_pl$va
# to hPa
pa_pl <- ERA5_pl$plev / 100
# VIMF
res <- VIMF(hus, ua, va, pa_pl, nthreads = 1)
str(res)
#> List of 2
#>  $ VIMF_x: num [1:9, 1:13, 1:2] -37.5 -35.1 -33.7 -33 -33.5 ...
#>  $ VIMF_y: num [1:9, 1:13, 1:2] -39.9 -41.3 -43.5 -46 -47.7 ...