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

streamlined PrescribedAtmos constructor #760

Closed
juliasloan25 opened this issue Sep 10, 2024 · 0 comments · Fixed by #823
Closed

streamlined PrescribedAtmos constructor #760

juliasloan25 opened this issue Sep 10, 2024 · 0 comments · Fixed by #823
Assignees
Labels
API enhancement New feature or request

Comments

@juliasloan25
Copy link
Member

Is your feature request related to a problem? Please describe.
Following CliMA/ClimaUtilities.jl#105, we're able to do transformations on multiple data variables to create our forcing variables (and can read them all from one file). It would be nice to use this to make a PresribedAtmos constructor that avoids the user having to do this:

  u_atmos = TimeVaryingInput(
        joinpath(era5_artifact_path, "era5_2021_0.9x1.25_clima.nc"),
        "ws",
        surface_space;
        reference_date = ref_time,
        t_start,
        regridder_type,
    )
    q_atmos = TimeVaryingInput(
        joinpath(era5_artifact_path, "era5_2021_0.9x1.25_clima.nc"),
        "q",
        surface_space;
        reference_date = ref_time,
        t_start,
        regridder_type,
    )
    P_atmos = TimeVaryingInput(
        joinpath(era5_artifact_path, "era5_2021_0.9x1.25.nc"),
        "sp",
        surface_space;
        reference_date = ref_time,
        t_start,
        regridder_type,
    )

etc for each variable and then

    atmos = PrescribedAtmosphere(
        precip,
        snow_precip,
        T_atmos,
        u_atmos,
        q_atmos,
        P_atmos,
        ref_time,
        h_atmos,
        earth_param_set,
    )

and instead just takes the file, earth_param_set, ref_time... etc and makes atmos directly. We may still have to create an object for each individual variable internally.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants