Class WindNinja

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class WindNinja : public module_base

Calculates wind speed and direction following the downscaling stategy of Barcons et al. (2018). This is via a library of high-resolution wind field generated with the WindNinja wind flow model. Unless the reference height windspeed is provided, use the scale_wind_speed filter to log-scale the windspeed up to U_R.

Depends from met:

  • Wind at reference height “U_R” [ \( m \cdot s^{-1}\) ]

  • Direction at reference height “vw_dir” [degrees]

Provides:

  • Wind speed at reference height “U_R” [ \( m \cdot s^{-1}\) ]

  • Wind direction ‘vw_dir’ at reference height [degrees]

  • Zonal U at reference height “zonal_u” [ \( m \cdot s^{-1}\) ]

  • Zonal V at reference height “zonal_v” [ \( m \cdot s^{-1}\) ]

Diagnostics:

  • Downscaled windspeed “Ninja_speed” [ \( m \cdot s^{-1}\) ]

  • Interpolated wind field at reference height prior to downscaling “U_R_orig” [ \(m \cdot s^{-1}\)]

  • Interpolated zonal U at level H_Forc “interp_zonal_u” [ \( m \cdot s^{-1}\) ]

  • Interpolated zonal V at level H_Forc “interp_zonal_v” [ \( m \cdot s^{-1}\) ]

  • What lookup map was used “lookup_d” [-]

  • Original wind direction “vw_dir_orig” [degrees]

  • Amount the wind vector direction has been changed “vw_dir_divergence” [degrees]

Configuration:

{
   "ninja_average": true,
   "compute_Sx": true,
   "ninja_recirc": false,
   "Sx_crit", 30.
   "L_avg": 1000.
   "H_forc": 40,
   "Max_spdup": 3.0,
   "Min_spdup": 0.1,
}
ninja_average

Linear interpolation between the closest 2 wind fields from the library

compute_Sx

Use the Winstral Sx parameterization to idenitify and modify lee-side windfield. This will cause a runtime error (conflict) if Winstral_parameters is also a module. This uses an angular window of 30 degrees and a step size of 10 m.

ninja_recirc

Enables the leeside slow down via compute_Sx. Requires "compute_Sx":true.

Sx_crit

Reduce wind speed on the lee side of mountain crest identified by Sx>Sx_crit

..confval:: L_avg

The WindMapper tool uses a radius to compute a mean. This is the length over which that average is done. Normally this will be baked into the parameter name (e.g., Ninja_1000). However, there may be reasons to specifiy it directly. Cannot be used if the parameters have the _Lavg suffix. You likely don’t need to set this.

H_forc
Max_spdup

Limit speed up value to Max_spdup to avoid unrelistic values at crest top

Min_spdup

Limit speed up value to Max_spdup to avoid unrelistic values at crest top

Parameters:

Requires speedup, u, and v parameters named “Ninja%i_U” and “Ninja%i_V” and “Ninja%i” for each of the n directions. Should be generated with WindMapper. The number of directions will be automatically determined as will the Lavg value. These should be computed with the Windmapper tool .

References:

  • Barcons, J., Avila, M., Folch, A. (2018). A wind field downscaling strategy based on domain segmentation and transfer functions Wind Energy 21(6)https://dx.doi.org/10.1002/we.2169

Type:

boolean

Default:

true

Type:

boolean

Default:

true

Type:

boolean

Default:

false

Type:

double

Default:

Type:

int

Default:

None

Type:

double

Default:

40.0

Reference height for input forcing and WindNinja wind field library

Type:

double

Default:

3.0

Type:

double

Default:

3.0

Public Functions

WindNinja(config_file cfg)
~WindNinja()
virtual void run(mesh &domain)
virtual void init(mesh &domain)

Public Members

double ys
double yc
double distance
int N_windfield
bool ninja_average
double H_forc
double Max_spdup
double Min_spdup
int L_avg
bool ninja_recirc
bool compute_Sx
double Sx_crit
boost::shared_ptr<Winstral_parameters> Sx
class data : public face_info

Public Members

double curvature
interpolation interp
double corrected_theta
double W
double temp_u
interpolation interp_smoothing
double W_transf