Skip to content

Create and use generic function for calculation of air density in physics #431

Description

@nusbaume

An increasing number of physics schemes (e.g. PUMAS and microp_aero) appear to be calculating their own air density using the equation of state. While nothing is inherently wrong with that, a possibly better scientific and software practice would be to create a function (that lives somewhere in phys_utils) that does that calculation, and which can then be used by the whatever physics scheme needs it.

Doing this would allow the actual calculating code to be in a single location, where it can be given a full comment and provenance info, and can be well unit/property-tested. It can also make it clear what exactly is being done in the calculation of the air density via the name of the function itself, instead of needing to look at the math/variables to deduce what is going on.

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

    cleanupThis issue indicates an opportunity for code cleanup.documentationImprovements or additions to documentationtesting systemThis issue or PR is related to the testing infrastructure in atmospheric_physics.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions