Practice note: Naming and storing functions and variables
Practice note: Naming and storing functions and variables
This practice note is one of a set developed to provide consistency and transparency of river system models being used within the Murray-Darling Basin. The notes cover modelling practices, such as naming conventions for folder structures, to model methods, such as for flow routing and residual inflow estimation, and have been developed through a collaboration between the MDBA, Basin States and CSIRO.
Produced in collaboration with:
This practice note, Naming and storing functions and variables, describes the recommended conventions for naming and storing of functions and variables in Source river system models that underpin water resource plans; and provides examples of implementing the conventions.
Background
Functions are a powerful feature of eWater Source that allow models to be customised. They are stored within the Function Manager (/wiki/spaces/SD49/pages/54362212).
General principles
- It should be easy to identify functions, time series variables, modelled variables, pattern variables, piecewise linear variables and context variables.
Conventions for naming and storing model functions and variables
- Functions and variables should be grouped within Source in folders based on Node Type and Node Name.
- A Subsystem name ($SubsystemName) is only required when a model contains multiple subsystems (e.g. Goulbourn-Broken Model).
Table 1: Recommended conventions for naming functions and variables, and examples of implementing them. Bold indicates fixed text.
Convention | Example | |
Functions | $f_Name | $f_MinFlow |
Time series variables | $ts_Name | $ts_MURGMW_71 |
Modelled variable | $v_Name | $v_UpstreamFlow |
Pattern variable | $p_Name | $p_MinFlow |
Piecewise linear variables | $pw_Name | $pw_HumeVolumeLevel |
Context variables | $c_Name |
Table 2: Recommended folder structure for storing model functions and variables within the Source Function Manager. For models with multiple sub-systems, these folders would sit under an upper level folder that is identified by the subsystem name ($SubsystemName). Bold indicates fixed text.
Folder name | Subfolder names | Examples |
Accounts | Accounts.f_xxxx or $SubsystemName.Accounts.f_xxxx | |
ClimateFunctions | ClimateFunctions.f_xxxx | |
Confluences | Node Names | Confluences.NodeName.f_xxxx |
DemandModels | Node Names | DemandModels.NodeName.f_xxxx |
Diversions | Node Names | Diversions.NodeName.f_xxxx |
Environment | Node Names | Environment.NodeName.f_xxxx |
Gauges | Node Names | Gauges.NodeName.f_xxxx |
Inflows | Node Names | Inflows.NodeName.f_xxxx |
Losses | Node Names | Losses.NodeName.f_xxxx |
MaximumOrder | Node Names | MaximumOrder.NodeName.f_xxxx |
MinimumFlows | Node Names | MinimumFlows.NodeName.f_xxxx |
OffAllocation | System name | OffAllocation.SystemName.f_xxxx |
Ordering | Ordering.f_xxxx | |
Regulators | Node Name | Regulators.NodeName.f_xxxx |
Salinity | Node or Link name | Salinity.NodeName.f_xxxx |
Storages | Storage Name | Storages.StorageName.f_xxxx |
SystemFunctions | SystemFunctions.f_xxxx |