Skip to content

Vectorize bulk formulas

Ezra Eisbrenner requested to merge feature/bulk_formula/vectorize into master

Existing bulk formulas will now require numpy arrays as input.

Usage:

from windeval.processing import BulkFormula as BF

U = rho = u = T_s = T_a= np.array([[1,1],[2,2]])

BF("large_and_pond_1981").calculate(U=U, rho=rho, u=u)
BF("trenberth_etal_1990").calculate(U=U, rho=rho, u=u)
BF("yelland_and_taylor_1996").calculate(U=U, rho=rho, u=u)
BF("kara_etal_2000").calculate(U=U, rho=rho, u=u, T_s=T_s, T_a=T_a)
BF("large_and_yeager_2004").calculate(U=U, rho=rho, u=u)
BF("ncep_ncar_2007").calculate(U=U, rho=rho, u=u)  # == BF().calculate(U=U, rho=rho, u=u)

Merge request reports