Newer
Older
#include <vector>
// -------------------------------------------------------------------------- //
void surf_flux_esm_CXX (float *zeta_, float *Rib_, float *Re_, float *B_, float *z0_m_, float *z0_t_, float *Rib_conv_lim_, float *Cm_, float *Ct_, float *Km_, float *Pr_t_inv_,
float *U_, float *dT_, float *Tsemi_, float *dQ_, float *h_, float *in_z0_m_,
const float kappa, const float Pr_t_0_inv, const float Pr_t_inf_inv,
const float alpha_m, const float alpha_h, const float alpha_h_fix,
const float beta_m, const float beta_h, const float Rib_max, const float Re_rough_min,
const float B1_rough, const float B2_rough,
const float B_max_land, const float B_max_ocean, const float B_max_lake,
const float gamma_c, const float Re_visc_min,
const float Pr_m, const float nu_air, const float g,
const int maxiters_charnock, const int maxiters_convection,
const int grid_size)
{
static FluxEsm<float, MemType::CPU, MemType::CPU, MemType::GPU> F;
static FluxEsm<float, MemType::CPU, MemType::CPU, MemType::CPU> F;
F.set_params(grid_size, kappa, Pr_t_0_inv, Pr_t_inf_inv,
alpha_m, alpha_h, alpha_h_fix,
beta_m, beta_h, Rib_max, Re_rough_min,
B1_rough, B2_rough,
B_max_land, B_max_ocean, B_max_lake,
gamma_c, Re_visc_min,
Pr_m, nu_air, g);
F.compute_flux_esm(zeta_, Rib_, Re_, B_, z0_m_, z0_t_, Rib_conv_lim_, Cm_, Ct_, Km_, Pr_t_inv_,
U_, dT_, Tsemi_, dQ_, h_, in_z0_m_,
maxiters_charnock, maxiters_convection);
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
}
void surf_flux_sheba_CXX (float *zeta_, float *Rib_, float *Re_, float *B_, float *z0_m_, float *z0_t_, float *Rib_conv_lim_, float *Cm_, float *Ct_, float *Km_, float *Pr_t_inv_,
float *U_, float *dT_, float *Tsemi_, float *dQ_, float *h_, float *in_z0_m_,
const float kappa, const float Pr_t_0_inv,
const float alpha_m, const float alpha_h,
const float a_m, const float a_h,
const float b_m, const float b_h,
const float c_h,
const float Re_rough_min,
const float B1_rough, const float B2_rough,
const float B_max_land, const float B_max_ocean, const float B_max_lake,
const float gamma_c, const float Re_visc_min,
const float Pr_m, const float nu_air, const float g,
const int maxiters_charnock,
const int grid_size)
{
#ifdef INCLUDE_CUDA
static FluxSheba<float, MemType::CPU, MemType::CPU, MemType::GPU> F;
#else
static FluxSheba<float, MemType::CPU, MemType::CPU, MemType::CPU> F;
#endif
F.set_params(grid_size, kappa, Pr_t_0_inv,
alpha_m, alpha_h,
a_m, a_h,
b_m, b_h,
c_h,
Re_rough_min,
B1_rough, B2_rough,
B_max_land, B_max_ocean, B_max_lake,
gamma_c, Re_visc_min,
Pr_m, nu_air, g);
F.compute_flux_sheba(zeta_, Rib_, Re_, B_, z0_m_, z0_t_, Rib_conv_lim_, Cm_, Ct_, Km_, Pr_t_inv_,
U_, dT_, Tsemi_, dQ_, h_, in_z0_m_,
maxiters_charnock);