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

[WIP] Integrate ClimaParams #952

Closed
wants to merge 6 commits into from
Closed

[WIP] Integrate ClimaParams #952

wants to merge 6 commits into from

Conversation

costachris
Copy link
Member

@costachris costachris commented Apr 27, 2022

Purpose

To integrate in ClimaParameters new modular parameter code.
(Note: reference to PR #860 )

In this PR

  • New boxes of parameters for all the major TurbulenceConvection objects

Example of full TurbulenceConvectionParameters construction e.g in driver/main.jl

#imports of packages, then...
const CP = ClimaParameters
const TD = Thermodynamics
const CM = CloudMicrophysics
const SF = SurfaceFluxes
const UF = SF.UniversalFunctions
const TC = TurbulenceConvection

# build from toml file
param_struct =
    CP.create_parameter_struct(exp_filename, dict_type = "alias")

# Thermodynamics parameters
thermo_params = TD.ThermodynamicsParameters(param_struct)

# precipitation with 1-moment microphysics
micro_params = CM.Microphysics_1M_Parameters(param_struct,thermo_params)
precip_params = TC.Clima1MParameters(param_struct, thermo_params, micro_params)

# surface fluxes
uf_params = UF.BusingerParameters(param_struct) 
surf_params = SF.SurfaceFluxesParameters(
        param_struct,
        uf_params,
        thermo_params,
    )

# ...RadiationParameters one day...
# ...ForcingParameters one day...

# edmf with stochastic closure,...
entr_dimscale_params = TC.BuoyVelScaleParameters(param_struct)
mean_entr_params = TC.MDEntrParameters(param_struct)
entr_closure_params = TC.NoisyRelaxationProcessParameters(param_struct, mean_entr_params)

edmf_params = TC.EDMFParameters(
    param_struct, 
    entr_closure_params,
    entr_dimscale_params,
    precip_params,
)

# Put together all of the pieces:
param_set = TC.TurbulenceConvectionParameters(
    param_struct, 
    thermo_params,
    edmf_params, 
    precip_params,
    surf_params,
)

@costachris costachris requested a review from odunbar April 27, 2022 21:35
@costachris costachris changed the title add parameter boxes Integrate ClimaParams Apr 27, 2022
@costachris costachris changed the title Integrate ClimaParams [WIP] Integrate ClimaParams Apr 27, 2022
@yairchn yairchn self-requested a review May 1, 2022 05:42
@charleskawczynski
Copy link
Member

Superseded by #1192.

@charleskawczynski charleskawczynski deleted the integrate_climaparams branch June 21, 2022 19:18
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

Successfully merging this pull request may close these issues.

3 participants