OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm_snow.h File Reference

Public C API for snow packs, meteorology, and snow model configuration. More...

#include "openswmm_engine.h"
Include dependency graph for openswmm_snow.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SWMM_UebSnowpack
 
struct  SWMM_SnowpackEdit
 
struct  SWMM_SnowState
 
struct  SWMM_SnowLedger
 
struct  SWMM_RadiationConfig
 
struct  SWMM_ClimateCloudConfig
 
struct  SWMM_ClimateMetSummary
 

Typedefs

typedef struct SWMM_UebSnowpack SWMM_UebSnowpack
 
typedef struct SWMM_SnowpackEdit SWMM_SnowpackEdit
 
typedef struct SWMM_SnowState SWMM_SnowState
 
typedef struct SWMM_SnowLedger SWMM_SnowLedger
 
typedef struct SWMM_RadiationConfig SWMM_RadiationConfig
 
typedef struct SWMM_ClimateCloudConfig SWMM_ClimateCloudConfig
 
typedef struct SWMM_ClimateMetSummary SWMM_ClimateMetSummary
 

Enumerations

enum  {
  SWMM_SNOW_DEFAULT = -1 ,
  SWMM_SNOW_DEGREE_DAY = 0 ,
  SWMM_SNOW_UEB = 1
}
 

Functions

SWMM_ENGINE_API int swmm_snow_get_model (SWMM_Engine engine, int *model)
 Read the global snow-process model.
 
SWMM_ENGINE_API int swmm_snow_set_model (SWMM_Engine engine, int model)
 Select the global snow-process model.
 
SWMM_ENGINE_API int swmm_snow_get_step (SWMM_Engine engine, double *seconds)
 Read the snow-process cadence in seconds.
 
SWMM_ENGINE_API int swmm_snow_set_step (SWMM_Engine engine, double seconds)
 Configure the snow-process cadence in seconds.
 
SWMM_ENGINE_API int swmm_ueb_option_get (SWMM_Engine engine, const char *key, char *value, int capacity)
 Read a recognized UEB option in its input-section text format.
 
SWMM_ENGINE_API int swmm_ueb_option_set (SWMM_Engine engine, const char *key, const char *value)
 Parse and assign one UEB option from a textual value.
 
SWMM_ENGINE_API int swmm_ueb_get_monthly_ranges (SWMM_Engine engine, double values[12])
 Read monthly mean diurnal temperature ranges.
 
SWMM_ENGINE_API int swmm_ueb_set_monthly_ranges (SWMM_Engine engine, const double values[12])
 Replace monthly mean diurnal temperature ranges.
 
SWMM_ENGINE_API int swmm_snowpack_get_ueb (SWMM_Engine engine, int pack, SWMM_UebSnowpack *value)
 Read a named pack's UEB/model overrides.
 
SWMM_ENGINE_API int swmm_snowpack_set_ueb (SWMM_Engine engine, int pack, const SWMM_UebSnowpack *value)
 Replace a named pack's UEB/model overrides.
 
SWMM_ENGINE_API int swmm_snowpack_apply (SWMM_Engine engine, const SWMM_SnowpackEdit *edits, int count, char *diagnostic, int capacity)
 Validate and upsert a batch of named snowpacks as one atomic edit.
 
SWMM_ENGINE_API int swmm_subcatch_get_snow_process_state (SWMM_Engine engine, int subcatch, int surface, SWMM_SnowState *value)
 Snapshot one subcatchment snow surface's accepted process state.
 
SWMM_ENGINE_API int swmm_snow_get_ueb_ledger (SWMM_Engine engine, SWMM_SnowLedger *value)
 Aggregate the active UEB subcatchment water and energy inventory.
 
SWMM_ENGINE_API int swmm_climate_get_radiation (SWMM_Engine engine, SWMM_RadiationConfig *value)
 Read the shared radiation site and source selectors.
 
SWMM_ENGINE_API int swmm_climate_set_radiation (SWMM_Engine engine, const SWMM_RadiationConfig *value)
 Replace the shared radiation site and source selectors.
 
SWMM_ENGINE_API int swmm_climate_get_radiation_source (SWMM_Engine engine, int channel, char *value, int capacity)
 Read one radiation source name or meteorology path.
 
SWMM_ENGINE_API int swmm_climate_set_radiation_source (SWMM_Engine engine, int channel, const char *value)
 Bind one radiation source name or meteorology path.
 
SWMM_ENGINE_API int swmm_snow_apply_configuration (SWMM_Engine engine, const char *temperature_rows, const char *ueb_rows, char *diagnostic, int capacity)
 Atomically replace global snow/radiation section configuration.
 
SWMM_ENGINE_API int swmm_climate_get_cloud (SWMM_Engine engine, SWMM_ClimateCloudConfig *config, char *series, int capacity)
 Snapshot the shared heat/climatology cloud configuration and series name.
 
SWMM_ENGINE_API int swmm_climate_preview_meteorology (SWMM_Engine engine, const char *path, SWMM_ClimateMetSummary *result, char *diagnostic, int capacity)
 Read and validate hourly meteorology without changing the model binding.
 
SWMM_ENGINE_API int swmm_snow_apply_configuration_with_cloud (SWMM_Engine engine, const char *temperature_rows, const char *ueb_rows, const SWMM_ClimateCloudConfig *cloud, const char *cloud_series, char *diagnostic, int capacity)
 Atomically replace global snow/radiation section configuration, optionally including clouds.
 

Detailed Description

Public C API for snow packs, meteorology, and snow model configuration.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0

Typedef Documentation

◆ SWMM_ClimateCloudConfig

typedef struct SWMM_ClimateCloudConfig SWMM_ClimateCloudConfig

◆ SWMM_ClimateMetSummary

typedef struct SWMM_ClimateMetSummary SWMM_ClimateMetSummary

◆ SWMM_RadiationConfig

typedef struct SWMM_RadiationConfig SWMM_RadiationConfig

◆ SWMM_SnowLedger

typedef struct SWMM_SnowLedger SWMM_SnowLedger

◆ SWMM_SnowpackEdit

typedef struct SWMM_SnowpackEdit SWMM_SnowpackEdit

◆ SWMM_SnowState

typedef struct SWMM_SnowState SWMM_SnowState

◆ SWMM_UebSnowpack

typedef struct SWMM_UebSnowpack SWMM_UebSnowpack

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SWMM_SNOW_DEFAULT 
SWMM_SNOW_DEGREE_DAY 
SWMM_SNOW_UEB 

Function Documentation

◆ swmm_climate_get_cloud()

SWMM_ENGINE_API int swmm_climate_get_cloud ( SWMM_Engine engine,
SWMM_ClimateCloudConfig * config,
char * series,
int capacity )

Snapshot the shared heat/climatology cloud configuration and series name.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[out]configNon-null configuration: mode 0 default, 1 constant or 2 series, fraction dimensionless and attenuation coefficients in their authored convention.
[out]seriesNon-null writable name buffer; empty when no valid series binding exists.
[in]capacityPositive byte capacity including the terminator; a short buffer returns SWMM_ERR_BUFSIZE and writes nothing.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, SWMM_ERR_BUFSIZE for a short buffer, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
The config structure is assigned only after the series text fits.

◆ swmm_climate_get_radiation()

SWMM_ENGINE_API int swmm_climate_get_radiation ( SWMM_Engine engine,
SWMM_RadiationConfig * value )

Read the shared radiation site and source selectors.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[out]valueNon-null configuration. Site latitude/longitude are degrees, timezone hours and elevation m. Modes are 0 computed, 1 time series, 2 met file; authored flags control legacy-alias preservation.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
If no explicit site exists, resolves a fallback from shared heat/climate location settings.
Here is the call graph for this function:

◆ swmm_climate_get_radiation_source()

SWMM_ENGINE_API int swmm_climate_get_radiation_source ( SWMM_Engine engine,
int channel,
char * value,
int capacity )

Read one radiation source name or meteorology path.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]channel0 shortwave time series, 1 longwave time series, 2 met-file path.
[out]valueNon-null writable string buffer.
[in]capacityPositive byte capacity including the terminator; insufficient capacity returns SWMM_ERR_BUFSIZE and writes nothing.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, SWMM_ERR_BUFSIZE for a short buffer, or SWMM_ERR_BADPARAM for invalid arguments (including an unknown channel). Output storage is caller-owned.
Note
Binds text only; change the source mode separately with swmm_climate_set_radiation(). The returned text is copied and output storage is not retained.

◆ swmm_climate_preview_meteorology()

SWMM_ENGINE_API int swmm_climate_preview_meteorology ( SWMM_Engine engine,
const char * path,
SWMM_ClimateMetSummary * result,
char * diagnostic,
int capacity )

Read and validate hourly meteorology without changing the model binding.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]pathNon-null filename; relative paths resolve from the input file's parent directory.
[out]resultNon-null summary with record count, half-open SWMM-date coverage, and min/max columns in degrees C, relative-humidity percent, m/s, and W/m2 radiation.
[out]diagnosticNon-null writable text buffer; empty on success.
[in]capacityPositive byte capacity; an error message may be safely truncated.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Checks coverage of the configured simulation date interval when it has positive duration. Model configuration and runtime are unchanged.
Here is the call graph for this function:

◆ swmm_climate_set_radiation()

SWMM_ENGINE_API int swmm_climate_set_radiation ( SWMM_Engine engine,
const SWMM_RadiationConfig * value )

Replace the shared radiation site and source selectors.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]valueNon-null configuration. Site latitude/longitude are degrees, timezone hours and elevation m. Modes are 0 computed, 1 time series, 2 met file; authored flags control legacy-alias preservation.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Requires an editable BUILDING or OPENED model; later states return SWMM_ERR_LIFECYCLE. Input data is copied and no input storage is retained.
Here is the call graph for this function:

◆ swmm_climate_set_radiation_source()

SWMM_ENGINE_API int swmm_climate_set_radiation_source ( SWMM_Engine engine,
int channel,
const char * value )

Bind one radiation source name or meteorology path.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]channel0 shortwave time series, 1 longwave time series, 2 met-file path.
[in]valueNon-null null-terminated source text; newline and quote characters are rejected.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Binds text only; change the source mode separately with swmm_climate_set_radiation(). Requires an editable BUILDING or OPENED model; later states return SWMM_ERR_LIFECYCLE. Input data is copied and no input storage is retained.

◆ swmm_snow_apply_configuration()

SWMM_ENGINE_API int swmm_snow_apply_configuration ( SWMM_Engine engine,
const char * temperature_rows,
const char * ueb_rows,
char * diagnostic,
int capacity )

Atomically replace global snow/radiation section configuration.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]temperature_rowsNon-null null-terminated TEMPERATURE section body without headers.
[in]ueb_rowsNon-null null-terminated UEB section body without headers. Empty bodies restore defaults; existing named-pack assignments are preserved.
[out]diagnosticNon-null writable buffer, empty on success or a validation message on failure.
[in]capacityPositive byte capacity; diagnostics are truncated safely to fit.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Parses and validates copies, meteorology coverage and named radiation series before publishing any configuration. Relative met paths resolve from the input-file directory. Requires an editable BUILDING or OPENED model; later states return SWMM_ERR_LIFECYCLE. Input data is copied and no input storage is retained.
Here is the call graph for this function:

◆ swmm_snow_apply_configuration_with_cloud()

SWMM_ENGINE_API int swmm_snow_apply_configuration_with_cloud ( SWMM_Engine engine,
const char * temperature_rows,
const char * ueb_rows,
const SWMM_ClimateCloudConfig * cloud,
const char * cloud_series,
char * diagnostic,
int capacity )

Atomically replace global snow/radiation section configuration, optionally including clouds.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]temperature_rowsNon-null null-terminated TEMPERATURE section body without headers.
[in]ueb_rowsNon-null null-terminated UEB section body without headers. Empty bodies restore defaults; existing named-pack assignments are preserved.
[in]cloudOptional shared cloud configuration; NULL preserves it. Mode is 0 default, 1 constant or 2 time series; fraction is [0, 1] and attenuation coefficients/exponents are finite nonnegative values.
[in]cloud_seriesRequired existing series name for cloud mode 2; ignored when cloud is NULL or a non-series mode is selected.
[out]diagnosticNon-null writable buffer, empty on success or a validation message on failure.
[in]capacityPositive byte capacity; diagnostics are truncated safely to fit.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Parses and validates copies, meteorology coverage and named radiation series before publishing any configuration. Relative met paths resolve from the input-file directory. Requires an editable BUILDING or OPENED model; later states return SWMM_ERR_LIFECYCLE. Input data is copied and no input storage is retained.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ swmm_snow_get_model()

SWMM_ENGINE_API int swmm_snow_get_model ( SWMM_Engine engine,
int * model )

Read the global snow-process model.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[out]modelNon-null result slot: SWMM_SNOW_DEGREE_DAY (0) or SWMM_SNOW_UEB (1).
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Reads authored configuration, not the model resolved for a particular pack.

◆ swmm_snow_get_step()

SWMM_ENGINE_API int swmm_snow_get_step ( SWMM_Engine engine,
double * seconds )

Read the snow-process cadence in seconds.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[out]secondsNon-null result slot for the authored cadence.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Does not advance the snow solver; returns the stored global cadence.

◆ swmm_snow_get_ueb_ledger()

SWMM_ENGINE_API int swmm_snow_get_ueb_ledger ( SWMM_Engine engine,
SWMM_SnowLedger * value )

Aggregate the active UEB subcatchment water and energy inventory.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[out]valueNon-null caller-owned ledger: elapsed_s in seconds, water categories in m3, and energy categories in kJ. Transfers are signed into the inventory; inactive duplicate native columns are excluded.
Returns
SWMM_OK, SWMM_ERR_BADHANDLE, SWMM_ERR_BADPARAM for a null result, or SWMM_ERR_LIFECYCLE when UEB runtime is inactive.
Note
Recomputes stored inventory and residuals from accepted states without advancing them.
Here is the call graph for this function:

◆ swmm_snow_set_model()

SWMM_ENGINE_API int swmm_snow_set_model ( SWMM_Engine engine,
int model )

Select the global snow-process model.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]modelSWMM_SNOW_DEGREE_DAY (0) or SWMM_SNOW_UEB (1).
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Requires an editable BUILDING or OPENED model; later states return SWMM_ERR_LIFECYCLE. Input data is copied and no input storage is retained.

◆ swmm_snow_set_step()

SWMM_ENGINE_API int swmm_snow_set_step ( SWMM_Engine engine,
double seconds )

Configure the snow-process cadence in seconds.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]secondsFinite cadence in [1, 21600] seconds, validated by the SNOW_STEP parser.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Requires an editable BUILDING or OPENED model; later states return SWMM_ERR_LIFECYCLE. Input data is copied and no input storage is retained.
Here is the call graph for this function:

◆ swmm_snowpack_apply()

SWMM_ENGINE_API int swmm_snowpack_apply ( SWMM_Engine engine,
const SWMM_SnowpackEdit * edits,
int count,
char * diagnostic,
int capacity )

Validate and upsert a batch of named snowpacks as one atomic edit.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]editsBorrowed count-element edit array; may be NULL only for count == 0. Pack names must be nonempty, unique case-insensitively within the batch, and contain no newline/quote characters. Surface/removal units follow the existing three snowpack rows; UEB fields use SI units from SWMM_UebSnowpack.
[in]countNonnegative number of pack edits; omitted existing packs are preserved.
[out]diagnosticNon-null writable diagnostic buffer; empty on successful validation.
[in]capacityPositive diagnostic byte capacity; error text may be truncated with a terminator.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Validates on copies before publishing names and pack arrays. No partial pack changes are saved on an argument/validation error. Requires an editable BUILDING or OPENED model; later states return SWMM_ERR_LIFECYCLE. Input data is copied and no input storage is retained.
Here is the call graph for this function:

◆ swmm_snowpack_get_ueb()

SWMM_ENGINE_API int swmm_snowpack_get_ueb ( SWMM_Engine engine,
int pack,
SWMM_UebSnowpack * value )

Read a named pack's UEB/model overrides.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]packZero-based snowpack index, in [0, snowpack count).
[out]valueNon-null destination structure. Forest/drift are dimensionless, ground heat W/m2, extinction depth m and initial energy kJ/m2. An absent row returns SWMM_SNOW_DEFAULT with standard site defaults.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Returns authored/default values without resolving every inherited pack parameter.

◆ swmm_snowpack_set_ueb()

SWMM_ENGINE_API int swmm_snowpack_set_ueb ( SWMM_Engine engine,
int pack,
const SWMM_UebSnowpack * value )

Replace a named pack's UEB/model overrides.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]packZero-based snowpack index, in [0, snowpack count).
[in]valueNon-null configuration structure. Forest/drift are dimensionless, ground heat W/m2, extinction depth m and initial energy kJ/m2. SWMM_SNOW_DEFAULT removes the explicit override; other models and site values are validated by the snowpack parser.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Requires an editable BUILDING or OPENED model; later states return SWMM_ERR_LIFECYCLE. Input data is copied and no input storage is retained.
Here is the call graph for this function:

◆ swmm_subcatch_get_snow_process_state()

SWMM_ENGINE_API int swmm_subcatch_get_snow_process_state ( SWMM_Engine engine,
int subcatch,
int surface,
SWMM_SnowState * value )

Snapshot one subcatchment snow surface's accepted process state.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]subcatchZero-based valid subcatchment index.
[in]surface0 plowable, 1 impervious, or 2 pervious.
[out]valueNon-null caller-owned state. SWE/depth is subarea-averaged m, liquid/sublimation rates m/s, temperatures degrees C, covered-pack energy kJ/m2, water age seconds, and other fractions/age terms dimensionless.
Returns
SWMM_OK, SWMM_ERR_BADHANDLE, SWMM_ERR_BADPARAM for invalid indices/output, SWMM_ERR_LIFECYCLE when runtime state is unavailable, or SWMM_ERR_BADINDEX when the subcatchment has no snowpack assignment.
Note
UEB-only fields are NaN for degree-day snow. Completed source-driver state is selected when it owns the subcatchment; no time integration occurs.
Here is the call graph for this function:

◆ swmm_ueb_get_monthly_ranges()

SWMM_ENGINE_API int swmm_ueb_get_monthly_ranges ( SWMM_Engine engine,
double values[12] )

Read monthly mean diurnal temperature ranges.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[out]valuesNon-null caller-owned array of twelve writable doubles, January through December, in degrees Celsius. An inherited month reads as zero.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
No output array is retained and no solver state is advanced.

◆ swmm_ueb_option_get()

SWMM_ENGINE_API int swmm_ueb_option_get ( SWMM_Engine engine,
const char * key,
char * value,
int capacity )

Read a recognized UEB option in its input-section text format.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]keyNon-null null-terminated UEB key, accepted by uebOptionValue().
[out]valueNon-null writable string buffer; receives the complete value and terminator.
[in]capacityPositive byte capacity including the terminator; insufficient capacity returns SWMM_ERR_BUFSIZE and writes nothing.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, SWMM_ERR_BUFSIZE for a short buffer, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Unknown keys return SWMM_ERR_BADPARAM. Reads authored configuration.
Here is the call graph for this function:

◆ swmm_ueb_option_set()

SWMM_ENGINE_API int swmm_ueb_option_set ( SWMM_Engine engine,
const char * key,
const char * value )

Parse and assign one UEB option from a textual value.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]keyNon-null null-terminated UEB option key.
[in]valueNon-null null-terminated value text, tokenized using input-file syntax.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Output storage is caller-owned.
Note
Requires an editable BUILDING or OPENED model; later states return SWMM_ERR_LIFECYCLE. Input data is copied and no input storage is retained.
Here is the call graph for this function:

◆ swmm_ueb_set_monthly_ranges()

SWMM_ENGINE_API int swmm_ueb_set_monthly_ranges ( SWMM_Engine engine,
const double values[12] )

Replace monthly mean diurnal temperature ranges.

Parameters
[in]engineBorrowed live engine handle; not retained by this call.
[in]valuesNon-null caller-owned array of twelve readable doubles, January through December, in degrees Celsius. Each value must be finite and in [0, 100]; zero selects temperature-source derivation. The whole array is validated before publication.
Returns
SWMM_OK on success, SWMM_ERR_BADHANDLE for an invalid handle, or SWMM_ERR_BADPARAM for invalid arguments. Input storage is borrowed only for the call.
Note
Requires an editable BUILDING or OPENED model; later states return SWMM_ERR_LIFECYCLE. Input data is copied and no input storage is retained.