Skip to content

Attempts to read BMI output variables of zero size #952

Description

@PhilMiller

Circumstance:

  • A model declares a BMI output variable (e.g. soil_moisture_wetting_fronts from LGAR-C)
  • The model is configured such that the variable has zero size, and returns 0 from GetVarNbytes(soil_moisture_wetting_fronts)

Expected Behavior

  • Ngen will never try to read any values from that variable. It might call GetValue, and ignore the contents of the output buffer. If it calls GetValuePtr, it should not try to access any dereferenced values through it, because it cannot rely on them to be valid addresses

Actual behavior:

  • In attempting to write catchment output, ngen's get_output_line_for_timestep tries to read a single value from each listed output variable, without regard to its size.

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