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

OpenSWMM Engine — Climatology configuration C API. More...

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

Go to the source code of this file.

Classes

struct  SWMM_EvapPreviewSample
 
struct  SWMM_EvapPreviewSummary
 
struct  SWMM_EvapPreviewConfig
 

Macros

#define SWMM_CLIMATE_MONTHS   12
 Number of monthly values in a climate monthly table.
 
#define SWMM_CLIMATE_ADC_POINTS   10
 Number of points in an areal-depletion curve.
 

Typedefs

typedef enum SWMM_TempSource SWMM_TempSource
 Air-temperature data source (matches [TEMPERATURE]).
 
typedef enum SWMM_EvapType SWMM_EvapType
 Evaporation method (matches [EVAPORATION]).
 
typedef enum SWMM_EvapPreviewStatus SWMM_EvapPreviewStatus
 
typedef struct SWMM_EvapPreviewSample SWMM_EvapPreviewSample
 
typedef struct SWMM_EvapPreviewSummary SWMM_EvapPreviewSummary
 
typedef struct SWMM_EvapPreviewConfig SWMM_EvapPreviewConfig
 
typedef enum SWMM_WindType SWMM_WindType
 Wind-speed data source (matches [TEMPERATURE] WINDSPEED).
 
typedef enum SWMM_HumidityType SWMM_HumidityType
 Humidity data source (matches [TEMPERATURE] HUMIDITY).
 
typedef enum SWMM_HumidityVar SWMM_HumidityVar
 Quantity the HUMIDITY values express.
 

Enumerations

enum  SWMM_TempSource {
  SWMM_TEMP_NONE = 0 ,
  SWMM_TEMP_TIMESERIES = 1 ,
  SWMM_TEMP_FILE = 2
}
 Air-temperature data source (matches [TEMPERATURE]). More...
 
enum  SWMM_EvapType {
  SWMM_EVAP_CONSTANT = 0 ,
  SWMM_EVAP_MONTHLY = 1 ,
  SWMM_EVAP_TIMESERIES = 2 ,
  SWMM_EVAP_TEMPERATURE = 3 ,
  SWMM_EVAP_FILE = 4
}
 Evaporation method (matches [EVAPORATION]). More...
 
enum  SWMM_EvapPreviewStatus {
  SWMM_EVAP_PREVIEW_AVAILABLE = 0 ,
  SWMM_EVAP_PREVIEW_HELD = 1 ,
  SWMM_EVAP_PREVIEW_MISSING = 2 ,
  SWMM_EVAP_PREVIEW_ESTIMATED = 3
}
 
enum  SWMM_WindType {
  SWMM_WIND_MONTHLY = 0 ,
  SWMM_WIND_FILE = 1
}
 Wind-speed data source (matches [TEMPERATURE] WINDSPEED). More...
 
enum  SWMM_HumidityType {
  SWMM_HUMIDITY_CONSTANT = 0 ,
  SWMM_HUMIDITY_MONTHLY = 1 ,
  SWMM_HUMIDITY_TIMESERIES = 2
}
 Humidity data source (matches [TEMPERATURE] HUMIDITY). More...
 
enum  SWMM_HumidityVar {
  SWMM_HUMIDITY_RELATIVE = 0 ,
  SWMM_HUMIDITY_DEWPOINT = 1
}
 Quantity the HUMIDITY values express. More...
 

Functions

SWMM_ENGINE_API int swmm_climate_get_temp_source (SWMM_Engine engine, int *source)
 Read the configured air-temperature source.
 
SWMM_ENGINE_API int swmm_climate_set_temp_source (SWMM_Engine engine, int source)
 Set the configured air-temperature source.
 
SWMM_ENGINE_API int swmm_climate_get_temp_timeseries (SWMM_Engine engine, char *buf, int buflen)
 Copy the configured temperature time-series ID.
 
SWMM_ENGINE_API int swmm_climate_set_temp_timeseries (SWMM_Engine engine, const char *ts_id)
 Copy a configured temperature time-series ID.
 
SWMM_ENGINE_API int swmm_climate_get_temp_file_start (SWMM_Engine engine, double *date)
 Read the configured climate-file start date.
 
SWMM_ENGINE_API int swmm_climate_set_temp_file_start (SWMM_Engine engine, double date)
 Set the configured climate-file start date.
 
SWMM_ENGINE_API int swmm_climate_get_temp_units (SWMM_Engine engine, int *units)
 Read the configured climate-file temperature-unit selector.
 
SWMM_ENGINE_API int swmm_climate_set_temp_units (SWMM_Engine engine, int units)
 Set the configured climate-file temperature-unit selector.
 
SWMM_ENGINE_API int swmm_climate_get_elevation (SWMM_Engine engine, double *elev)
 Read the configured site elevation.
 
SWMM_ENGINE_API int swmm_climate_set_elevation (SWMM_Engine engine, double elev)
 Set the configured site elevation.
 
SWMM_ENGINE_API int swmm_climate_get_latitude (SWMM_Engine engine, double *latitude)
 Read the configured site latitude.
 
SWMM_ENGINE_API int swmm_climate_set_latitude (SWMM_Engine engine, double latitude)
 Set the configured site latitude.
 
SWMM_ENGINE_API int swmm_climate_get_longitude_correction (SWMM_Engine engine, double *minutes)
 Read the configured longitude/solar-time correction.
 
SWMM_ENGINE_API int swmm_climate_set_longitude_correction (SWMM_Engine engine, double minutes)
 Set the configured longitude/solar-time correction.
 
SWMM_ENGINE_API int swmm_climate_get_evap_type (SWMM_Engine engine, int *type)
 Read the configured evaporation method.
 
SWMM_ENGINE_API int swmm_climate_set_evap_type (SWMM_Engine engine, int type)
 Set the configured evaporation method.
 
SWMM_ENGINE_API int swmm_climate_get_evap_monthly (SWMM_Engine engine, double *buf, int count)
 Copy all monthly evaporation rates in January through December.
 
SWMM_ENGINE_API int swmm_climate_set_evap_monthly (SWMM_Engine engine, const double *values, int count)
 Replace all monthly evaporation rates in January through December.
 
SWMM_ENGINE_API int swmm_climate_get_evap_timeseries (SWMM_Engine engine, char *buf, int buflen)
 Copy the configured evaporation time-series ID.
 
SWMM_ENGINE_API int swmm_climate_set_evap_timeseries (SWMM_Engine engine, const char *ts_id)
 Copy a configured evaporation time-series ID.
 
SWMM_ENGINE_API int swmm_climate_preview_evaporation (SWMM_Engine engine, double start_date, double end_date, double sample_interval_days, SWMM_EvapPreviewSample *samples, int capacity, int *sample_count, SWMM_EvapPreviewSummary *summary, char *diagnostic, int diagnostic_capacity)
 Preview saved evaporation without runtime forcing.
 
SWMM_ENGINE_API int swmm_climate_preview_evaporation_with_config (SWMM_Engine engine, const SWMM_EvapPreviewConfig *config, double start_date, double end_date, double sample_interval_days, SWMM_EvapPreviewSample *samples, int capacity, int *sample_count, SWMM_EvapPreviewSummary *summary, char *diagnostic, int diagnostic_capacity)
 Preview draft or saved evaporation without runtime forcing.
 
SWMM_ENGINE_API int swmm_climate_get_pan_coeff (SWMM_Engine engine, double *buf, int count)
 Copy all monthly pan coefficients in January through December.
 
SWMM_ENGINE_API int swmm_climate_set_pan_coeff (SWMM_Engine engine, const double *values, int count)
 Replace all monthly pan coefficients in January through December.
 
SWMM_ENGINE_API int swmm_climate_get_evap_recovery (SWMM_Engine engine, char *buf, int buflen)
 Copy the configured soil-moisture recovery pattern ID.
 
SWMM_ENGINE_API int swmm_climate_set_evap_recovery (SWMM_Engine engine, const char *pattern_id)
 Copy a configured soil-moisture recovery pattern ID.
 
SWMM_ENGINE_API int swmm_climate_get_wind_type (SWMM_Engine engine, int *type)
 Read the configured wind-speed source.
 
SWMM_ENGINE_API int swmm_climate_set_wind_type (SWMM_Engine engine, int type)
 Set the configured wind-speed source.
 
SWMM_ENGINE_API int swmm_climate_get_wind_monthly (SWMM_Engine engine, double *buf, int count)
 Copy all monthly average wind speeds in January through December.
 
SWMM_ENGINE_API int swmm_climate_set_wind_monthly (SWMM_Engine engine, const double *values, int count)
 Replace all monthly average wind speeds in January through December.
 
SWMM_ENGINE_API int swmm_climate_get_humidity_type (SWMM_Engine engine, int *type)
 Read the configured humidity source.
 
SWMM_ENGINE_API int swmm_climate_set_humidity_type (SWMM_Engine engine, int type)
 Set the configured humidity source.
 
SWMM_ENGINE_API int swmm_climate_get_humidity_variable (SWMM_Engine engine, int *var)
 Read the configured humidity quantity.
 
SWMM_ENGINE_API int swmm_climate_set_humidity_variable (SWMM_Engine engine, int var)
 Set the configured humidity quantity.
 
SWMM_ENGINE_API int swmm_climate_get_humidity_monthly (SWMM_Engine engine, double *buf, int count)
 Copy all monthly humidity values in January through December.
 
SWMM_ENGINE_API int swmm_climate_set_humidity_monthly (SWMM_Engine engine, const double *values, int count)
 Replace all monthly humidity values in January through December.
 
SWMM_ENGINE_API int swmm_climate_get_humidity_timeseries (SWMM_Engine engine, char *buf, int buflen)
 Copy the configured humidity time-series ID.
 
SWMM_ENGINE_API int swmm_climate_set_humidity_timeseries (SWMM_Engine engine, const char *ts_id)
 Copy a configured humidity time-series ID.
 
SWMM_ENGINE_API int swmm_climate_get_snow_temp (SWMM_Engine engine, double *divide_temp)
 Read the configured snow/rain dividing temperature.
 
SWMM_ENGINE_API int swmm_climate_set_snow_temp (SWMM_Engine engine, double divide_temp)
 Set the configured snow/rain dividing temperature.
 
SWMM_ENGINE_API int swmm_climate_get_ati_weight (SWMM_Engine engine, double *tipm)
 Read the configured antecedent-temperature-index weight.
 
SWMM_ENGINE_API int swmm_climate_set_ati_weight (SWMM_Engine engine, double tipm)
 Set the configured antecedent-temperature-index weight.
 
SWMM_ENGINE_API int swmm_climate_get_neg_melt_ratio (SWMM_Engine engine, double *rnm)
 Read the configured negative-melt-coefficient ratio.
 
SWMM_ENGINE_API int swmm_climate_set_neg_melt_ratio (SWMM_Engine engine, double rnm)
 Set the configured negative-melt-coefficient ratio.
 
SWMM_ENGINE_API int swmm_climate_get_adc_impervious (SWMM_Engine engine, double *buf, int count)
 Copy all impervious areal-depletion fractions in the configured ten-point depletion-curve order.
 
SWMM_ENGINE_API int swmm_climate_set_adc_impervious (SWMM_Engine engine, const double *values, int count)
 Replace all impervious areal-depletion fractions in the configured ten-point depletion-curve order.
 
SWMM_ENGINE_API int swmm_climate_get_adc_pervious (SWMM_Engine engine, double *buf, int count)
 Copy all pervious areal-depletion fractions in the configured ten-point depletion-curve order.
 
SWMM_ENGINE_API int swmm_climate_set_adc_pervious (SWMM_Engine engine, const double *values, int count)
 Replace all pervious areal-depletion fractions in the configured ten-point depletion-curve order.
 
SWMM_ENGINE_API int swmm_climate_get_adjust_temperature (SWMM_Engine engine, double *buf, int count)
 Copy all monthly temperature offsets in January through December.
 
SWMM_ENGINE_API int swmm_climate_set_adjust_temperature (SWMM_Engine engine, const double *values, int count)
 Replace all monthly temperature offsets in January through December.
 
SWMM_ENGINE_API int swmm_climate_get_adjust_evaporation (SWMM_Engine engine, double *buf, int count)
 Copy all monthly evaporation offsets in January through December.
 
SWMM_ENGINE_API int swmm_climate_set_adjust_evaporation (SWMM_Engine engine, const double *values, int count)
 Replace all monthly evaporation offsets in January through December.
 
SWMM_ENGINE_API int swmm_climate_get_adjust_rainfall (SWMM_Engine engine, double *buf, int count)
 Copy all monthly rainfall multipliers in January through December.
 
SWMM_ENGINE_API int swmm_climate_set_adjust_rainfall (SWMM_Engine engine, const double *values, int count)
 Replace all monthly rainfall multipliers in January through December.
 
SWMM_ENGINE_API int swmm_climate_get_adjust_conductivity (SWMM_Engine engine, double *buf, int count)
 Copy all monthly hydraulic-conductivity multipliers in January through December.
 
SWMM_ENGINE_API int swmm_climate_set_adjust_conductivity (SWMM_Engine engine, const double *values, int count)
 Replace all monthly hydraulic-conductivity multipliers in January through December.
 

Detailed Description

OpenSWMM Engine — Climatology configuration C API.

Read/write accessors for the model's climate configuration — the data parsed from the [TEMPERATURE], [EVAPORATION], [WINDSPEED] (a sub-keyword of [TEMPERATURE]), [ADJUSTMENTS], and the snowmelt globals / areal-depletion curves. This complements the runtime climate forcing API in openswmm_forcing.h, which overrides the live air-temperature / wind / evaporation values while a simulation is RUNNING. The accessors here edit the inputs before a run.

Units: every value is expressed in the project's display units — exactly as it appears in the .inp file. The engine keeps these configuration values verbatim in SimulationOptions / SimulationContext and defers the internal-unit conversion to swmm_engine_initialize(); the accessors here are therefore a straight pass-through (no unit conversion at the boundary).

Setters require an editable lifecycle state (BUILDING or OPENED) and return SWMM_ERR_LIFECYCLE otherwise — once the simulation is initialized the configuration has already been baked into the climate/snow solver state. Getters work in any readable state.

DRY_ONLY is exposed by swmm_climate_get_dry_only / swmm_climate_set_dry_only in openswmm_forcing.h (not duplicated here). The climate temperature/evaporation FILE path is managed via swmm_file_path_get / swmm_file_path_set (SWMM_FILE_CLIMATE_TEMP) in openswmm_model.h.

See also
openswmm_engine.h
openswmm_forcing.h — runtime climate forcing + DRY_ONLY
Legacy reference: src/legacy/engine/climate.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0

Macro Definition Documentation

◆ SWMM_CLIMATE_ADC_POINTS

#define SWMM_CLIMATE_ADC_POINTS   10

Number of points in an areal-depletion curve.

◆ SWMM_CLIMATE_MONTHS

#define SWMM_CLIMATE_MONTHS   12

Number of monthly values in a climate monthly table.

Typedef Documentation

◆ SWMM_EvapPreviewConfig

typedef struct SWMM_EvapPreviewConfig SWMM_EvapPreviewConfig

Draft values for previewing evaporation before the climatology dialog saves.

◆ SWMM_EvapPreviewSample

typedef struct SWMM_EvapPreviewSample SWMM_EvapPreviewSample

One evaporation source-rate sample; rates use the model's display units.

◆ SWMM_EvapPreviewStatus

Availability of one source-rate sample returned by the evaporation preview.

◆ SWMM_EvapPreviewSummary

typedef struct SWMM_EvapPreviewSummary SWMM_EvapPreviewSummary

Summary counts for one evaporation preview window.

◆ SWMM_EvapType

Evaporation method (matches [EVAPORATION]).

◆ SWMM_HumidityType

Humidity data source (matches [TEMPERATURE] HUMIDITY).

◆ SWMM_HumidityVar

Quantity the HUMIDITY values express.

◆ SWMM_TempSource

Air-temperature data source (matches [TEMPERATURE]).

◆ SWMM_WindType

Wind-speed data source (matches [TEMPERATURE] WINDSPEED).

Enumeration Type Documentation

◆ SWMM_EvapPreviewStatus

Availability of one source-rate sample returned by the evaporation preview.

Enumerator
SWMM_EVAP_PREVIEW_AVAILABLE 

Source and rate are available.

SWMM_EVAP_PREVIEW_HELD 

Engine holds the previous/edge value.

SWMM_EVAP_PREVIEW_MISSING 

No configured source value is available.

SWMM_EVAP_PREVIEW_ESTIMATED 

Temperature-derived daily estimate.

◆ SWMM_EvapType

Evaporation method (matches [EVAPORATION]).

Enumerator
SWMM_EVAP_CONSTANT 

Single constant rate.

SWMM_EVAP_MONTHLY 

Twelve monthly rates.

SWMM_EVAP_TIMESERIES 

Rate from an in-model time series.

SWMM_EVAP_TEMPERATURE 

Hargreaves method from temperature.

SWMM_EVAP_FILE 

Pan rate from the external climate file.

◆ SWMM_HumidityType

Humidity data source (matches [TEMPERATURE] HUMIDITY).

Enumerator
SWMM_HUMIDITY_CONSTANT 

Single constant value.

SWMM_HUMIDITY_MONTHLY 

Twelve monthly values.

SWMM_HUMIDITY_TIMESERIES 

Value from an in-model time series.

◆ SWMM_HumidityVar

Quantity the HUMIDITY values express.

Enumerator
SWMM_HUMIDITY_RELATIVE 

Relative humidity, %.

SWMM_HUMIDITY_DEWPOINT 

Dew-point temperature (deg F US / deg C SI); converted to RH each step from air temperature.

◆ SWMM_TempSource

Air-temperature data source (matches [TEMPERATURE]).

Enumerator
SWMM_TEMP_NONE 

No temperature data (snowmelt/PET disabled).

SWMM_TEMP_TIMESERIES 

Temperature from an in-model time series.

SWMM_TEMP_FILE 

Temperature from an external climate file.

◆ SWMM_WindType

Wind-speed data source (matches [TEMPERATURE] WINDSPEED).

Enumerator
SWMM_WIND_MONTHLY 

Twelve monthly average wind speeds.

SWMM_WIND_FILE 

Wind speed from the climate file.

Function Documentation

◆ swmm_climate_get_adc_impervious()

SWMM_ENGINE_API int swmm_climate_get_adc_impervious ( SWMM_Engine engine,
double * buf,
int count )

Copy all impervious areal-depletion fractions in the configured ten-point depletion-curve order.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned array of exactly 10 doubles, in dimensionless fractions in [0,1].
[in]countMust equal SWMM_CLIMATE_ADC_POINTS (10) exactly; no partial-copy or size-query mode.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/wrong count.

◆ swmm_climate_get_adc_pervious()

SWMM_ENGINE_API int swmm_climate_get_adc_pervious ( SWMM_Engine engine,
double * buf,
int count )

Copy all pervious areal-depletion fractions in the configured ten-point depletion-curve order.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned array of exactly 10 doubles, in dimensionless fractions in [0,1].
[in]countMust equal SWMM_CLIMATE_ADC_POINTS (10) exactly; no partial-copy or size-query mode.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/wrong count.

◆ swmm_climate_get_adjust_conductivity()

SWMM_ENGINE_API int swmm_climate_get_adjust_conductivity ( SWMM_Engine engine,
double * buf,
int count )

Copy all monthly hydraulic-conductivity multipliers in January through December.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned array of exactly 12 doubles, in dimensionless (1 means unchanged).
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly; no partial-copy or size-query mode.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/wrong count.

◆ swmm_climate_get_adjust_evaporation()

SWMM_ENGINE_API int swmm_climate_get_adjust_evaporation ( SWMM_Engine engine,
double * buf,
int count )

Copy all monthly evaporation offsets in January through December.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned array of exactly 12 doubles, in in/day in US or mm/day in SI.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly; no partial-copy or size-query mode.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/wrong count.

◆ swmm_climate_get_adjust_rainfall()

SWMM_ENGINE_API int swmm_climate_get_adjust_rainfall ( SWMM_Engine engine,
double * buf,
int count )

Copy all monthly rainfall multipliers in January through December.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned array of exactly 12 doubles, in dimensionless (1 means unchanged).
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly; no partial-copy or size-query mode.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/wrong count.

◆ swmm_climate_get_adjust_temperature()

SWMM_ENGINE_API int swmm_climate_get_adjust_temperature ( SWMM_Engine engine,
double * buf,
int count )

Copy all monthly temperature offsets in January through December.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned array of exactly 12 doubles, in degrees F in US or degrees C in SI.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly; no partial-copy or size-query mode.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/wrong count.

◆ swmm_climate_get_ati_weight()

SWMM_ENGINE_API int swmm_climate_get_ati_weight ( SWMM_Engine engine,
double * tipm )

Read the configured antecedent-temperature-index weight.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]tipmOptional destination: dimensionless fraction in [0,1].
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_elevation()

SWMM_ENGINE_API int swmm_climate_get_elevation ( SWMM_Engine engine,
double * elev )

Read the configured site elevation.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]elevOptional destination: project display length (ft in US, m in SI).
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_evap_monthly()

SWMM_ENGINE_API int swmm_climate_get_evap_monthly ( SWMM_Engine engine,
double * buf,
int count )

Copy all monthly evaporation rates in January through December.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned array of exactly 12 doubles, in in/day in US or mm/day in SI.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly; no partial-copy or size-query mode.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/wrong count.

◆ swmm_climate_get_evap_recovery()

SWMM_ENGINE_API int swmm_climate_get_evap_recovery ( SWMM_Engine engine,
char * buf,
int buflen )

Copy the configured soil-moisture recovery pattern ID.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned buffer; empty when no ID is configured, NUL-terminated and silently truncated to buflen-1 bytes.
[in]buflenPositive byte capacity including NUL.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for invalid buffer/capacity.

◆ swmm_climate_get_evap_timeseries()

SWMM_ENGINE_API int swmm_climate_get_evap_timeseries ( SWMM_Engine engine,
char * buf,
int buflen )

Copy the configured evaporation time-series ID.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned buffer; empty when no ID is configured, NUL-terminated and silently truncated to buflen-1 bytes.
[in]buflenPositive byte capacity including NUL.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for invalid buffer/capacity.

◆ swmm_climate_get_evap_type()

SWMM_ENGINE_API int swmm_climate_get_evap_type ( SWMM_Engine engine,
int * type )

Read the configured evaporation method.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]typeOptional destination: SWMM_EvapType: CONSTANT=0, MONTHLY=1, TIMESERIES=2, TEMPERATURE=3, FILE=4.
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_humidity_monthly()

SWMM_ENGINE_API int swmm_climate_get_humidity_monthly ( SWMM_Engine engine,
double * buf,
int count )

Copy all monthly humidity values in January through December.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned array of exactly 12 doubles, in RH percent or dew-point degrees F/C according to the humidity quantity/unit system.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly; no partial-copy or size-query mode.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/wrong count.

◆ swmm_climate_get_humidity_timeseries()

SWMM_ENGINE_API int swmm_climate_get_humidity_timeseries ( SWMM_Engine engine,
char * buf,
int buflen )

Copy the configured humidity time-series ID.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned buffer; empty when no ID is configured, NUL-terminated and silently truncated to buflen-1 bytes.
[in]buflenPositive byte capacity including NUL.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for invalid buffer/capacity.

◆ swmm_climate_get_humidity_type()

SWMM_ENGINE_API int swmm_climate_get_humidity_type ( SWMM_Engine engine,
int * type )

Read the configured humidity source.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]typeOptional destination: SWMM_HumidityType: CONSTANT=0, MONTHLY=1, TIMESERIES=2.
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_humidity_variable()

SWMM_ENGINE_API int swmm_climate_get_humidity_variable ( SWMM_Engine engine,
int * var )

Read the configured humidity quantity.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]varOptional destination: SWMM_HumidityVar: RELATIVE=0 (percent) or DEWPOINT=1 (degrees F US/degrees C SI).
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_latitude()

SWMM_ENGINE_API int swmm_climate_get_latitude ( SWMM_Engine engine,
double * latitude )

Read the configured site latitude.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]latitudeOptional destination: degrees north in [-90,90].
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_longitude_correction()

SWMM_ENGINE_API int swmm_climate_get_longitude_correction ( SWMM_Engine engine,
double * minutes )

Read the configured longitude/solar-time correction.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]minutesOptional destination: minutes; 0 selects true solar time.
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_neg_melt_ratio()

SWMM_ENGINE_API int swmm_climate_get_neg_melt_ratio ( SWMM_Engine engine,
double * rnm )

Read the configured negative-melt-coefficient ratio.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]rnmOptional destination: dimensionless fraction in [0,1].
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_pan_coeff()

SWMM_ENGINE_API int swmm_climate_get_pan_coeff ( SWMM_Engine engine,
double * buf,
int count )

Copy all monthly pan coefficients in January through December.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned array of exactly 12 doubles, in dimensionless multipliers applied by FILE evaporation.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly; no partial-copy or size-query mode.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/wrong count.

◆ swmm_climate_get_snow_temp()

SWMM_ENGINE_API int swmm_climate_get_snow_temp ( SWMM_Engine engine,
double * divide_temp )

Read the configured snow/rain dividing temperature.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]divide_tempOptional destination: project temperature (degrees F in US, degrees C in SI).
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_temp_file_start()

SWMM_ENGINE_API int swmm_climate_get_temp_file_start ( SWMM_Engine engine,
double * date )

Read the configured climate-file start date.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]dateOptional destination: SWMM DateTime decimal days since 1899-12-30; 0 starts at the file beginning.
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_temp_source()

SWMM_ENGINE_API int swmm_climate_get_temp_source ( SWMM_Engine engine,
int * source )

Read the configured air-temperature source.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]sourceOptional destination: SWMM_TempSource: 0=NONE, 1=TIMESERIES, 2=FILE.
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_temp_timeseries()

SWMM_ENGINE_API int swmm_climate_get_temp_timeseries ( SWMM_Engine engine,
char * buf,
int buflen )

Copy the configured temperature time-series ID.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned buffer; empty when no ID is configured, NUL-terminated and silently truncated to buflen-1 bytes.
[in]buflenPositive byte capacity including NUL.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for invalid buffer/capacity.

◆ swmm_climate_get_temp_units()

SWMM_ENGINE_API int swmm_climate_get_temp_units ( SWMM_Engine engine,
int * units )

Read the configured climate-file temperature-unit selector.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]unitsOptional destination: -1=unspecified per-format default, 0=tenths degrees C, 1=degrees C, 2=degrees F.
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_get_wind_monthly()

SWMM_ENGINE_API int swmm_climate_get_wind_monthly ( SWMM_Engine engine,
double * buf,
int count )

Copy all monthly average wind speeds in January through December.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]bufNon-null caller-owned array of exactly 12 doubles, in mph in US or km/h in SI.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly; no partial-copy or size-query mode.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_BADPARAM for null buf/wrong count.

◆ swmm_climate_get_wind_type()

SWMM_ENGINE_API int swmm_climate_get_wind_type ( SWMM_Engine engine,
int * type )

Read the configured wind-speed source.

Parameters
[in]engineNon-null live engine with exclusive caller access; getters read stored configuration without changing lifecycle state.
[out]typeOptional destination: SWMM_WindType: MONTHLY=0 or FILE=1.
Returns
SWMM_OK (including a NULL optional scalar output), or SWMM_ERR_BADHANDLE for null engine.

◆ swmm_climate_preview_evaporation()

SWMM_ENGINE_API int swmm_climate_preview_evaporation ( SWMM_Engine engine,
double start_date,
double end_date,
double sample_interval_days,
SWMM_EvapPreviewSample * samples,
int capacity,
int * sample_count,
SWMM_EvapPreviewSummary * summary,
char * diagnostic,
int diagnostic_capacity )

Preview saved evaporation without runtime forcing.

Samples [start_date,end_date) at the specified interval. TIMESERIES uses step-and-hold scheduling; FILE holds the last valid pan rate. TEMPERATURE uses daily Hargreaves estimates because runtime air forcing and climate-step frequency are unknown. System/subcatchment forcing is excluded and runtime_forcing_unknown is always 1. Missing file/series data can yield MISSING samples and a diagnostic while returning success; inspect statuses and summary rather than return code alone.

Parameters
[in]engineNon-null live engine, excluding RUNNING; no simulation state or stored options are changed.
[in]start_dateFinite inclusive OADate/SWMM DateTime window start, within model simulation dates.
[in]end_dateFinite exclusive window end, greater than start_date and within simulation dates (1e-10 day tolerance).
[in]sample_interval_daysFinite positive sampling interval in days; the window must produce between 1 and 1,000,000 samples.
[out]samplesCaller-owned capacity-record array; NULL with capacity=0 queries the count and summary. A short non-null array is refused before sampling.
[in]capacityNonnegative number of available sample records; nonzero requires non-null samples.
[out]sample_countNon-null required-count output, written after validating the time window and before short-buffer/draft refusals.
[out]summaryNon-null coverage/rate-summary destination; written after successful sampling even in count-only mode. Rates use project evaporation units (in/day US, mm/day SI).
[out]diagnosticNon-null caller-owned diagnostic buffer; cleared after basic validation, NUL-terminated/truncated for later errors or unavailable file-source notices.
[in]diagnostic_capacityPositive diagnostic capacity in bytes including NUL.
Returns
SWMM_OK for a completed preview (including missing-source samples); SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE while RUNNING, or SWMM_ERR_BADPARAM for invalid inputs/draft, unsupported sample count or insufficient sample capacity.
Here is the call graph for this function:

◆ swmm_climate_preview_evaporation_with_config()

SWMM_ENGINE_API int swmm_climate_preview_evaporation_with_config ( SWMM_Engine engine,
const SWMM_EvapPreviewConfig * config,
double start_date,
double end_date,
double sample_interval_days,
SWMM_EvapPreviewSample * samples,
int capacity,
int * sample_count,
SWMM_EvapPreviewSummary * summary,
char * diagnostic,
int diagnostic_capacity )

Preview draft or saved evaporation without runtime forcing.

Samples [start_date,end_date) at the specified interval. TIMESERIES uses step-and-hold scheduling; FILE holds the last valid pan rate. TEMPERATURE uses daily Hargreaves estimates because runtime air forcing and climate-step frequency are unknown. System/subcatchment forcing is excluded and runtime_forcing_unknown is always 1. Missing file/series data can yield MISSING samples and a diagnostic while returning success; inspect statuses and summary rather than return code alone.

Parameters
[in]engineNon-null live engine, excluding RUNNING; no simulation state or stored options are changed.
[in]configOptional borrowed complete preview draft; NULL uses saved values. String fields may be NULL for empty references and are copied for this call. Arrays must contain finite values; source selectors/site metadata are validated.
[in]start_dateFinite inclusive OADate/SWMM DateTime window start, within model simulation dates.
[in]end_dateFinite exclusive window end, greater than start_date and within simulation dates (1e-10 day tolerance).
[in]sample_interval_daysFinite positive sampling interval in days; the window must produce between 1 and 1,000,000 samples.
[out]samplesCaller-owned capacity-record array; NULL with capacity=0 queries the count and summary. A short non-null array is refused before sampling.
[in]capacityNonnegative number of available sample records; nonzero requires non-null samples.
[out]sample_countNon-null required-count output, written after validating the time window and before short-buffer/draft refusals.
[out]summaryNon-null coverage/rate-summary destination; written after successful sampling even in count-only mode. Rates use project evaporation units (in/day US, mm/day SI).
[out]diagnosticNon-null caller-owned diagnostic buffer; cleared after basic validation, NUL-terminated/truncated for later errors or unavailable file-source notices.
[in]diagnostic_capacityPositive diagnostic capacity in bytes including NUL.
Returns
SWMM_OK for a completed preview (including missing-source samples); SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE while RUNNING, or SWMM_ERR_BADPARAM for invalid inputs/draft, unsupported sample count or insufficient sample capacity.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ swmm_climate_set_adc_impervious()

SWMM_ENGINE_API int swmm_climate_set_adc_impervious ( SWMM_Engine engine,
const double * values,
int count )

Replace all impervious areal-depletion fractions in the configured ten-point depletion-curve order.

Each fraction is range checked, without a separate finite-value or monotonicity check.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]valuesNon-null borrowed array of 10 doubles in dimensionless fractions in [0,1]; copied synchronously.
[in]countMust equal SWMM_CLIMATE_ADC_POINTS (10) exactly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_adc_pervious()

SWMM_ENGINE_API int swmm_climate_set_adc_pervious ( SWMM_Engine engine,
const double * values,
int count )

Replace all pervious areal-depletion fractions in the configured ten-point depletion-curve order.

Each fraction is range checked, without a separate finite-value or monotonicity check.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]valuesNon-null borrowed array of 10 doubles in dimensionless fractions in [0,1]; copied synchronously.
[in]countMust equal SWMM_CLIMATE_ADC_POINTS (10) exactly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_adjust_conductivity()

SWMM_ENGINE_API int swmm_climate_set_adjust_conductivity ( SWMM_Engine engine,
const double * values,
int count )

Replace all monthly hydraulic-conductivity multipliers in January through December.

Each value <=0 is stored as 1 (legacy convention); positive values are retained. No separate finite-value validation.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]valuesNon-null borrowed array of 12 doubles in dimensionless (1 means unchanged); copied synchronously.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_adjust_evaporation()

SWMM_ENGINE_API int swmm_climate_set_adjust_evaporation ( SWMM_Engine engine,
const double * values,
int count )

Replace all monthly evaporation offsets in January through December.

Offsets are added to the evaporation source rate; these are not multiplicative coefficients. Caller must supply physically valid finite values; this setter copies entries without additional validation.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]valuesNon-null borrowed array of 12 doubles in in/day in US or mm/day in SI; copied synchronously.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_adjust_rainfall()

SWMM_ENGINE_API int swmm_climate_set_adjust_rainfall ( SWMM_Engine engine,
const double * values,
int count )

Replace all monthly rainfall multipliers in January through December.

Multipliers are copied directly; this setter imposes no nonnegative/finite-value validation. Caller must supply physically valid finite values; this setter copies entries without additional validation.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]valuesNon-null borrowed array of 12 doubles in dimensionless (1 means unchanged); copied synchronously.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_adjust_temperature()

SWMM_ENGINE_API int swmm_climate_set_adjust_temperature ( SWMM_Engine engine,
const double * values,
int count )

Replace all monthly temperature offsets in January through December.

Offsets are added to the temperature source in display units. Caller must supply physically valid finite values; this setter copies entries without additional validation.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]valuesNon-null borrowed array of 12 doubles in degrees F in US or degrees C in SI; copied synchronously.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_ati_weight()

SWMM_ENGINE_API int swmm_climate_set_ati_weight ( SWMM_Engine engine,
double tipm )

Set the configured antecedent-temperature-index weight.

Caller must supply a finite value; only lower/upper comparisons guard this setter.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]tipmdimensionless fraction in [0,1]. Values outside [0,1] are refused.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_elevation()

SWMM_ENGINE_API int swmm_climate_set_elevation ( SWMM_Engine engine,
double elev )

Set the configured site elevation.

Used for psychrometric/snow calculations. Assigned without finite/range validation.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]elevproject display length (ft in US, m in SI). Stored directly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_LIFECYCLE outside BUILDING/OPENED.

◆ swmm_climate_set_evap_monthly()

SWMM_ENGINE_API int swmm_climate_set_evap_monthly ( SWMM_Engine engine,
const double * values,
int count )

Replace all monthly evaporation rates in January through December.

All 12 supplied values are retained; CONSTANT runtime use selects the first value. The setter does not replicate it across months or change the method. Caller must supply physically valid finite values; this setter copies entries without additional validation.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]valuesNon-null borrowed array of 12 doubles in in/day in US or mm/day in SI; copied synchronously.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_evap_recovery()

SWMM_ENGINE_API int swmm_climate_set_evap_recovery ( SWMM_Engine engine,
const char * pattern_id )

Copy a configured soil-moisture recovery pattern ID.

Empty clears the pattern without changing the evaporation method. This does not add a missing series/pattern or open a data file.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]pattern_idNon-null NUL-terminated identifier to copy; empty is accepted. The referenced object need not resolve at this authoring call.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_evap_timeseries()

SWMM_ENGINE_API int swmm_climate_set_evap_timeseries ( SWMM_Engine engine,
const char * ts_id )

Copy a configured evaporation time-series ID.

Also sets evaporation method to TIMESERIES, including for an empty ID. This does not add a missing series/pattern or open a data file.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]ts_idNon-null NUL-terminated identifier to copy; empty is accepted. The referenced object need not resolve at this authoring call.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_evap_type()

SWMM_ENGINE_API int swmm_climate_set_evap_type ( SWMM_Engine engine,
int type )

Set the configured evaporation method.

Stores the method only; associated rates/series/file configuration are managed separately.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]typeSWMM_EvapType: CONSTANT=0, MONTHLY=1, TIMESERIES=2, TEMPERATURE=3, FILE=4. Values outside 0..4 are refused.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_humidity_monthly()

SWMM_ENGINE_API int swmm_climate_set_humidity_monthly ( SWMM_Engine engine,
const double * values,
int count )

Replace all monthly humidity values in January through December.

All 12 values are retained as supplied; CONSTANT mode uses the configured constant entry. Does not change source or quantity. Caller must supply physically valid finite values; this setter copies entries without additional validation.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]valuesNon-null borrowed array of 12 doubles in RH percent or dew-point degrees F/C according to the humidity quantity/unit system; copied synchronously.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_humidity_timeseries()

SWMM_ENGINE_API int swmm_climate_set_humidity_timeseries ( SWMM_Engine engine,
const char * ts_id )

Copy a configured humidity time-series ID.

Also sets humidity source to TIMESERIES, including for an empty ID. This does not add a missing series/pattern or open a data file.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]ts_idNon-null NUL-terminated identifier to copy; empty is accepted. The referenced object need not resolve at this authoring call.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_humidity_type()

SWMM_ENGINE_API int swmm_climate_set_humidity_type ( SWMM_Engine engine,
int type )

Set the configured humidity source.

Does not change the humidity quantity selector or validate a referenced series.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]typeSWMM_HumidityType: CONSTANT=0, MONTHLY=1, TIMESERIES=2. Values outside 0..2 are refused.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_humidity_variable()

SWMM_ENGINE_API int swmm_climate_set_humidity_variable ( SWMM_Engine engine,
int var )

Set the configured humidity quantity.

Dew-point values are converted to relative humidity against runtime air temperature.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]varSWMM_HumidityVar: RELATIVE=0 (percent) or DEWPOINT=1 (degrees F US/degrees C SI). Values outside 0..1 are refused.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_latitude()

SWMM_ENGINE_API int swmm_climate_set_latitude ( SWMM_Engine engine,
double latitude )

Set the configured site latitude.

Used by Hargreaves evaporation and snowmelt. Caller must provide a finite value; the range guard does not independently reject NaN.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]latitudedegrees north in [-90,90]. Values outside [-90,90] are refused.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_longitude_correction()

SWMM_ENGINE_API int swmm_climate_set_longitude_correction ( SWMM_Engine engine,
double minutes )

Set the configured longitude/solar-time correction.

Matches the legacy SNOWMELT correction field; assigned without finite/range validation.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]minutesminutes; 0 selects true solar time. Stored directly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_LIFECYCLE outside BUILDING/OPENED.

◆ swmm_climate_set_neg_melt_ratio()

SWMM_ENGINE_API int swmm_climate_set_neg_melt_ratio ( SWMM_Engine engine,
double rnm )

Set the configured negative-melt-coefficient ratio.

Caller must supply a finite value; only lower/upper comparisons guard this setter.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]rnmdimensionless fraction in [0,1]. Values outside [0,1] are refused.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_pan_coeff()

SWMM_ENGINE_API int swmm_climate_set_pan_coeff ( SWMM_Engine engine,
const double * values,
int count )

Replace all monthly pan coefficients in January through December.

Does not select the FILE method or validate/open its climate source. Caller must supply physically valid finite values; this setter copies entries without additional validation.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]valuesNon-null borrowed array of 12 doubles in dimensionless multipliers applied by FILE evaporation; copied synchronously.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_snow_temp()

SWMM_ENGINE_API int swmm_climate_set_snow_temp ( SWMM_Engine engine,
double divide_temp )

Set the configured snow/rain dividing temperature.

Assigned without finite/range validation; affects precipitation partitioning when snowmelt is initialized.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]divide_tempproject temperature (degrees F in US, degrees C in SI). Stored directly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_LIFECYCLE outside BUILDING/OPENED.

◆ swmm_climate_set_temp_file_start()

SWMM_ENGINE_API int swmm_climate_set_temp_file_start ( SWMM_Engine engine,
double date )

Set the configured climate-file start date.

No finite/calendar validation is applied; caller must provide a valid date.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]dateSWMM DateTime decimal days since 1899-12-30; 0 starts at the file beginning. Stored directly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine or SWMM_ERR_LIFECYCLE outside BUILDING/OPENED.

◆ swmm_climate_set_temp_source()

SWMM_ENGINE_API int swmm_climate_set_temp_source ( SWMM_Engine engine,
int source )

Set the configured air-temperature source.

Selecting a source does not validate its file or series reference.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]sourceSWMM_TempSource: 0=NONE, 1=TIMESERIES, 2=FILE. Values outside 0..2 are refused.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_temp_timeseries()

SWMM_ENGINE_API int swmm_climate_set_temp_timeseries ( SWMM_Engine engine,
const char * ts_id )

Copy a configured temperature time-series ID.

Also sets temperature source to TIMESERIES, including for an empty ID. This does not add a missing series/pattern or open a data file.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]ts_idNon-null NUL-terminated identifier to copy; empty is accepted. The referenced object need not resolve at this authoring call.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_temp_units()

SWMM_ENGINE_API int swmm_climate_set_temp_units ( SWMM_Engine engine,
int units )

Set the configured climate-file temperature-unit selector.

Applies to reading climate-file records, not the model display-unit choice.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]units-1=unspecified per-format default, 0=tenths degrees C, 1=degrees C, 2=degrees F. Values outside -1..2 are refused.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_wind_monthly()

SWMM_ENGINE_API int swmm_climate_set_wind_monthly ( SWMM_Engine engine,
const double * values,
int count )

Replace all monthly average wind speeds in January through December.

Does not change the wind source selector. Caller must supply physically valid finite values; this setter copies entries without additional validation.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]valuesNon-null borrowed array of 12 doubles in mph in US or km/h in SI; copied synchronously.
[in]countMust equal SWMM_CLIMATE_MONTHS (12) exactly.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.

◆ swmm_climate_set_wind_type()

SWMM_ENGINE_API int swmm_climate_set_wind_type ( SWMM_Engine engine,
int type )

Set the configured wind-speed source.

Does not open or validate the climate file.

Parameters
[in]engineNon-null engine in BUILDING or OPENED. Configure before initialize; runtime climate forcing has a separate API.
[in]typeSWMM_WindType: MONTHLY=0 or FILE=1. Values outside 0..1 are refused.
Returns
SWMM_OK; SWMM_ERR_BADHANDLE for null engine, SWMM_ERR_LIFECYCLE outside BUILDING/OPENED, or SWMM_ERR_BADPARAM for a refused value.