FireWindWRFFire
Atmosphere -> fire wind of NCAR fire_behavior: Interp_profile (share/interp_mod.F90) interpolates the atmosphere wind column to the fire wind height h_f (namelist fire_wind_height, default 6.096 m; test7 uses 1 m) with the profile the level-set spread uses (WRF-coupled path Interp_wrfwinds_to_cfbm; standalone path Calc_fire_wind -- the same routine on the same column). Heights: the mass-level heights above ground hgt_k = (zw_k + zw_{k+1})/2 - zw_1 from the w-level heights zw (WRF z_at_w). k* is the first mass level at or above h_f among k <= kdmax = NZW - 2. If k* = 1 the wind follows a logarithmic law between the roughness length z0 (u = 0) and the first mass level: u_f = u_1 ln(h_f/z0)/ln(hgt_1/z0); otherwise it is interpolated linearly in ln z between levels k*-1 and k*; if no level reaches h_f the wind of level kdmax is used; if z0 >= h_f the fire wind is 0. With fire_lsm_zcoupling the interpolation is done at the reference height (default 50 m) and the result is extrapolated down to h_f with a neutral log law, u* = kappa |u|/ln(z_ref/z0), |u_f| = (u*/kappa) ln((h_f + z0)/z0), with |u| floored at 0.1 m/s. The horizontal mapping from atmosphere cells to fire cells (nearest column in WRF, bilinear or nearest in the standalone) is outside this component. Compared with EarthSciModels wildland_fire/midflame_wind.esm (u_mf = wind_reduction * u10 with a Baughman-Albini or WAF reduction): only fire_behavior's wind_vinterp_opt = 1 (10 m winds times the WAF of the fuel table) has that form; this component is the default wind_vinterp_opt = 0 log-profile interpolation, which shares no equation with it. Tests: real32 references, rel 1e-5 -- (a) the standalone test7 run (Calc_fire_wind dump, k* = 1 branch, h_f = 1 m), (b) fire_behavior's Interp_profile replayed on WRF columns of test7/wrf.nc by the EarthSciML feedback driver with h_f = 1, 6.096 and 30 m and with fire_lsm_zcoupling (Fortran-generated regimes exercising the first-layer, interior-layer and z-coupling branches).
Description
Atmosphere -> fire wind of NCAR fire_behavior: Interp_profile (share/interp_mod.F90) interpolates the atmosphere wind column to the fire wind height h_f (namelist fire_wind_height, default 6.096 m; test7 uses 1 m) with the profile the level-set spread uses (WRF-coupled path Interp_wrfwinds_to_cfbm; standalone path Calc_fire_wind – the same routine on the same column). Heights: the mass-level heights above ground hgt_k = (zw_k + zw_{k+1})/2 - zw_1 from the w-level heights zw (WRF z_at_w). k* is the first mass level at or above h_f among k <= kdmax = NZW - 2. If k* = 1 the wind follows a logarithmic law between the roughness length z0 (u = 0) and the first mass level: u_f = u_1 ln(h_f/z0)/ln(hgt_1/z0); otherwise it is interpolated linearly in ln z between levels k*-1 and k*; if no level reaches h_f the wind of level kdmax is used; if z0 >= h_f the fire wind is 0. With fire_lsm_zcoupling the interpolation is done at the reference height (default 50 m) and the result is extrapolated down to h_f with a neutral log law, u* = kappa |u|/ln(z_ref/z0), |u_f| = (u*/kappa) ln((h_f + z0)/z0), with |u| floored at 0.1 m/s. The horizontal mapping from atmosphere cells to fire cells (nearest column in WRF, bilinear or nearest in the standalone) is outside this component. Compared with EarthSciModels wildland_fire/midflame_wind.esm (u_mf = wind_reduction * u10 with a Baughman-Albini or WAF reduction): only fire_behavior’s wind_vinterp_opt = 1 (10 m winds times the WAF of the fuel table) has that form; this component is the default wind_vinterp_opt = 0 log-profile interpolation, which shares no equation with it. Tests: real32 references, rel 1e-5 – (a) the standalone test7 run (Calc_fire_wind dump, k* = 1 branch, h_f = 1 m), (b) fire_behavior’s Interp_profile replayed on WRF columns of test7/wrf.nc by the EarthSciML feedback driver with h_f = 1, 6.096 and 30 m and with fire_lsm_zcoupling (Fortran-generated regimes exercising the first-layer, interior-layer and z-coupling branches).
Reference
- NCAR Community Fire Behavior Model (fire_behavior), develop @ eb77580; instrumented fork ctessum-claude/fire_behavior branch earthsciml-instrumented (8d519c6: coupling dumps). WRF v4.8.0 CMake build with ENABLE_CFBM (ctessum-claude/WRF branch earthsciml-instrumented-fire, c01746f).
Parameters
| Name | Units | Default | Description |
|---|---|---|---|
z0 | m | 0.1 | Roughness length of the fire cell (fire_behavior fz0, WRF znt interpolated to the fire mesh). |
fire_wind_height | m | 6.096 | Height above ground at which the fire wind is evaluated (namelist fire_wind_height; WRF default 6.096 m = 20 ft, test7 1 m). |
zcoupling | 1 | 0.0 | 1 if fire_lsm_zcoupling: interpolate at zcoupling_ref and extrapolate to fire_wind_height with a neutral log law; 0 otherwise. |
zcoupling_ref | m | 50.0 | Reference height of the z-coupling option (fire_lsm_zcoupling_ref). |
vk_kappa | 1 | 0.4 | Von Karman constant of interp_mod (VK_KAPPA = 0.4, equal to WRF’s karman). |
wind_floor | m/s | 0.1 | Floor of the interpolated wind speed in the z-coupling extrapolation (max(wsf, 0.1)). |
Observed
| Name | Units | Default | Description |
|---|---|---|---|
u | m/s | Zonal wind on the mass levels of the atmosphere column above the fire cell (WRF u_phy; index k = mass level k, only k <= kdmax is read), consumer-supplied through input_u. | |
v | m/s | Meridional wind on the mass levels (WRF v_phy), consumer-supplied through input_v. | |
zw | m | Height of the w-levels (WRF z_at_w, above sea level; zw_1 = surface), consumer-supplied through input_zw. | |
kdmax | 1 | Highest mass level searched, NZW - 2 (Interp_profile kdmax = kfde - 2). | |
hgt | m | Height of mass level k above ground: (zw_k + zw_{k+1})/2 - zw_1 for k < NZW; the last entry k = NZW, where the index k + 1 is clamped to NZW, is zw_NZW - zw_1 (the height of the top w-level, not a mass level). Only k <= kdmax = NZW - 2 is ever searched, which is all WRF computes (Interp_profile fills hgt(kfds:kdmax) of an array dimensioned kfds:kfde - 1 and leaves hgt(kfde - 1) unset); entries NZW - 1 and NZW are never selected. | |
h_loc | m | Height at which the profile is interpolated: zcoupling_ref if zcoupling, else fire_wind_height. | |
above | 1 | 1 where k <= kdmax and hgt_k >= h_loc (candidate levels), else 0. | |
kstar | 1 | First mass level at or above h_loc (min over candidates), kdmax + 1 if none. | |
u_hi | m/s | u at level kstar (0 if kstar > kdmax). | |
v_hi | m/s | v at level kstar. | |
u_lo | m/s | u at level kstar - 1 (0 if kstar = 1). | |
v_lo | m/s | v at level kstar - 1. | |
hgt_hi | m | hgt at level kstar (0 if kstar > kdmax). | |
hgt_lo | m | hgt at level kstar - 1 (0 if kstar = 1). | |
u_last | m/s | u at level kdmax (used when no level reaches h_loc). | |
v_last | m/s | v at level kdmax. | |
w_first | 1 | Log-law weight of the first-layer branch, ln(h_loc/z0)/ln(hgt_1/z0) evaluated at kstar = 1 (1 when kstar > 1). The denominator is replaced by 1 where hgt_hi <= z0, so the expression stays finite in the cases where this branch is not selected (kstar > 1, or h_loc <= z0 where u_interp is 0); whenever the branch is selected hgt_hi >= h_loc > z0, so the selected value is unchanged. | |
w_interior | 1 | Log-linear interpolation weight ln(h_loc/hgt_lo)/ln(hgt_hi/hgt_lo) of the interior branch, as Interp_profile (loglast = log(hgt(k - 1))) – 0 when the branch is not selected (kstar = 1 or kstar > kdmax). hgt_lo is replaced by 1 where it is 0 and the denominator by 1 unless hgt_hi > hgt_lo > 0, so the expression stays finite when not selected; whenever it is selected hgt_hi >= h_loc > hgt_lo > 0, so the selected value is unchanged. | |
u_interp | m/s | u interpolated to h_loc: 0 if h_loc <= z0; u_last if no level reaches h_loc; u_hi w_first if kstar = 1; u_lo + (u_hi - u_lo) w_interior otherwise. | |
v_interp | m/s | v interpolated to h_loc (same branches as u_interp). | |
wsf | m/s | Interpolated wind speed floored at wind_floor (z-coupling). | |
ust_d | m/s | Neutral friction velocity kappa wsf/ln(zcoupling_ref/z0) (z-coupling). | |
wsf1 | m/s | Wind speed extrapolated to fire_wind_height, (ust_d/kappa) ln((fire_wind_height + z0)/z0) (z-coupling). | |
uf | m/s | Fire-mesh zonal wind (fire_behavior uf): u_interp, or wsf1 u_interp/wsf with z-coupling. | |
vf | m/s | Fire-mesh meridional wind (fire_behavior vf). |
Observed expressions
$$ u = \mathrm{input_u}\left(\right) $$Zonal wind on the mass levels of the atmosphere column above the fire cell (WRF u_phy; index k = mass level k, only k <= kdmax is read), consumer-supplied through input_u.
Meridional wind on the mass levels (WRF v_phy), consumer-supplied through input_v.
Height of the w-levels (WRF z_at_w, above sea level; zw_1 = surface), consumer-supplied through input_zw.
Highest mass level searched, NZW - 2 (Interp_profile kdmax = kfde - 2).
$$ hgt = \mathrm{faq}\left(\right) $$Height of mass level k above ground: (zw_k + zw{k+1})/2 - zw_1 for k < NZW; the last entry k = NZW, where the index k + 1 is clamped to NZW, is zw_NZW - zw_1 (the height of the top w-level, not a mass level). Only k <= kdmax = NZW - 2 is ever searched, which is all WRF computes (Interp_profile fills hgt(kfds:kdmax) of an array dimensioned kfds:kfde - 1 and leaves hgt(kfde - 1) unset); entries NZW - 1 and NZW are never selected._
$$ h_{loc} = \mathrm{ifelse}\left(\mathrm{>}\left(zcoupling, 0.5\right), zcoupling_{ref}, fire_{wind\,height}\right) $$Height at which the profile is interpolated: zcoupling_ref if zcoupling, else fire_wind_height.
$$ above = \mathrm{faq}\left(\right) $$1 where k <= kdmax and hgt_k >= h_loc (candidate levels), else 0.
$$ kstar = \mathrm{faq}\left(\right) $$First mass level at or above h_loc (min over candidates), kdmax + 1 if none.
$$ u_{hi} = \mathrm{faq}\left(\right) $$u at level kstar (0 if kstar > kdmax).
$$ v_{hi} = \mathrm{faq}\left(\right) $$v at level kstar.
$$ u_{lo} = \mathrm{faq}\left(\right) $$u at level kstar - 1 (0 if kstar = 1).
$$ v_{lo} = \mathrm{faq}\left(\right) $$v at level kstar - 1.
$$ hgt_{hi} = \mathrm{faq}\left(\right) $$hgt at level kstar (0 if kstar > kdmax).
$$ hgt_{lo} = \mathrm{faq}\left(\right) $$hgt at level kstar - 1 (0 if kstar = 1).
$$ u_{last} = \mathrm{faq}\left(\right) $$u at level kdmax (used when no level reaches h_loc).
$$ v_{last} = \mathrm{faq}\left(\right) $$v at level kdmax.
$$ w_{first} = \mathrm{ifelse}\left(kstar = 1, \frac{\ln\left(\frac{h_{loc}}{z0}\right)}{\mathrm{ifelse}\left(\mathrm{>}\left(hgt_{hi}, z0\right), \ln\left(\frac{hgt_{hi}}{z0}\right), 1.0\right)}, 1.0\right) $$Log-law weight of the first-layer branch, ln(h_loc/z0)/ln(hgt_1/z0) evaluated at kstar = 1 (1 when kstar > 1). The denominator is replaced by 1 where hgt_hi <= z0, so the expression stays finite in the cases where this branch is not selected (kstar > 1, or h_loc <= z0 where u_interp is 0); whenever the branch is selected hgt_hi >= h_loc > z0, so the selected value is unchanged.
$$ w_{interior} = \mathrm{ifelse}\left(\mathrm{and}\left(\mathrm{>}\left(kstar, 1\right), \mathrm{<=}\left(kstar, kdmax\right)\right), \frac{\ln\left(\frac{h_{loc}}{\mathrm{ifelse}\left(\mathrm{>}\left(hgt_{lo}, 0.0\right), hgt_{lo}, 1.0\right)}\right)}{\mathrm{ifelse}\left(\mathrm{and}\left(\mathrm{>}\left(hgt_{lo}, 0.0\right), \mathrm{>}\left(hgt_{hi}, hgt_{lo}\right)\right), \ln\left(\frac{hgt_{hi}}{hgt_{lo}}\right), 1.0\right)}, 0.0\right) $$Log-linear interpolation weight ln(h_loc/hgt_lo)/ln(hgt_hi/hgt_lo) of the interior branch, as Interp_profile (loglast = log(hgt(k - 1))) – 0 when the branch is not selected (kstar = 1 or kstar > kdmax). hgt_lo is replaced by 1 where it is 0 and the denominator by 1 unless hgt_hi > hgt_lo > 0, so the expression stays finite when not selected; whenever it is selected hgt_hi >= h_loc > hgt_lo > 0, so the selected value is unchanged.
$$ u_{interp} = \mathrm{ifelse}\left(\mathrm{>}\left(h_{loc}, z0\right), \mathrm{ifelse}\left(\mathrm{>}\left(kstar, kdmax\right), u_{last}, \mathrm{ifelse}\left(kstar = 1, u_{hi} \cdot w_{first}, u_{lo} + \left(u_{hi} - u_{lo}\right) \cdot w_{interior}\right)\right), 0.0\right) $$u interpolated to h_loc: 0 if h_loc <= z0; u_last if no level reaches h_loc; u_hi w_first if kstar = 1; u_lo + (u_hi - u_lo) w_interior otherwise.
$$ v_{interp} = \mathrm{ifelse}\left(\mathrm{>}\left(h_{loc}, z0\right), \mathrm{ifelse}\left(\mathrm{>}\left(kstar, kdmax\right), v_{last}, \mathrm{ifelse}\left(kstar = 1, v_{hi} \cdot w_{first}, v_{lo} + \left(v_{hi} - v_{lo}\right) \cdot w_{interior}\right)\right), 0.0\right) $$v interpolated to h_loc (same branches as u_interp).
$$ wsf = \mathrm{max}\left(\sqrt{u_{interp}^{2} + v_{interp}^{2}}, wind_{floor}\right) $$Interpolated wind speed floored at wind_floor (z-coupling).
$$ ust_{d} = \frac{wsf \cdot vk_{kappa}}{\ln\left(\frac{zcoupling_{ref}}{z0}\right)} $$Neutral friction velocity kappa wsf/ln(zcoupling_ref/z0) (z-coupling).
$$ wsf1 = \frac{ust_{d}}{vk_{kappa}} \cdot \ln\left(\frac{fire_{wind\,height} + z0}{z0}\right) $$Wind speed extrapolated to fire_wind_height, (ust_d/kappa) ln((fire_wind_height + z0)/z0) (z-coupling).
$$ uf = \mathrm{ifelse}\left(\mathrm{>}\left(zcoupling, 0.5\right), \frac{wsf1 \cdot u_{interp}}{wsf}, u_{interp}\right) $$Fire-mesh zonal wind (fire_behavior uf): u_interp, or wsf1 u_interp/wsf with z-coupling.
$$ vf = \mathrm{ifelse}\left(\mathrm{>}\left(zcoupling, 0.5\right), \frac{wsf1 \cdot v_{interp}}{wsf}, v_{interp}\right) $$Fire-mesh meridional wind (fire_behavior vf).
Raw .esm
Raw .esm JSON (this component)
{
"subsystems": {
"par": {
"ref": "./fire_behavior_parameters.esm"
}
},
"variables": {
"u": {
"type": "unknown",
"units": "m/s",
"shape": [
"wlev"
],
"description": "Zonal wind on the mass levels of the atmosphere column above the fire cell (WRF u_phy; index k = mass level k, only k <= kdmax is read), consumer-supplied through `input_u`."
},
"v": {
"type": "unknown",
"units": "m/s",
"shape": [
"wlev"
],
"description": "Meridional wind on the mass levels (WRF v_phy), consumer-supplied through `input_v`."
},
"zw": {
"type": "unknown",
"units": "m",
"shape": [
"wlev"
],
"description": "Height of the w-levels (WRF z_at_w, above sea level; zw_1 = surface), consumer-supplied through `input_zw`."
},
"z0": {
"type": "parameter",
"units": "m",
"default": 0.1,
"description": "Roughness length of the fire cell (fire_behavior fz0, WRF znt interpolated to the fire mesh)."
},
"fire_wind_height": {
"type": "parameter",
"units": "m",
"default": 6.096,
"description": "Height above ground at which the fire wind is evaluated (namelist fire_wind_height; WRF default 6.096 m = 20 ft, test7 1 m)."
},
"zcoupling": {
"type": "parameter",
"units": "1",
"default": 0.0,
"description": "1 if fire_lsm_zcoupling: interpolate at zcoupling_ref and extrapolate to fire_wind_height with a neutral log law; 0 otherwise."
},
"zcoupling_ref": {
"type": "parameter",
"units": "m",
"default": 50.0,
"description": "Reference height of the z-coupling option (fire_lsm_zcoupling_ref)."
},
"vk_kappa": {
"type": "parameter",
"units": "1",
"default": 0.4,
"description": "Von Karman constant of interp_mod (VK_KAPPA = 0.4, equal to WRF's karman)."
},
"wind_floor": {
"type": "parameter",
"units": "m/s",
"default": 0.1,
"description": "Floor of the interpolated wind speed in the z-coupling extrapolation (max(wsf, 0.1))."
},
"kdmax": {
"type": "unknown",
"units": "1",
"description": "Highest mass level searched, NZW - 2 (Interp_profile kdmax = kfde - 2)."
},
"hgt": {
"type": "unknown",
"units": "m",
"shape": [
"wlev"
],
"description": "Height of mass level k above ground: (zw_k + zw_{k+1})/2 - zw_1 for k < NZW; the last entry k = NZW, where the index k + 1 is clamped to NZW, is zw_NZW - zw_1 (the height of the top w-level, not a mass level). Only k <= kdmax = NZW - 2 is ever searched, which is all WRF computes (Interp_profile fills hgt(kfds:kdmax) of an array dimensioned kfds:kfde - 1 and leaves hgt(kfde - 1) unset); entries NZW - 1 and NZW are never selected."
},
"h_loc": {
"type": "unknown",
"units": "m",
"description": "Height at which the profile is interpolated: zcoupling_ref if zcoupling, else fire_wind_height."
},
"above": {
"type": "unknown",
"units": "1",
"shape": [
"wlev"
],
"description": "1 where k <= kdmax and hgt_k >= h_loc (candidate levels), else 0."
},
"kstar": {
"type": "unknown",
"units": "1",
"description": "First mass level at or above h_loc (min over candidates), kdmax + 1 if none."
},
"u_hi": {
"type": "unknown",
"units": "m/s",
"description": "u at level kstar (0 if kstar > kdmax)."
},
"v_hi": {
"type": "unknown",
"units": "m/s",
"description": "v at level kstar."
},
"u_lo": {
"type": "unknown",
"units": "m/s",
"description": "u at level kstar - 1 (0 if kstar = 1)."
},
"v_lo": {
"type": "unknown",
"units": "m/s",
"description": "v at level kstar - 1."
},
"hgt_hi": {
"type": "unknown",
"units": "m",
"description": "hgt at level kstar (0 if kstar > kdmax)."
},
"hgt_lo": {
"type": "unknown",
"units": "m",
"description": "hgt at level kstar - 1 (0 if kstar = 1)."
},
"u_last": {
"type": "unknown",
"units": "m/s",
"description": "u at level kdmax (used when no level reaches h_loc)."
},
"v_last": {
"type": "unknown",
"units": "m/s",
"description": "v at level kdmax."
},
"w_first": {
"type": "unknown",
"units": "1",
"description": "Log-law weight of the first-layer branch, ln(h_loc/z0)/ln(hgt_1/z0) evaluated at kstar = 1 (1 when kstar > 1). The denominator is replaced by 1 where hgt_hi <= z0, so the expression stays finite in the cases where this branch is not selected (kstar > 1, or h_loc <= z0 where u_interp is 0); whenever the branch is selected hgt_hi >= h_loc > z0, so the selected value is unchanged."
},
"w_interior": {
"type": "unknown",
"units": "1",
"description": "Log-linear interpolation weight ln(h_loc/hgt_lo)/ln(hgt_hi/hgt_lo) of the interior branch, as Interp_profile (loglast = log(hgt(k - 1))) -- 0 when the branch is not selected (kstar = 1 or kstar > kdmax). hgt_lo is replaced by 1 where it is 0 and the denominator by 1 unless hgt_hi > hgt_lo > 0, so the expression stays finite when not selected; whenever it is selected hgt_hi >= h_loc > hgt_lo > 0, so the selected value is unchanged."
},
"u_interp": {
"type": "unknown",
"units": "m/s",
"description": "u interpolated to h_loc: 0 if h_loc <= z0; u_last if no level reaches h_loc; u_hi w_first if kstar = 1; u_lo + (u_hi - u_lo) w_interior otherwise."
},
"v_interp": {
"type": "unknown",
"units": "m/s",
"description": "v interpolated to h_loc (same branches as u_interp)."
},
"wsf": {
"type": "unknown",
"units": "m/s",
"description": "Interpolated wind speed floored at wind_floor (z-coupling)."
},
"ust_d": {
"type": "unknown",
"units": "m/s",
"description": "Neutral friction velocity kappa wsf/ln(zcoupling_ref/z0) (z-coupling)."
},
"wsf1": {
"type": "unknown",
"units": "m/s",
"description": "Wind speed extrapolated to fire_wind_height, (ust_d/kappa) ln((fire_wind_height + z0)/z0) (z-coupling)."
},
"uf": {
"type": "unknown",
"units": "m/s",
"description": "Fire-mesh zonal wind (fire_behavior uf): u_interp, or wsf1 u_interp/wsf with z-coupling."
},
"vf": {
"type": "unknown",
"units": "m/s",
"description": "Fire-mesh meridional wind (fire_behavior vf)."
}
},
"equations": [
{
"lhs": "u",
"rhs": {
"op": "input_u",
"args": []
}
},
{
"lhs": "v",
"rhs": {
"op": "input_v",
"args": []
}
},
{
"lhs": "zw",
"rhs": {
"op": "input_zw",
"args": []
}
},
{
"lhs": "kdmax",
"rhs": {
"op": "-",
"args": [
"NZW",
2
]
}
},
{
"lhs": "hgt",
"rhs": {
"op": "faq",
"output_idx": [
"k"
],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "-",
"args": [
{
"op": "*",
"args": [
0.5,
{
"op": "+",
"args": [
{
"op": "index",
"args": [
"zw",
"k"
]
},
{
"op": "index",
"args": [
"zw",
{
"op": "min",
"args": [
{
"op": "+",
"args": [
"k",
1
]
},
"NZW"
]
}
]
}
]
}
]
},
{
"op": "index",
"args": [
"zw",
1
]
}
]
}
}
},
{
"lhs": "h_loc",
"rhs": {
"op": "ifelse",
"args": [
{
"op": ">",
"args": [
"zcoupling",
0.5
]
},
"zcoupling_ref",
"fire_wind_height"
]
}
},
{
"lhs": "above",
"rhs": {
"op": "faq",
"output_idx": [
"k"
],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "ifelse",
"args": [
{
"op": "and",
"args": [
{
"op": "<=",
"args": [
"k",
"kdmax"
]
},
{
"op": ">=",
"args": [
{
"op": "index",
"args": [
"hgt",
"k"
]
},
"h_loc"
]
}
]
},
1.0,
0.0
]
}
}
},
{
"lhs": "kstar",
"rhs": {
"op": "faq",
"reduce": "min",
"output_idx": [],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "ifelse",
"args": [
{
"op": ">",
"args": [
{
"op": "index",
"args": [
"above",
"k"
]
},
0.5
]
},
"k",
{
"op": "+",
"args": [
"kdmax",
1
]
}
]
}
}
},
{
"lhs": "u_hi",
"rhs": {
"op": "faq",
"output_idx": [],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "*",
"args": [
{
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
"k",
"kstar"
]
},
1.0,
0.0
]
},
{
"op": "index",
"args": [
"u",
"k"
]
}
]
}
}
},
{
"lhs": "v_hi",
"rhs": {
"op": "faq",
"output_idx": [],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "*",
"args": [
{
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
"k",
"kstar"
]
},
1.0,
0.0
]
},
{
"op": "index",
"args": [
"v",
"k"
]
}
]
}
}
},
{
"lhs": "u_lo",
"rhs": {
"op": "faq",
"output_idx": [],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "*",
"args": [
{
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
{
"op": "+",
"args": [
"k",
1
]
},
"kstar"
]
},
1.0,
0.0
]
},
{
"op": "index",
"args": [
"u",
"k"
]
}
]
}
}
},
{
"lhs": "v_lo",
"rhs": {
"op": "faq",
"output_idx": [],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "*",
"args": [
{
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
{
"op": "+",
"args": [
"k",
1
]
},
"kstar"
]
},
1.0,
0.0
]
},
{
"op": "index",
"args": [
"v",
"k"
]
}
]
}
}
},
{
"lhs": "hgt_hi",
"rhs": {
"op": "faq",
"output_idx": [],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "*",
"args": [
{
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
"k",
"kstar"
]
},
1.0,
0.0
]
},
{
"op": "index",
"args": [
"hgt",
"k"
]
}
]
}
}
},
{
"lhs": "hgt_lo",
"rhs": {
"op": "faq",
"output_idx": [],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "*",
"args": [
{
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
{
"op": "+",
"args": [
"k",
1
]
},
"kstar"
]
},
1.0,
0.0
]
},
{
"op": "index",
"args": [
"hgt",
"k"
]
}
]
}
}
},
{
"lhs": "u_last",
"rhs": {
"op": "faq",
"output_idx": [],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "*",
"args": [
{
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
"k",
"kdmax"
]
},
1.0,
0.0
]
},
{
"op": "index",
"args": [
"u",
"k"
]
}
]
}
}
},
{
"lhs": "v_last",
"rhs": {
"op": "faq",
"output_idx": [],
"args": [],
"ranges": {
"k": {
"from": "wlev"
}
},
"expr": {
"op": "*",
"args": [
{
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
"k",
"kdmax"
]
},
1.0,
0.0
]
},
{
"op": "index",
"args": [
"v",
"k"
]
}
]
}
}
},
{
"lhs": "w_first",
"rhs": {
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
"kstar",
1
]
},
{
"op": "/",
"args": [
{
"op": "log",
"args": [
{
"op": "/",
"args": [
"h_loc",
"z0"
]
}
]
},
{
"op": "ifelse",
"args": [
{
"op": ">",
"args": [
"hgt_hi",
"z0"
]
},
{
"op": "log",
"args": [
{
"op": "/",
"args": [
"hgt_hi",
"z0"
]
}
]
},
1.0
]
}
]
},
1.0
]
}
},
{
"lhs": "w_interior",
"rhs": {
"op": "ifelse",
"args": [
{
"op": "and",
"args": [
{
"op": ">",
"args": [
"kstar",
1
]
},
{
"op": "<=",
"args": [
"kstar",
"kdmax"
]
}
]
},
{
"op": "/",
"args": [
{
"op": "log",
"args": [
{
"op": "/",
"args": [
"h_loc",
{
"op": "ifelse",
"args": [
{
"op": ">",
"args": [
"hgt_lo",
0.0
]
},
"hgt_lo",
1.0
]
}
]
}
]
},
{
"op": "ifelse",
"args": [
{
"op": "and",
"args": [
{
"op": ">",
"args": [
"hgt_lo",
0.0
]
},
{
"op": ">",
"args": [
"hgt_hi",
"hgt_lo"
]
}
]
},
{
"op": "log",
"args": [
{
"op": "/",
"args": [
"hgt_hi",
"hgt_lo"
]
}
]
},
1.0
]
}
]
},
0.0
]
}
},
{
"lhs": "u_interp",
"rhs": {
"op": "ifelse",
"args": [
{
"op": ">",
"args": [
"h_loc",
"z0"
]
},
{
"op": "ifelse",
"args": [
{
"op": ">",
"args": [
"kstar",
"kdmax"
]
},
"u_last",
{
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
"kstar",
1
]
},
{
"op": "*",
"args": [
"u_hi",
"w_first"
]
},
{
"op": "+",
"args": [
"u_lo",
{
"op": "*",
"args": [
{
"op": "-",
"args": [
"u_hi",
"u_lo"
]
},
"w_interior"
]
}
]
}
]
}
]
},
0.0
]
}
},
{
"lhs": "v_interp",
"rhs": {
"op": "ifelse",
"args": [
{
"op": ">",
"args": [
"h_loc",
"z0"
]
},
{
"op": "ifelse",
"args": [
{
"op": ">",
"args": [
"kstar",
"kdmax"
]
},
"v_last",
{
"op": "ifelse",
"args": [
{
"op": "==",
"args": [
"kstar",
1
]
},
{
"op": "*",
"args": [
"v_hi",
"w_first"
]
},
{
"op": "+",
"args": [
"v_lo",
{
"op": "*",
"args": [
{
"op": "-",
"args": [
"v_hi",
"v_lo"
]
},
"w_interior"
]
}
]
}
]
}
]
},
0.0
]
}
},
{
"lhs": "wsf",
"rhs": {
"op": "max",
"args": [
{
"op": "sqrt",
"args": [
{
"op": "+",
"args": [
{
"op": "^",
"args": [
"u_interp",
2
]
},
{
"op": "^",
"args": [
"v_interp",
2
]
}
]
}
]
},
"wind_floor"
]
}
},
{
"lhs": "ust_d",
"rhs": {
"op": "/",
"args": [
{
"op": "*",
"args": [
"wsf",
"vk_kappa"
]
},
{
"op": "log",
"args": [
{
"op": "/",
"args": [
"zcoupling_ref",
"z0"
]
}
]
}
]
}
},
{
"lhs": "wsf1",
"rhs": {
"op": "*",
"args": [
{
"op": "/",
"args": [
"ust_d",
"vk_kappa"
]
},
{
"op": "log",
"args": [
{
"op": "/",
"args": [
{
"op": "+",
"args": [
"fire_wind_height",
"z0"
]
},
"z0"
]
}
]
}
]
}
},
{
"lhs": "uf",
"rhs": {
"op": "ifelse",
"args": [
{
"op": ">",
"args": [
"zcoupling",
0.5
]
},
{
"op": "/",
"args": [
{
"op": "*",
"args": [
"wsf1",
"u_interp"
]
},
"wsf"
]
},
"u_interp"
]
}
},
{
"lhs": "vf",
"rhs": {
"op": "ifelse",
"args": [
{
"op": ">",
"args": [
"zcoupling",
0.5
]
},
{
"op": "/",
"args": [
{
"op": "*",
"args": [
"wsf1",
"v_interp"
]
},
"wsf"
]
},
"v_interp"
]
}
}
],
"tests": [
{
"id": "standalone_call10_cell_1_1",
"description": "Reference: NCAR fire_behavior test7 standalone run (80x80 fire cells of 25 m, dt = 0.5 s, num_tiles = 1, wind_vinterp_opt = 0, fire_wind_height = 1 m), default real32 build, Calc_fire_wind dumped in-model by the ctessum-claude/fire_behavior fork (-DESM_DUMP=ON, commit 8d519c6; the atmosphere columns are WRF u/v/z_at_w of test7/wrf.nc already mapped to the fire mesh). Single precision: rel 1e-5. Regime: fire cell (i,j) = (1,1) of the dumped 10x10 block at call 10 (t = 10 s); first-layer log-law branch (hgt_1 ~ 16 m > 1 m).",
"parameter_overrides": {
"z0": 0.11957847326993942,
"fire_wind_height": 1.0,
"zcoupling": 0.0,
"zcoupling_ref": 50.0
},
"expression_template_imports": [
{
"ref": "./tests/standalone_call10_cell_1_1_inputs.esm"
}
],
"time_span": {
"start": 0,
"end": 1
},
"tolerance": {
"rel": 1e-05
},
"assertions": [
{
"variable": "uf",
"time": 0.0,
"expected": 0.8016912937164307,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "vf",
"time": 0.0,
"expected": 3.4108612537384033,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "kstar",
"time": 0.0,
"expected": 1.0,
"tolerance": {
"abs": 0
}
}
]
},
{
"id": "standalone_call10_cell_5_5",
"description": "Reference: NCAR fire_behavior test7 standalone run (80x80 fire cells of 25 m, dt = 0.5 s, num_tiles = 1, wind_vinterp_opt = 0, fire_wind_height = 1 m), default real32 build, Calc_fire_wind dumped in-model by the ctessum-claude/fire_behavior fork (-DESM_DUMP=ON, commit 8d519c6; the atmosphere columns are WRF u/v/z_at_w of test7/wrf.nc already mapped to the fire mesh). Single precision: rel 1e-5. Regime: fire cell (i,j) = (5,5) of the dumped 10x10 block at call 10 (t = 10 s); first-layer log-law branch (hgt_1 ~ 16 m > 1 m).",
"parameter_overrides": {
"z0": 0.11934895068407059,
"fire_wind_height": 1.0,
"zcoupling": 0.0,
"zcoupling_ref": 50.0
},
"expression_template_imports": [
{
"ref": "./tests/standalone_call10_cell_5_5_inputs.esm"
}
],
"time_span": {
"start": 0,
"end": 1
},
"tolerance": {
"rel": 1e-05
},
"assertions": [
{
"variable": "uf",
"time": 0.0,
"expected": 0.8353914022445679,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "vf",
"time": 0.0,
"expected": 3.4221251010894775,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "kstar",
"time": 0.0,
"expected": 1.0,
"tolerance": {
"abs": 0
}
}
]
},
{
"id": "standalone_call10_cell_10_10",
"description": "Reference: NCAR fire_behavior test7 standalone run (80x80 fire cells of 25 m, dt = 0.5 s, num_tiles = 1, wind_vinterp_opt = 0, fire_wind_height = 1 m), default real32 build, Calc_fire_wind dumped in-model by the ctessum-claude/fire_behavior fork (-DESM_DUMP=ON, commit 8d519c6; the atmosphere columns are WRF u/v/z_at_w of test7/wrf.nc already mapped to the fire mesh). Single precision: rel 1e-5. Regime: fire cell (i,j) = (10,10) of the dumped 10x10 block at call 10 (t = 10 s); first-layer log-law branch (hgt_1 ~ 16 m > 1 m).",
"parameter_overrides": {
"z0": 0.11934582144021988,
"fire_wind_height": 1.0,
"zcoupling": 0.0,
"zcoupling_ref": 50.0
},
"expression_template_imports": [
{
"ref": "./tests/standalone_call10_cell_10_10_inputs.esm"
}
],
"time_span": {
"start": 0,
"end": 1
},
"tolerance": {
"rel": 1e-05
},
"assertions": [
{
"variable": "uf",
"time": 0.0,
"expected": 0.7674385905265808,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "vf",
"time": 0.0,
"expected": 3.269270181655884,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "kstar",
"time": 0.0,
"expected": 1.0,
"tolerance": {
"abs": 0
}
}
]
},
{
"id": "standalone_call1_cell_1_1",
"description": "Reference: NCAR fire_behavior test7 standalone run (80x80 fire cells of 25 m, dt = 0.5 s, num_tiles = 1, wind_vinterp_opt = 0, fire_wind_height = 1 m), default real32 build, Calc_fire_wind dumped in-model by the ctessum-claude/fire_behavior fork (-DESM_DUMP=ON, commit 8d519c6; the atmosphere columns are WRF u/v/z_at_w of test7/wrf.nc already mapped to the fire mesh). Single precision: rel 1e-5. Regime: fire cell (1,1) at call 1 (t = 1 s).",
"parameter_overrides": {
"z0": 0.11999999731779099,
"fire_wind_height": 1.0,
"zcoupling": 0.0,
"zcoupling_ref": 50.0
},
"expression_template_imports": [
{
"ref": "./tests/standalone_call1_cell_1_1_inputs.esm"
}
],
"time_span": {
"start": 0,
"end": 1
},
"tolerance": {
"rel": 1e-05
},
"assertions": [
{
"variable": "uf",
"time": 0.0,
"expected": 0.8016327619552612,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "vf",
"time": 0.0,
"expected": 3.407409191131592,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "kstar",
"time": 0.0,
"expected": 1.0,
"tolerance": {
"abs": 0
}
}
]
},
{
"id": "driver_frame10_h6",
"description": "Reference: fire_behavior's Interp_profile (the routine WRF's Interp_wrfwinds_to_cfbm and the standalone Calc_fire_wind both call) replayed by the EarthSciML feedback driver (data/eqwefic/fire_build/feedback_driver) on the nearest WRF column of test7/wrf.nc frame 10 (t = 10 s) for fire cell (1,1), linking the instrumented firelib (real32, commit 8d519c6). A Fortran-generated regime: the fire wind height is overridden to exercise a branch that test7 (1 m) never reaches. Single precision: rel 1e-5. Regime: fire_wind_height = 6.096 m (WRF default): still the first-layer branch (hgt_1 ~ 16 m). The WRF path passes kfde = 45 w-levels (kdmax = 43) where this component's NZW = 44 gives kdmax = 42; the branch selected here is far below either bound.",
"parameter_overrides": {
"z0": 0.11999999731779099,
"fire_wind_height": 6.0960001945495605,
"zcoupling": 0.0,
"zcoupling_ref": 50.0
},
"expression_template_imports": [
{
"ref": "./tests/driver_frame10_h6_inputs.esm"
}
],
"time_span": {
"start": 0,
"end": 1
},
"tolerance": {
"rel": 1e-05
},
"assertions": [
{
"variable": "uf",
"time": 0.0,
"expected": 1.4836384057998657,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "vf",
"time": 0.0,
"expected": 6.312919616699219,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "kstar",
"time": 0.0,
"expected": 1.0,
"tolerance": {
"abs": 0
}
}
]
},
{
"id": "driver_frame10_h30",
"description": "Reference: fire_behavior's Interp_profile (the routine WRF's Interp_wrfwinds_to_cfbm and the standalone Calc_fire_wind both call) replayed by the EarthSciML feedback driver (data/eqwefic/fire_build/feedback_driver) on the nearest WRF column of test7/wrf.nc frame 10 (t = 10 s) for fire cell (1,1), linking the instrumented firelib (real32, commit 8d519c6). A Fortran-generated regime: the fire wind height is overridden to exercise a branch that test7 (1 m) never reaches. Single precision: rel 1e-5. Regime: fire_wind_height = 30 m: interior branch, log-linear between mass levels 1 and 2. The WRF path passes kfde = 45 w-levels (kdmax = 43) where this component's NZW = 44 gives kdmax = 42; the branch selected here is far below either bound.",
"parameter_overrides": {
"z0": 0.11999999731779099,
"fire_wind_height": 30.0,
"zcoupling": 0.0,
"zcoupling_ref": 50.0
},
"expression_template_imports": [
{
"ref": "./tests/driver_frame10_h30_inputs.esm"
}
],
"time_span": {
"start": 0,
"end": 1
},
"tolerance": {
"rel": 1e-05
},
"assertions": [
{
"variable": "uf",
"time": 0.0,
"expected": 1.8860697746276855,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "vf",
"time": 0.0,
"expected": 7.933376312255859,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "kstar",
"time": 0.0,
"expected": 2.0,
"tolerance": {
"abs": 0
}
}
]
},
{
"id": "driver_frame10_zc",
"description": "Reference: fire_behavior's Interp_profile (the routine WRF's Interp_wrfwinds_to_cfbm and the standalone Calc_fire_wind both call) replayed by the EarthSciML feedback driver (data/eqwefic/fire_build/feedback_driver) on the nearest WRF column of test7/wrf.nc frame 10 (t = 10 s) for fire cell (1,1), linking the instrumented firelib (real32, commit 8d519c6). A Fortran-generated regime: the fire wind height is overridden to exercise a branch that test7 (1 m) never reaches. Single precision: rel 1e-5. Regime: fire_lsm_zcoupling with reference height 50 m: interpolation between mass levels 2 and 3 (hgt_2 = 47.7 m < 50 m) then neutral log-law extrapolation to 1 m. The WRF path passes kfde = 45 w-levels (kdmax = 43) where this component's NZW = 44 gives kdmax = 42; the branch selected here is far below either bound.",
"parameter_overrides": {
"z0": 0.11999999731779099,
"fire_wind_height": 1.0,
"zcoupling": 1.0,
"zcoupling_ref": 50.0
},
"expression_template_imports": [
{
"ref": "./tests/driver_frame10_zc_inputs.esm"
}
],
"time_span": {
"start": 0,
"end": 1
},
"tolerance": {
"rel": 1e-05
},
"assertions": [
{
"variable": "uf",
"time": 0.0,
"expected": 0.7116556763648987,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "vf",
"time": 0.0,
"expected": 2.963811159133911,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "kstar",
"time": 0.0,
"expected": 3.0,
"tolerance": {
"abs": 0
}
}
]
},
{
"id": "standalone_call10_cell_9_14",
"description": "The atmosphere column that feeds the FIRE FRONT, added 2026-09-21. Every other standalone regime of this component comes from the 10 x 10 block at the domain origin, which is the only part of the tile the fire_wind dump used to cover and which carries no fire in test7; column (9, 14) is the one nearest fire cell (18, 64), the cell couplings/wildlandfire_behavior.esm is built on. Reached by widening the dump from that block to the whole tile (fork ctessum-claude/fire_behavior, io/coupling_mod.F90 Calc_fire_wind); the widened dump reproduces standalone_call10_cell_1_1's expectations exactly, so this is the same run, the same call 10 = step 20, and the same real32 build. rel 1e-5. NOTE this does NOT let the component be mounted in wildlandfire_behavior.esm: Calc_fire_wind runs on the 19 x 19 ATMOSPHERE grid and the fire mesh values are produced afterwards by Interp_horizontal, which is a genuine bilinear interpolation (5593 distinct uf values over the 80 x 80 fire mesh against 361 atmosphere columns) and is not transcribed. The fire cell's wind is therefore not any single column's -- the nearest, this one, differs by 2.2e-3 m/s.",
"parameter_overrides": {
"z0": 0.11971677839756012,
"fire_wind_height": 1.0,
"zcoupling": 0.0,
"zcoupling_ref": 50.0
},
"expression_template_imports": [
{
"ref": "./tests/standalone_call10_cell_9_14_inputs.esm"
}
],
"time_span": {
"start": 0,
"end": 1
},
"tolerance": {
"rel": 1e-05
},
"assertions": [
{
"variable": "uf",
"time": 0.0,
"expected": 0.7907084226608276,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "vf",
"time": 0.0,
"expected": 3.287985324859619,
"tolerance": {
"rel": 1e-05,
"abs": 1e-09
}
},
{
"variable": "kstar",
"time": 0.0,
"expected": 1.0,
"tolerance": {
"abs": 0
}
}
]
}
]
}