Skip to content

Standardize conditions setting #393

@K20shores

Description

@K20shores

We don't have standard ways to set conditions. Some files use CONC.Species [units], others use CONC.Species.units. We also separate conditions into initial, evolving, and environmental, when really all we need are ways to set conditions at any timestep. We also don't document what we expect.

Acceptance criteria

  • All types of conditions at any time can be set in code
  • Ideally, we don't have different classes for evolving conditions and other conditions. Maybe we don't even have conditions classes
  • The API for a valid MusicBox object supports a .conditions property that returns a dataframe of all conditions throughout the entire simulation

Ideas

  • Consider if prefixes can be removed. Do we really need CONC., ENV., etc.?
    • Probably, we do need them, but think about it
  • Consider defining one block in the configuration called conditions. It can support setting information directly inline with data, or with file paths. If initial conditions are not set for time zero, default them to zero and print a warning, but run the model anyway
  "conditions": {
    "filepaths": [
      "initial_conditions.csv",
      "temp_forcing.csv",
      "emissions.csv"
    ],
    "data": [
      {
        "headers": ["time.s", "ENV.temperature.K", "ENV.pressure.Pa", "CONC.O3.mol m-3"],
        "rows": [
          [0.0, 299.55, 99255.61, 5.0e-8]
        ]
      },
      {
        "headers": ["time.s", "ENV.temperature.K"],
        "rows": [
          [3600.0, 300.0],
          [7200.0, 301.0]
        ]
      }
    ]
  }
}

Metadata

Metadata

Assignees

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