首页 > 解决方案 > 大气电导方程

问题描述

我开始学习rstudio,我需要制作大气电导方程的函数,

Cat = Vm / 6.25*[ln ((Zm - Zd) / Z0)]^2
where:
Zv - vegetation height
Zd - zero plane displacement ( 0.7 x Zveg )
Z0 - roughness height ( 0.1x Zveg )
Vm - wind speed

the Cat function is in cm/s and I need to return it in mm/s

我应该如何编写这个函数?提前致谢!

标签: rstudio

解决方案


大致,

atmospheric_conductance <- function(arg1, arg2, arg3, ...){
    cat = (arg1 / 6.25 * [ln ((arg2 - arg3) / arg4)]^2)
    return(cat)
}

有关如何在 R 中编写数值计算,请参阅R 操作。


推荐阅读