Skip to content

Construct micm from a mechanism in fortran #995

Description

@K20shores

In #932 we consolidated configuration reading down to one path that returns a mechanism. In #990 a mechanism became visible to C and fortran for the first time, because miem needed one. It would be nice if micm could take one of these mechanism fortran objects and configure itself

Micm keeps its config path constructors for backwards compatibility, but also because it's the most common use case

One limit on the fortran side. #990 gives mechanism_t a constructor from a path only. So this issue delivers one parse that feeds both micm and miem. It does not deliver a mechanism that a user builds in memory. That work needs mechanism configuration bindings for fortran, and it is a separate issue.

Acceptance criteria

Ideas

  • The new micm_t constructor needs no special work. A mechanism_t first argument and a character(len=*) first argument resolve cleanly in one generic interface. Build miem C/Fortran interface #990 hit an overload problem, but that was for two constructors with the same argument types.
  • After this change, Chemistry can become internal. The public boundary is from a mechanism to a model.
  • A user can hand a config with a miem emissions section to micm without ever configuring miem, and vice versa. I suppose this could be confusing and maybe we should warn about this

Activity

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions