Skip to content

Variable standard naming and units #132

Description

@Samuel-amap

This is a more general PlantMeteo XPalm PlantBioPhysics and PlantSimEngine issue : what process/validation method to use to define and access variables that have been standardised in literature, so that future modelers can easily make use of them, and expand the list in a consistent manner.

Activity

  1. Samuel-amap commented on Feb 28, 2025

    @Samuel-amap
    CollaboratorAuthor

    This has ties to #65

  2. VEZY commented on Apr 3, 2025

    @VEZY
    Member

    Recommand using names define in https://agroportal.lirmm.fr/

  3. VEZY commented on Aug 18, 2025

    @VEZY
    Member

    We could take inspiration from how Dyad handles those things; and even reuse some of their code if their licence allows it.

    Basically the idea would be to require a standard name for variables and some units. The units would be given by the standard, and if the variable is new (i.e. not in the standard), we would require a short description and the units somewhere (next to the inputs/outputs, or in the doc string ?). Then we could provide a check on models and modellist/mapping to see if all units are compatible, including how units in the inputs would propagate in the outputs, and if those computed units are compatible with what is given by the user / the standard.

    The standard would be published in the docs of PSE. And people could open a PR to add new variables.

    Also, we could hack into documenter (see talk at JuliaCon 2025) to add the variables definitions and units automatically from the reference or user to all models based on the inputs and outputs lists.

  4. VEZY commented on Oct 1, 2025

    @VEZY
    Member
  5. Samuel-amap commented on Nov 12, 2025

    @Samuel-amap
    CollaboratorAuthor

    Closing #65 (redundant with this one). Its comment (by VEZY) was :

    • A variable should be named using the standard name used in the community.
    • It shouldn’t include the variable unit, as it may depend on the unit of the model inputs.
    • The unit and description of the variable should be documented in the model structure documentation. If the unit depends on the inputs of the model, state it.
    • Variables should be snake case, e.g. leaf_area, unless widely used in the community, e.g. LAI
    • Variable names shouldn’t be abbreviated, unless widely used by the community, e.g. leaf area should be named leaf_area, not la. LAI should be fine, but leaf_area_index is better.
    • A variable should be named with a generic name, e.g. temperature instead of temperature_leaf, so the same name can be used at different scales. One exception is when a variable integrates the values from other scales; e.g. Rm_plant is fine if it is computed using the sum of all Rm of the organs in the plant.
  6. VEZY commented on May 4, 2026

    @VEZY
    Member

    For units, we could add a new trait based on the variables (inputs/outputs) that would define the units for each variable. That would allow us to validate units only once by activating an option during model run (we would use the units for all variables), and not use them once validated (so simulation performance is not penalized by units)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions