OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::surface Namespace Reference

Namespaces

namespace  ueb
 
namespace  ueb_reference
 

Classes

struct  ClimateSite
 
class  InfilBank
 
class  MeshSnow
 Owned mixed degree-day/UEB snow on remaining mesh weather footprints. Geometry area is horizontal m2; cell slope/aspect are degrees. Water accounts are m3, energy kJ, point energy kJ/m2 and rates m/s. One owner serializes all mutation, borrowing and checkpoint/contact calls. Trial advance protects this snow owner, while shared context weather cursors/diagnostics can still change. Physical ground heat, cover-geometry energy and prescribed energy stay distinct. More...
 
struct  MeshSnowConfig
 
struct  MeshSnowGeometry
 
struct  MeshSnowLedger
 
struct  MeshSnowRow
 One authored pack selection and optional site/geometry override. Missing optionals inherit lower-precedence scope values; explicit zero is a real override. forest is fraction, drift dimensionless, ground_heat W/m2, extinction_depth metres, slope degrees and aspect degrees clockwise north. pack is an unresolved model name or normalized NONE token. More...
 
struct  RadiationSource
 
struct  SnowConfig
 
struct  SnowInputs
 One element's interval weather, with SI point-input units. dt_s is seconds; rain_m/snow_m are interval water-equivalent depths (not rates), Ta_C is Celsius and wind_ms m/s. rh is fraction, Qsi/Qli/Qg incoming W/m2; cosine and horizontal-radiation factors are dimensionless. gamma/ea retain native degree-day F^-1/in-Hg conventions. Individual models may ignore fields. More...
 
class  SnowModel
 Polymorphic point and native-batch snow boundary. One owner serializes state mutation and buffer use. Configure compatible model geometry/materials after allocation; a successful allocation alone does not establish physical snowpack parameters. Derived methods define failure and payload validation; this interface supplies no universal rollback/status. More...
 
struct  SnowOutputs
 Point snow results: interval depths metres and model-specific thermal state. melt_m can include pack drainage, mixed rainfall and instant plow liquid, not only phase change; throughfall_m is bypass rain. swe_m includes retained snow/ free water, cover_frac is dimensionless. Temperatures C, energy kJ/m2. Derived implementations specify which thermal fields are available/defaulted. More...
 
struct  SnowpackConfig
 
struct  SolarIntegral
 
class  SourceSnow
 Per-source-group native/UEB snow ownership and cumulative water balance. Liquid source delivery, stored pack water and atmospheric losses are separate ledgers. Caller supplies a private context/trial and serializes all operations; mutations are immediate and exceptions do not roll back a partially advanced snow owner. SourceWaterDriver provides the enclosing accepted/trial boundary. More...
 
struct  SourceSnowLedger
 
struct  SurfaceElement
 

Typedefs

using DegreeDaySnow = snow::DegreeDaySnow
 

Enumerations

enum class  SnowKind {
  DegreeDay ,
  Ueb
}
 

Functions

InfilBank::Factors infiltrationFactors (const SimulationContext &ctx, double elapsed_s)
 Resolve monthly global factors at the actual independent surface clock.
 
std::string setMeshSnowOption (MeshSnowConfig &config, const std::vector< std::string > &tokens)
 Apply one mesh SNOWMELT/SNOW_STEP option after validating its token form.
 
std::string setMeshSnowRow (MeshSnowConfig &config, const std::vector< std::string > &tokens, bool cell)
 Parse and replace one unresolved mesh snow assignment row.
 
std::vector< std::string > meshSnowOptionRows (const MeshSnowConfig &config)
 Serialize nondefault mesh snow options without validating them.
 
std::vector< std::string > meshSnowRows (const MeshSnowConfig &config, bool cell)
 Serialize one assignment map in deterministic key/schema order.
 
MeshSnowRow resolveMeshSnowRow (const MeshSnowConfig &config, int cell, const std::string &tag)
 Compose mesh-wide, exact-tag and exact-cell snow overrides.
 
bool hasUebSnow (const SimulationContext &context)
 Detect an enabled authored UEB snowpack assignment without initializing it.
 
std::array< double, 10 > nativeSnowResults (const SimulationContext &context, const snow::SnowSoA &state, int subcatch)
 Assemble SI UEB snow-report fields from accepted native owner snapshots.
 
double nativeSnowDepth (const snow::SnowSoA &state, int subcatch)
 Compute the legacy reported solid-snow depth for a native source.
 
double nativeSnowVolume (const snow::SnowSoA &state, int subcatch, double area_ft2)
 Compute physical solid-plus-free-water inventory over actual source area.
 
std::string initializeNativeSnow (SimulationContext &context, snow::SnowSolver &solver)
 Load native degree-day geometry/history and initialize assigned UEB packs.
 
std::array< double, 4 > snowRuntimeForcing (const SimulationContext &context)
 Read the small runtime override key used to invalidate held predictions.
 
bool snowTransientForcing (const SimulationContext &context)
 Test whether temperature or wind has a transient active runtime override.
 
std::string snowModelIdentity (const SimulationContext &context, const snow::SnowSoA &snow)
 Encode the native snow restart compatibility identity.
 
std::string snowForcingIdentity (const SimulationContext &context)
 Encode configuration and actual weather values controlling held snow predictions.
 
void archiveHeldSnow (detail::CompletedSourceArchive &archive, ueb::HeldState &held)
 Stream and validate accepted/predicted lumped UEB history and consumption clocks.
 
void archiveDegreeDaySnow (detail::CompletedSourceArchive &archive, snow::SnowSoA &snow)
 Stream fixed-layout native degree-day dynamic state and shared report histories.
 
std::string saveSnowCheckpoint (const SimulationContext &context, const snow::SnowSoA &snow)
 Encode native degree-day and UEB accepted/held snow state without owner mutation.
 
std::string restoreSnowCheckpoint (SimulationContext &context, snow::SnowSoA &snow, const std::string &bytes, bool apply=true, bool seed=false)
 Decode native snow into a compatible model, optionally as a new hot start.
 
std::string saveCombinedSnowCheckpoint (const SimulationContext &context, const snow::SnowSoA &snow, const MeshSnow *mesh)
 Encode native snow and, when active, the paired mesh snow owner.
 
std::string restoreCombinedSnowCheckpoint (SimulationContext &context, snow::SnowSoA &snow, MeshSnow *mesh, const std::string &bytes, bool apply, bool seed)
 Validate native and mesh snow together before ordinary publication.
 
SolarIntegral solarIntegral (double latitude, double declination, double hour_start, double duration_hours, double slope, double aspect)
 Integrate the positive solar dot product over one fixed-declination interval.
 
std::string setUebOption (SnowConfig &config, const std::vector< std::string > &tokens, bool validate=true)
 Parse one UEB_OPTIONS row into a candidate configuration then publish it.
 
std::vector< std::string > uebOptionRows (const SnowConfig &config)
 Serialize nondefault UEB_OPTIONS settings in deterministic schema order.
 
std::optional< std::string > uebOptionValue (const SnowConfig &config, const std::string &key)
 Read a scalar UEB option's effective value, including its default.
 
std::string setSnowTemperature (SnowConfig &config, const std::vector< std::string > &tokens)
 Parse one snow-related TEMPERATURE row and publish a copied candidate.
 
std::string setSnowpackUeb (SnowConfig &config, int pack, const std::vector< std::string > &tokens)
 Replace one pack's optional UEB site/model override from authored tokens.
 

Typedef Documentation

◆ DegreeDaySnow

Enumeration Type Documentation

◆ SnowKind

enum class openswmm::surface::SnowKind
strong
Enumerator
DegreeDay 
Ueb 

Function Documentation

◆ archiveDegreeDaySnow()

void openswmm::surface::archiveDegreeDaySnow ( detail::CompletedSourceArchive & archive,
snow::SnowSoA & snow )

Stream fixed-layout native degree-day dynamic state and shared report histories.

Parameters
[in,out]archiveNative reader/writer; fixed vector extents must already match.
[in,out]snowCompatible initialized arrays; geometry/material/assignment parameters are not streamed. Dynamic depths retain native feet, age clocks native units and UEB transfer energy its stored units; no unit conversion occurs. Validates finite scalars/arrays and selected nonnegative water/age/flux, removed/ precipitation age and cover bounds. Errors can leave partial archive/array changes; this helper alone neither validates full model identity nor creates a restart.

◆ archiveHeldSnow()

void openswmm::surface::archiveHeldSnow ( detail::CompletedSourceArchive & archive,
ueb::HeldState & held )

Stream and validate accepted/predicted lumped UEB history and consumption clocks.

Parameters
[in,out]archiveMatching native reader/writer; partial consumption/emission can precede exceptions.
[in,out]heldCompatible initialized state; reading replaces accepted/begin/ end inventory, flux, 24-hour thermal memories and duration/elapsed seconds. Validates finite fields, nonnegative inventory, cover/point consistency, flux bounds, clocks and pending accepted-water interpolation within 1e-10 m. Does not check every physical/energy interpolation relation or containing model identity. Throws on invalid fields/archive/allocation; validate into a copy for rollback.
Here is the call graph for this function:

◆ hasUebSnow()

bool openswmm::surface::hasUebSnow ( const SimulationContext & context)

Detect an enabled authored UEB snowpack assignment without initializing it.

Parameters
contextBorrowed subcatchment pack assignments and snow model configuration.
Returns
False when snowmelt ignored, otherwise true for any nonnegative assigned pack whose configured modelFor() is UEB. Does not establish valid parameters, resolved weather, allocated runtime columns or nonzero physical pack water.
Here is the call graph for this function:

◆ infiltrationFactors()

InfilBank::Factors openswmm::surface::infiltrationFactors ( const SimulationContext & ctx,
double elapsed_s )

Resolve monthly global factors at the actual independent surface clock.

Global monthly factors at the mesh evaluation time. The runoff climate cache may already describe a later runoff interval.

Parameters
ctxCompatible initialized options, twelve hydcon adjustments and optional resolved recovery-pattern factor rows; borrowed without changing climate cache.
elapsed_sFinite elapsed simulation seconds yielding a supported calendar month when added to start_date. No separate finite/range validation here.
Returns
Global conductivity adjustment and available recovery-pattern month value, otherwise recovery one. Does not apply subcatchment-specific infiltration patterns, validate factor signs, advance time or reuse possibly later runoff climate factors.
Here is the call graph for this function:

◆ initializeNativeSnow()

std::string openswmm::surface::initializeNativeSnow ( SimulationContext & context,
snow::SnowSolver & solver )

Load native degree-day geometry/history and initialize assigned UEB packs.

Parameters
[in,out]contextCompatible initialized model/options with valid project unit enum, aligned source arrays and physically qualified snowpack parameter/removal rows. Updates UEB runtime through initializeSubcatchments(), then source snow_depth on success. Does not advance context clocks or gate all native loading on ignore-snow.
[in,out]solverResized/reset per-source arrays, then receives global tipm/rnm/ ADC curves, converted degree-day parameters, surface fractions, initial SWE/free water and resolved plowing targets. Free water caps at FWF*initial SWE; zero-area surfaces zero water/SI. init retains some global fields such as removed/season/ age tracking flags, so caller owns fresh/global initialization as appropriate.
Returns
Empty on accepted UEB initialization, otherwise its diagnostic; preceding solver/context changes remain. No all-model parameter/index validation or rollback; allocation/setup exceptions propagate. Caller sets seasonal melt coefficients before stepping, then applies the correct native/UEB ownership lifecycle.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ meshSnowOptionRows()

std::vector< std::string > openswmm::surface::meshSnowOptionRows ( const MeshSnowConfig & config)

Serialize nondefault mesh snow options without validating them.

Parameters
configCoherent authored mode/step configuration.
Returns
Independent rows: YES/NO when mode is non-AUTO, positive step seconds with stream precision17 when overridden. Zero step/inherited default is omitted. Does not emit assignment maps or preserve input spelling/order; uses current stream locale.
Here is the caller graph for this function:

◆ meshSnowRows()

std::vector< std::string > openswmm::surface::meshSnowRows ( const MeshSnowConfig & config,
bool cell )

Serialize one assignment map in deterministic key/schema order.

Parameters
configParser-qualified names/cell keys and finite override values; no escaping or validation of manually inserted quotes/invalid indices occurs here.
cellTrue writes CELL and one-based numeric IDs in ascending order; false writes quoted tag keys in lexical map order, without a TAG prefix.
Returns
Independent body rows with quoted SNOWPACK name then present FC/F/QG/AEP/ SLOPE/ASPECT fields in fixed order, precision17/current locale. Includes NONE assignments and explicit zero overrides; does not expand inherited scopes.
Here is the caller graph for this function:

◆ nativeSnowDepth()

double openswmm::surface::nativeSnowDepth ( const snow::SnowSoA & state,
int subcatch )

Compute the legacy reported solid-snow depth for a native source.

Parameters
stateQualified aligned three-subarea SWE and fractional-area arrays.
subcatchValid original source index, unchecked.
Returns
Area-weighted wsnow in feet, excluding retained free water. Does not convert project units, account for full footprint area or mutate histories. Use nativeSnowVolume() for physical water inventory including free water.
Here is the caller graph for this function:

◆ nativeSnowResults()

std::array< double, 10 > openswmm::surface::nativeSnowResults ( const SimulationContext & context,
const snow::SnowSoA & state,
int subcatch )

Assemble SI UEB snow-report fields from accepted native owner snapshots.

Parameters
contextMatching UEB runtime columns/last flux/sample arrays and parameters.
stateMatching initialized native SnowSoA with valid aligned external, area-fraction and liquid-output arrays; ownership must be stable during reading.
subcatchZero-based source index; invalid, degree-day-owned or insufficient runtime columns returns ten NaNs. Other runtime array extents are caller-qualified.
Returns
Ten values in order: basin SWE m (includes point water), represented energy kJ/m2, surface C, bulk C, albedo, cover fraction, melt m/s, liquid net m/s, sublimation m/s and latest accepted sample-end elapsed seconds. Geometry weights each positive subarea; values are not renormalized over snow-covered fraction. Melt and net may include mixed rainfall. Albedo alone is NaN before any positive-duration sample; other valid-owner initial values still report. No state mutation or live prediction is exposed; caller copies results across concurrent owner updates.
Here is the call graph for this function:

◆ nativeSnowVolume()

double openswmm::surface::nativeSnowVolume ( const snow::SnowSoA & state,
int subcatch,
double area_ft2 )

Compute physical solid-plus-free-water inventory over actual source area.

Parameters
stateQualified aligned three-subarea wsnow/fw/fArea arrays.
subcatchValid original source index, unchecked.
area_ft2Finite nonnegative actual non-LID footprint ft2, excluding LIDs.
Returns
Sum((wsnow+fw)*fraction)*area in ft3, without finite/range validation. Does not include external pending runoff/returns or independently debit stores.

◆ resolveMeshSnowRow()

MeshSnowRow openswmm::surface::resolveMeshSnowRow ( const MeshSnowConfig & config,
int cell,
const std::string & tag )

Compose mesh-wide, exact-tag and exact-cell snow overrides.

Parameters
configBorrowed authored maps; no runtime mutation or qualification.
cellZero-based lookup key; no mesh-bound validation, absent cell just skips.
tagExact case-sensitive tag string; no normalization or mesh membership lookup.
Returns
Independent row after *, then matching tag, then cell overlay. Each present row always replaces pack and only its populated optional fields; absent optional fields inherit earlier values, explicit zero replaces. NONE does not erase inherited optional fields. An entirely absent selection returns empty pack/options. Does not apply enabled mode, resolve pack identity or infer slope/aspect from mesh geometry.
Here is the caller graph for this function:

◆ restoreCombinedSnowCheckpoint()

std::string openswmm::surface::restoreCombinedSnowCheckpoint ( SimulationContext & context,
snow::SnowSoA & snow,
MeshSnow * mesh,
const std::string & bytes,
bool apply,
bool seed )

Validate native and mesh snow together before ordinary publication.

Parameters
[in,out]contextMatching initialized model/forcing and correctly sized report/runtime arrays; apply can replace runtime, reports and append a warning.
[in,out]snowCompatible current native geometry/parameter arrays; dynamic inventory is replaced only when apply is true.
[in,out]meshOptional initialized owner. Nonempty mesh bytes require an active compatible owner; null uses a private inactive validator.
bytesCombined-version-one, standalone native version-two, or empty archive. An absent mesh part clears/seeds configured mesh cells, retaining assignments.
applyFalse fully validates private candidates without publication/warnings; true restores native first, then publishes the mesh candidate.
seedTrue keeps accepted inventory but discards held predictions, clears clocks/cumulative fluxes and rebases initial inventories for a new hot start.
Returns
Empty on success, otherwise compatibility/archive/standard-exception message. Nonempty native decode and mesh validation precede publication. Empty native clearing can partly change live arrays if allocation fails; warning append can fail after both owners were published. Thus an error is not a universal exception rollback guarantee. A seeded old hot start lacking mesh snow emits a warning and starts assigned mesh cells bare. Caller coordinates all other owners.
Here is the call graph for this function:

◆ restoreSnowCheckpoint()

std::string openswmm::surface::restoreSnowCheckpoint ( SimulationContext & context,
snow::SnowSoA & snow,
const std::string & bytes,
bool apply = true,
bool seed = false )

Decode native snow into a compatible model, optionally as a new hot start.

Parameters
[in,out]contextMatching initialized snow/forcing identity and runtime/report array extents. Publication changes runtime and current snow depths in native feet; seed also updates old depths. Report depth includes solid plus free water.
[in,out]snowInitialized geometry/parameter/assignment arrays; nonempty archive is decoded into a private copy before dynamic-state replacement.
bytesExact native version-two bytes or empty for bare snow initialization. Nonempty requires full archive consumption, identity/layout/finite/clock checks and agreement between external report and accepted UEB water within 1e-10 m.
applyFalse performs nonempty decode/seed validation without publication; empty bytes simply succeed. True installs state, or clears live snow for empty bytes.
seedTrue retains accepted water/thermal inventory and histories, closes future predictions, resets clocks/flux/cumulative ledgers and rebases whole non-LID UEB m3/kJ initial inventory. Runtime override key and precipitation-age tracking remain.
Returns
Empty on success or caught standard-exception diagnostic. Nonempty decode protects live owners before publication; empty clearing mutates arrays before fresh runtime allocations, so allocation failure can leave a cleared prefix. Requires correct surrounding context extents; does not rebuild geometry/forcing or qualify other source, mesh, hydraulic and thermal checkpoint owners. Serialize mutations.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveCombinedSnowCheckpoint()

std::string openswmm::surface::saveCombinedSnowCheckpoint ( const SimulationContext & context,
const snow::SnowSoA & snow,
const MeshSnow * mesh )

Encode native snow and, when active, the paired mesh snow owner.

Parameters
contextInitialized model/forcing identity and compatible native runtime; any nonnegative subcatchment pack assignment triggers native serialization even when global snow processing is ignored. Borrowed without mutation.
snowCompatible initialized degree-day/native report arrays.
meshOptional borrowed mesh owner; null/inactive adds no mesh wrapper.
Returns
Native version-two bytes (possibly empty without native assignments), or combined-version-one wrapper containing native and active mesh archives. Native binary representation is implementation-specific. No owner mutation; allocation, archive or inventory validation exceptions propagate. Caller serializes access and pairs this snapshot with all surrounding water/thermal/source owners.
Here is the call graph for this function:

◆ saveSnowCheckpoint()

std::string openswmm::surface::saveSnowCheckpoint ( const SimulationContext & context,
const snow::SnowSoA & snow )

Encode native degree-day and UEB accepted/held snow state without owner mutation.

Parameters
contextCompatible initialized model/runtime, resolved forcing and report layout.
snowCompatible initialized native geometry, parameters and dynamic arrays.
Returns
Native version-two archive binding exact model/forcing identity and including unconsumed UEB predictions, 24-hour temperature memories, clocks and ledgers. Copies state and validates streamed dynamic fields; malformed inventory, allocation and archive errors throw. Caller serializes access; bytes are not portable interchange.
Here is the caller graph for this function:

◆ setMeshSnowOption()

std::string openswmm::surface::setMeshSnowOption ( MeshSnowConfig & config,
const std::vector< std::string > & tokens )

Apply one mesh SNOWMELT/SNOW_STEP option after validating its token form.

Parameters
[in,out]configOwned authored options, mutated on accepted value only. Does not clear assignments, rebuild runtime columns or change global SnowConfig.
tokensExactly two section-excluded tokens. SNOWMELT accepts AUTO/YES/NO; SNOW_STEP accepts DEFAULT (stores zero/inherit) or shared strict seconds/clock syntax with total [1,21600] seconds. Keywords are case insensitive.
Returns
Empty on success, otherwise unknown-key/syntax/range diagnostic retaining config. Numeric step parser uses a temporary SnowConfig; only mesh step is copied. Caller serializes authoring/runtime rebuild and handles allocation exceptions.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMeshSnowRow()

std::string openswmm::surface::setMeshSnowRow ( MeshSnowConfig & config,
const std::vector< std::string > & tokens,
bool cell )

Parse and replace one unresolved mesh snow assignment row.

Parameters
[in,out]configMaps updated after successful row parsing; same-key assignment replaces the whole prior row, so omitted options on that row are discarded.
tokensOptional CELL/TAG prefix (matching cell selector), key, SNOWPACK and nonempty pack name, then unique key/value pairs. Cell keys are finite integral one-based IDs in [1,INT_MAX], stored zero-based; tag keys are case-sensitive and may be * for mesh-wide fallback. Tags/pack names cannot contain CR/LF/double quote; caller tokenizes quoted text before this API. NONE is normalized case-insensitively. Overrides: FC fraction[0,1], F drift>=0, QG signed W/m2, AEP positive metres, SLOPE degrees[0,90), ASPECT degrees[0,360]; all finite and slope/aspect must occur together.
cellTrue targets numeric cell map, false exact tag/default map.
Returns
Empty on success, otherwise syntax/range/duplicate diagnostic retaining maps. Does not check mesh size, tag existence, pack registry or runtime physical compatibility. Allocation exceptions propagate; resolved inheritance is separate.
Here is the caller graph for this function:

◆ setSnowpackUeb()

std::string openswmm::surface::setSnowpackUeb ( SnowConfig & config,
int pack,
const std::vector< std::string > & tokens )

Replace one pack's optional UEB site/model override from authored tokens.

Parameters
[in,out]configPer-pack map updated only after normal parsing/range success.
packNonnegative integer key; existence in a model snowpack registry is not checked here. Replaces any earlier override rather than merging fields.
tokensFc forest fraction[0,1], F drift>=0, Qg ground heat W/m2 (signed), aep positive extinction metres, optional finite U0 point energy kJ/m2, optional MODEL DEGREE_DAY/UEB. Exactly these trailing fields; keywords case insensitive. Default new override model is UEB even if global model is degree-day; omitted site fields are not inherited from an earlier override. No native unit conversion.
Returns
Empty after map assignment, otherwise syntax/value/range diagnostic. No runtime column initialization, site pressure update or source state mutation; allocation exceptions propagate. Caller binds valid model pack identity later.
Here is the caller graph for this function:

◆ setSnowTemperature()

std::string openswmm::surface::setSnowTemperature ( SnowConfig & config,
const std::vector< std::string > & tokens )

Parse one snow-related TEMPERATURE row and publish a copied candidate.

Parameters
[in,out]configCurrent configuration, retained on normal refusal. Runtime weather/solver caches are not rebuilt by this setter.
tokensSection-excluded exact row: SITE(lat[-90,90],lon east[-180,180],UTC hours[-14,14],elevation metres[-500,10000]); SNOWMELT_MODEL(DEGREE_DAY/UEB); SNOW_STEP(seconds or hh:mm[:ss], total[1,21600]); MET_FILE(nonempty token path); or SHORTWAVE/LONGWAVE(COMPUTED,FILE,TIMESERIES name). Keywords case insensitive. Numeric SITE/step values must be finite; clock hours/minutes are nonnegative integers, minutes/seconds below60, fractional seconds allowed. Plain seconds can be fractional. SNOW_STEP updates both step and Parameters.max_step. Path/series names are retained as tokens without file existence/name/coverage checks.
Returns
Empty on success, otherwise diagnostic. Records model_authored/radiation authored flags and clears stale radiation series when selecting COMPUTED/FILE. Does not run full Parameters validation or apply SITE to climate state here. Copy/string/allocation exceptions propagate before candidate publication.
Here is the caller graph for this function:

◆ setUebOption()

std::string openswmm::surface::setUebOption ( SnowConfig & config,
const std::vector< std::string > & tokens,
bool validate = true )

Parse one UEB_OPTIONS row into a candidate configuration then publish it.

Parameters
[in,out]configCurrent coherent configuration; normal rejection retains it. Caller serializes updates with runtime initialization/forcing and applies any required runtime invalidation separately.
tokensSection-excluded token list: key/value exactly, except BC_MONTHLY requires integer month1..12 and a finite temperature range in (0,100] C. Keywords are case insensitive; whitespace/quotes have already been tokenized by caller. SURFACE_TEMP accepts EQUILIBRIUM/MODIFIED_FORCE_RESTORE; PRECIP_SPLIT accepts UEB/DIVT. Numeric parameter keys are Z0,ZM,KS,KSAT,LC,DE,RHO_S,RHO_G,CG,LAMBDA_S, LAMBDA_G,OMEGA_LF,R,FSTAB,TR,TB,ABG,ALPHA_VO,ALPHA_IRO,EPSILON,DNEWS,R3,CV,CIR, plus BC_A/BC_C. Values use the native Parameters units without conversion.
validateTrue validates the full candidate Parameters; false permits transient physical parameter combinations during multi-row input assembly, which must be qualified before use. Bristow-Campbell comparisons always enforce BC_A in (0,1] and BC_C>0 for coherent finite input configuration.
Returns
Empty after replacement, otherwise syntax/key/range/parameter diagnostic. No file/source binding, runtime state update or partial normal mutation. Copy/map/ string allocations can throw; this is not a runtime solver reconfiguration seam.
Here is the caller graph for this function:

◆ snowForcingIdentity()

std::string openswmm::surface::snowForcingIdentity ( const SimulationContext & context)

Encode configuration and actual weather values controlling held snow predictions.

Parameters
contextInitialized snow/heat/weather configuration and resolved tables; valid table indices or missing-index sentinels are required.
Returns
Native binary compatibility bytes including UEB options/site/BC ranges, radiation/cloud/solar settings, native weather options/monthly adjustments, daily and hourly records and values of referenced series. Binds values, not paths alone; does not advance weather/table cursors. Runtime override mode/value has a separate key from snowRuntimeForcing(). Copy/allocation/archive exceptions propagate.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ snowModelIdentity()

std::string openswmm::surface::snowModelIdentity ( const SimulationContext & context,
const snow::SnowSoA & snow )

Encode the native snow restart compatibility identity.

Parameters
contextInitialized named subcatchments/packs, geometry, snow configuration and resolved weather/series values; borrowed without advancing lookup cursors.
snowCompatible native fraction/external-owner/ADC and degree-day parameters.
Returns
Native binary bytes binding forcing, names/order, pack assignments, areas, pack/removal data, formulation/options/site, surface fractions, per-pack settings, SI/plowing modes, depletion curves and thermal coefficients. Not display text, cryptographic authentication or a portable schema; allocation/archive errors throw.
Here is the caller graph for this function:

◆ snowRuntimeForcing()

std::array< double, 4 > openswmm::surface::snowRuntimeForcing ( const SimulationContext & context)

Read the small runtime override key used to invalidate held predictions.

Parameters
contextBorrowed forcing state; no mutation.
Returns
Temperature mode/value then wind mode/value as four doubles. NONE forces its value slot to zero. Values retain native override units (Fahrenheit, mph); persistence, rain, other weather and full model identity are not encoded here.
Here is the caller graph for this function:

◆ snowTransientForcing()

bool openswmm::surface::snowTransientForcing ( const SimulationContext & context)

Test whether temperature or wind has a transient active runtime override.

Parameters
contextBorrowed forcing state.
Returns
True when either corresponding mode is not NONE and persistence is RESET; false otherwise. Does not inspect rain or consume/reset any override.
Here is the caller graph for this function:

◆ solarIntegral()

SolarIntegral openswmm::surface::solarIntegral ( double latitude,
double declination,
double hour_start,
double duration_hours,
double slope,
double aspect )

Integrate the positive solar dot product over one fixed-declination interval.

Parameters
latitudeFinite site latitude in degrees north, [-90,90].
declinationFinite solar declination degrees, [-90,90], held fixed for the interval.
hour_startFinite starting solar hour angle in degrees, zero at noon and positive afternoon; wraps by remainder modulo 360.
duration_hoursFinite interval length in (0,24] hours.
slopeFinite plane inclination degrees in [0,90); vertical planes are rejected.
aspectFinite plane aspect degrees clockwise from north, periodic modulo 360.
Returns
Mean positive plane cosine and horizontal cosine, each clamped to [0,1], plus horizontal-area irradiance factor hri=cosine/cos(slope), which can exceed one. Astronomical night and plane self-shadow are excluded by root-split integration.
Exceptions
std::invalid_argumentNonfinite inputs or rejected angle/duration range. Allocations may throw; no model state or clock is modified.
Here is the caller graph for this function:

◆ uebOptionRows()

std::vector< std::string > openswmm::surface::uebOptionRows ( const SnowConfig & config)

Serialize nondefault UEB_OPTIONS settings in deterministic schema order.

Parameters
configQualified source configuration; no value/enum validation here.
Returns
Independent section-body rows: changed temperature method, DIVT flag, changed numeric Parameters in table order, changed BC_A/BC_C, then authored monthly ranges in month order. Numeric text uses stream precision17/current locale. Exact default comparisons control omission. Does not serialize temperature-section SITE/ model/step/radiation/MET_FILE or per-pack rows, nor preserve authored spelling/order.
Here is the caller graph for this function:

◆ uebOptionValue()

std::optional< std::string > openswmm::surface::uebOptionValue ( const SnowConfig & config,
const std::string & key )

Read a scalar UEB option's effective value, including its default.

Parameters
configQualified configuration; borrowed without mutation.
keyCase-insensitive exact option keyword; no trimming/section parsing.
Returns
Independent canonical method/split token or numeric text with precision17; nullopt for unknown keys, including BC_MONTHLY (requires a separate month selector). Does not validate, report authoring provenance or query temperature/per-pack rows.
Here is the caller graph for this function: