-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add param extension with ClimaParameters name map
- Loading branch information
1 parent
d73a834
commit 27bc58e
Showing
11 changed files
with
84 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module CreateParametersExt | ||
|
||
import Thermodynamics.Parameters.ThermodynamicsParameters | ||
import CLIMAParameters as CP | ||
|
||
ThermodynamicsParameters(FT) = ThermodynamicsParameters(CP.create_toml_dict(FT)) | ||
|
||
function ThermodynamicsParameters(toml_dict::CP.AbstractTOMLDict) | ||
name_map = Dict{String, String}( | ||
"temperature_min_at_reference" => "T_min_ref", | ||
"entropy_water_vapor" => "entropy_water_vapor", | ||
"entropy_dry_air" => "entropy_dry_air", | ||
"potential_temperature_reference_pressure" => "p_ref_theta", | ||
"entropy_reference_temperature" => "entropy_reference_temperature", | ||
"temperature_saturation_adjustment_max" => "T_max", | ||
"molar_mass_dry_air" => "molmass_dryair", | ||
"pow_icenuc" => "pow_icenuc", | ||
"temperature_triple_point" => "T_triple", | ||
"adiabatic_exponent_dry_air" => "kappa_d", | ||
"pressure_triple_point" => "press_triple", | ||
"thermodynamics_temperature_reference" => "T_0", | ||
"temperature_water_freeze" => "T_freeze", | ||
"isobaric_specific_heat_ice" => "cp_i", | ||
"latent_heat_sublimation_at_reference" => "LH_s0", | ||
"isobaric_specific_heat_vapor" => "cp_v", | ||
"molar_mass_water" => "molmass_water", | ||
"mean_sea_level_pressure" => "MSLP", | ||
"isobaric_specific_heat_liquid" => "cp_l", | ||
"latent_heat_vaporization_at_reference" => "LH_v0", | ||
"temperature_saturation_adjustment_min" => "T_min", | ||
"gas_constant" => "gas_constant", | ||
"temperature_mean_at_reference" => "T_surf_ref", | ||
"gravitational_acceleration" => "grav", | ||
"temperature_homogenous_nucleation" => "T_icenuc", | ||
) | ||
parameters = CP.get_parameter_values(toml_dict, name_map, "Thermodynamics") | ||
FT = CP.float_type(toml_dict) | ||
return ThermodynamicsParameters{FT}(; parameters...) | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters