Skip to content

Density documentation: T in signature, but Tv in note #2825

@sgdecker

Description

@sgdecker

What can be better?

In the documentation for the density function, the required arguments are listed as pressure, temperature, and mixing_ratio. However, in the note, the equation is written in terms of virtual temperature, which is inconsistent and maybe confusing. Perhaps the temperature argument could be defined as "Air temperature, or the virtual temperature if mixing_ratio is set to zero" to make things clearer. Or, mixing_ratio could be an optional argument I suppose (if missing, it's zero).

In my case, I already have virtual temperatures in my data, and do not have mixing ratio, so at first glance it seemed I might need to roll my own computation. (Admittedly, it's not the most complicated calculation to begin with!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CalcPertains to calculationsArea: DocsAffects documentationType: EnhancementEnhancement to existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions