Skip to content

[REFACTOR] Clean-up composite types #26

@hsolleder

Description

@hsolleder

Description

The current version of the model components includes state, auxiliary variables, parameters and forcing inputs of various levels. However, this nomenclature is redundant and could/should be stored on side of the concrete package. AbstractStateVariableSet and AbstractAuxiliaryVariableSet, for instance, differ only by the "flavor" of variables (fields) of these composite types.

Overall, we can distinguish three composite types

  • container for array-like and scalars only (e.g., parameters, height-dependent hydrologic auxiliary variable)
  • container for containers only (e.g., parameterset)
  • containers for containers as well as array-like and scalars (e.g. hydrologic state variables in TethysChloris.jl)

Any concrete composite type representing variables of Tethys-Chloris will be a subtype of one of these three types. Therefore, I suggest replacing the current structure of the model components with a simpler structure, namely

  • Keep AbstractModelComponent
  • Add three abstract subtypes of AbstractModelComponent (names up for discussion)
    • AbstractHybridModelComponent
    • AbstractVariablesModelComponent
    • AbstractSetModelComponnet

Thoughts @sphamba ?

Metadata

Metadata

Assignees

Labels

refactorRefactor code structure or implementation: should prefix branch by refactor/
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions