Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClimaAtmos depends on the details of the aerosol file #3220

Open
Sbozzolo opened this issue Jul 31, 2024 · 0 comments
Open

ClimaAtmos depends on the details of the aerosol file #3220

Sbozzolo opened this issue Jul 31, 2024 · 0 comments

Comments

@Sbozzolo
Copy link
Member

(This is not a big issue and will not be an issue for a very long time, but it is have here for reference.)

ClimaAtmos determines names and symbols for aerosols dynamically, by reading from a file. So, code like this:

if aerosol_radiation && !(any(
x -> x in aerosol_names,
["DST01", "SSLT01", "SO4", "CB1", "CB2", "OC1", "OC2"],
))

or
add_diagnostic_variable!(
short_name = "mmrss",
long_name = "Sea-Salt Aerosol Mass Mixing Ratio",
standard_name = "mass_fraction_of_sea_salt_dry_aerosol_particles_in_air",
units = "kg kg^-1",
comments = "Prescribed dry mass fraction of sea salt aerosol particles in air. Only the smallest size is included.",
compute! = (out, u, p, t) -> compute_aerosol!(out, u, p, t, :SSLT01),
)

works only if the aerosol file is conforming to a specification. At the moment, this specificiation is largely implicit, and only loosely defined by the readme in ClimaArtifacts.

If someone updates the aerosol file, this would possibly result in breakage.

Possible solutions are:

  • to fix a specification for the file (e.g., the only allowed names for aerosols are X, Y, Z)
  • provide an abstract interface for aerosol specification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant