WindShearModelV1

Enum WindShearModelV1 

Source
pub enum WindShearModelV1 {
    None,
    Logarithmic,
    PowerLaw,
    EkmanSpiral,
}
Expand description

Wire values for EffectsV1::wind_shear_model (0.36.0).

These are the engine’s own model names (see crate::wind_shear), so a v1 request and the CLI’s --wind-shear-model name the same physics with the same spelling. crate::wind_shear::WindShearModel::CustomLayers is deliberately NOT exposed: it needs a caller-supplied layer table that this contract has no field for, and would silently degrade to the surface wind.

Variants§

§

None

No altitude dependence: the request’s wind is used at every height (the historical default, and what an omitted field means).

§

Logarithmic

Logarithmic boundary-layer profile, ln(z / z0) / ln(z_ref / z0).

§

PowerLaw

1/7 power-law boundary-layer profile, (z / z_ref)^(1/7).

§

EkmanSpiral

Ekman spiral. Accepted for parity with the CLI and the engine’s model names, but this solve path’s boundary-layer evaluator has no near-ground closed form for it, so it leaves the wind at the operative value. Enabling it emits a wind_shear_model_not_modeled warning rather than passing silently.

Implementations§

Source§

impl WindShearModelV1

Source

pub fn as_engine_str(self) -> &'static str

The canonical lower-snake name the engine’s wind_shear / cli_api code understands.

Aliases resolve to their canonical spelling here, which is also what the resolved request echoes: "ekman" in, "ekman_spiral" out.

Source

pub fn is_enabled(self) -> bool

Whether this model asks the solver for altitude-dependent wind at all.

"none" must map to enable_wind_shear: false rather than to an enabled solver holding the string "none": crate::cli_api’s shear branch maps any unrecognized model name — "none" included — to the power law, so an enabled-but-"none" solve would quietly run power-law shear.

Trait Implementations§

Source§

impl Clone for WindShearModelV1

Source§

fn clone(&self) -> WindShearModelV1

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WindShearModelV1

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WindShearModelV1

Source§

fn default() -> WindShearModelV1

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for WindShearModelV1

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for WindShearModelV1

Source§

fn eq(&self, other: &WindShearModelV1) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for WindShearModelV1

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for WindShearModelV1

Source§

impl Eq for WindShearModelV1

Source§

impl StructuralPartialEq for WindShearModelV1

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,