From 0350cf36f867764eb0cc1f28d54ffbc50b49c621 Mon Sep 17 00:00:00 2001 From: amylu00 Date: Tue, 11 Jul 2023 17:25:11 -0700 Subject: [PATCH] Adding homogeneous J example plot comparing plots testing stuff out Adding homogeneous J example plot add new velocity types to exports fix apparent nucleation Add predicting properties from the p3 scheme Move ice nucleation J params to CLIMAParams Fix package deps for a release adding area docs Update to julia 1.9.2 Simplify Microphysics0M Fix nucleation parameter flow, const statements Add project to test path Update to new thermodynamics bump version down Add KA13 J vs T plots Restructure CloudMicrophysics 0M code bump down julia compat req. fix broadcasting issue for ClimaAtmos Update P3 scheme to new parameters, cleanup code and docs plots Add additional constructors for CloudMicrophysicsParameters0M and CloudMicrophysicsParametersP3 introduce water water_activity typo? documentation + moving plot file to folder duplicate in bibliography Add aqua tests, small fixes for tests untangling water activity from abifm docs fix plot --- docs/bibliography.bib | 39 +++++--- docs/src/IceNucleation.md | 61 +++++++++---- .../ice_nucleation_plots/HomFreezingPlots.jl | 90 +++++++++++++++++++ 3 files changed, 159 insertions(+), 31 deletions(-) create mode 100644 docs/src/ice_nucleation_plots/HomFreezingPlots.jl diff --git a/docs/bibliography.bib b/docs/bibliography.bib index cf6541c91..3cc758271 100644 --- a/docs/bibliography.bib +++ b/docs/bibliography.bib @@ -260,6 +260,19 @@ @article{Kirkby2016 year = {2016} } +@Article{KnopfAlpert2013, + author = "Knopf, Daniel A. and Alpert, Peter A.", + title = "A water activity based model of heterogeneous ice nucleation kinetics for freezing of water and aqueous solution droplets", + journal = "Faraday Discuss.", + year = "2013", + volume = "165", + issue = "0", + pages = "513-534", + publisher = "The Royal Society of Chemistry", + doi = "10.1039/C3FD00035D", + url = "http://dx.doi.org/10.1039/C3FD00035D", +} + @article{Koop2000, author = {Koop, Thomas and al, et}, title = {Water activity as the determinant for homogeneous ice nucleation in aqueous solutions}, @@ -516,6 +529,18 @@ @article{SeifertBeheng2006 publisher = {Springer} } +@article{Spichtinger2023, + AUTHOR = {Spichtinger, P. and Marschalik, P. and Baumgartner, M.}, + TITLE = {Impact of formulations of the homogeneous nucleation rate on ice nucleation events in cirrus}, + JOURNAL = {Atmospheric Chemistry and Physics}, + VOLUME = {23}, + YEAR = {2023}, + NUMBER = {3}, + PAGES = {2035--2060}, + URL = {https://acp.copernicus.org/articles/23/2035/2023/}, + DOI = {10.5194/acp-23-2035-2023} +} + @article{TripoliCotton1980, title = {A Numerical Investigation of Several Factors Contributing to the Observed Variable Intensity of Deep Convection over South Florida}, author = {Tripoli, G.J. and Cotton, W.R.}, @@ -569,17 +594,3 @@ @article{Wood2005 doi = {10.1175/JAS3530.1}, year = {2005} } - -@article{SeifertBeheng2006, - title={A two-moment cloud microphysics parameterization for mixed-phase clouds. Part 1: Model description}, - author={Seifert, Axel and Beheng, Klaus Dieter}, - journal={Meteorology and atmospheric physics}, - volume={92}, - number={1-2}, - pages={45--66}, - doi = {https://doi.org/10.1007/s00703-005-0112-4}, - year={2006}, - publisher={Springer} -} - - diff --git a/docs/src/IceNucleation.md b/docs/src/IceNucleation.md index 55fe6594b..61c25dfc6 100644 --- a/docs/src/IceNucleation.md +++ b/docs/src/IceNucleation.md @@ -80,23 +80,7 @@ per second via immersion freezing. where ``A`` is surface area of an individual ice nuclei, ``N_{tot}`` is total number of ice nuclei, and ``N_{ice}`` is number of ice crystals already in the system. -## Homogeneous Freezing for Sulphuric Acid Containing Droplets -Homogeneous freezing occurs when supercooled liquid droplets freeze on their own. - Closly based off [Koop2000](@cite), this parameterization determines a homoegneous nucleation - rate coefficient, ``J_{hom}``, using water activity. The change in water activity, - ``\Delta a_w(c,T,P)``, can be found in the same fashion that it is determined under the ABIFM - section above. It is then used to empirically calculate ``J_{hom}(\Delta a_w)`` with units of - ``cm^{-3}s^{-1}``. - -The nucleation rate coefficient is determined with the cubic function from [Koop2000](@cite) -```math -\begin{equation} - logJ_{hom} = -906.7 + 8502 \Delta a_w - 26924(\Delta a_w)^2 + 29180(\Delta a_w)^3 -\end{equation} -``` -This parameterization is valid only when ``0.26 < \Delta a_w < 0.36`` and ``185K < T < 235K``. - -## ABIFM Example Figures +### ABIFM Example Figures The following plot shows ``J`` as a function of ``\Delta a_w`` as compared to figure 1 in Knopf & Alpert 2013. Solution droplets were assumed to contain a constant 10% wt. sulphuric acid. Changing the concentration will simply @@ -133,3 +117,46 @@ where `T_dew` is the dewpoint (in this example, it is constant at -45C). It is also important to note that this plot is reflective of cirrus clouds and shows only a very small temperature range. The two curves are slightly off because of small differences in parameterizations for vapor pressures. + +## Homogeneous Freezing for Sulphuric Acid Containing Droplets +Homogeneous freezing occurs when supercooled liquid droplets freeze on their own. + Closly based off [Koop2000](@cite), this parameterization determines a homoegneous nucleation + rate coefficient, ``J_{hom}``, using water activity. The change in water activity, + ``\Delta a_w(c,T,P)``, can be found in `Common.jl` and is described in the + `Water Activity section`. It is then used to empirically calculate ``J_{hom}(\Delta a_w)`` + with units of ``cm^{-3}s^{-1}``. + +The nucleation rate coefficient is determined with the cubic function from [Koop2000](@cite) +```math +\begin{equation} + logJ_{hom} = -906.7 + 8502 \Delta a_w - 26924(\Delta a_w)^2 + 29180(\Delta a_w)^3 +\end{equation} +``` +This parameterization is valid only when ``0.26 < \Delta a_w < 0.36`` and ``185K < T < 235K``. + +### Homogeneous Ice Nucleation Rate Coefficient +Here is a comparison of our parameterization of ``J_{hom}`` compared to Koop 2000 as + plotted in figure 1 of [Spichtinger2023](@cite). Our parameterization differs in the calculation + of ``\Delta a_w``. We define water activity to be a ratio of saturated vapor pressures whereas + Koop 2000 uses the difference in chemical potential. + +```@example +include("ice_nucleation_plots/HomFreezingPlots.jl") +``` +![](HomFreezingPlots.svg) + +It should be noted that the Koop 2000 + parameterization is only valid for temperatures up to 240K and a temperature-dependent max + pressure. The max valid pressure becomes negative around 237K, so the Koop 2000 parameterizaiton + should not be valid beyond 237K. For this reason, we limit the curve from [Spichtinger2023](@cite) + to 237K. + +Multiple sulphuric acid concentrations, ``x``, + are plotted since the actual concentration used in literature values is unspecified. + +!!! note + + Spichtinger plot may be under the condition that x = 0 (pure liquid droplets). + The current parameterization in CloudMicrophysics.jl is not valid for \Delta a_w + values that are obtained from pure water droplets. Though CliMA lines look far + from the Spichtinger 2023 line, the lines seem to move closer as x approaches 0. diff --git a/docs/src/ice_nucleation_plots/HomFreezingPlots.jl b/docs/src/ice_nucleation_plots/HomFreezingPlots.jl new file mode 100644 index 000000000..e41cb3f87 --- /dev/null +++ b/docs/src/ice_nucleation_plots/HomFreezingPlots.jl @@ -0,0 +1,90 @@ +import CairoMakie as MK + +import Thermodynamics as TD +import CloudMicrophysics as CM +import CLIMAParameters as CP + +const CMO = CM.Common +const CMI = CM.HomIceNucleation +const CMP = CM.Parameters + +include(joinpath(pkgdir(CM), "test", "create_parameters.jl")) +FT = Float64 +toml_dict = CP.create_toml_dict(FT; dict_type = "alias") +const prs = cloud_microphysics_parameters(toml_dict) +thermo_params = CMP.thermodynamics_params(prs) + +# Initializing +T_range = range(229.0, stop = 234.5, length = 50) # air temperature +x_sulph = Vector{FT}([0.03, 0.04, 0.06]) # wt% sulphuric acid in droplets + +# Solving for Δa and J values +Δa1 = [CMO.Delta_a_w(prs, x_sulph[1], T) for T in T_range] +Δa2 = [CMO.Delta_a_w(prs, x_sulph[2], T) for T in T_range] +Δa3 = [CMO.Delta_a_w(prs, x_sulph[3], T) for T in T_range] + +J1 = @. CMI.homogeneous_J(prs, Δa1) +J2 = @. CMI.homogeneous_J(prs, Δa2) +J3 = @. CMI.homogeneous_J(prs, Δa3) + +log10J_1 = @. log10(J1) +log10J_2 = @. log10(J2) +log10J_3 = @. log10(J3) + +Δa_range = range(0.27, stop = 0.32, length = 50) +J_given_Δa = @. CMI.homogeneous_J(prs, Δa_range) + +#! format: off +# Spichtinger et al 2023 +# https://acp.copernicus.org/articles/23/2035/2023/acp-23-2035-2023.pdf +# Values are from Koop et al. (2000) line in Figure 1 +Spichtinger2023_temp = [ + 230.0139, 231.0179, 231.9860, 233.00797, 234.01195, 235.01594, 236.00199, 237.16733, +] +Spichtinger2023_log10J = [ + 24.33735, 22.6506, 21.0843, 19.5181, 18.072289, 16.626506, 15.24096, 13.493975, +] + +# Baumgartner et al 2022 +# https://acp.copernicus.org/articles/22/65/2022/acp-22-65-2022.pdf +# Figure 2a +Baum_Delta_a = [0.26, 0.27, 0.28, 0.29, 0.3, 0.32, 0.33, 0.339] +Baum_J = [4.25e-5, 0.306, 454.09, 2.06e5, 6.31e7, 1.8e12, 4.45e14, 1.69e17] + +# Plotting +fig = MK.Figure(resolution = (800, 500)) +ax1 = MK.Axis( + fig[1, 1], + ylabel = "log10(J) with J in SI units", + xlabel = "Temperature [K]", + title = "CliMA vs Spichtinger2023", + xticklabelsize = 14.0f0, + xlabelsize = 14, + ylabelsize = 14, + limits = ((228.0, 240.0), nothing), +) +ax2 = MK.Axis( + fig[1, 2], + xlabel = "Δa_w [-]", + ylabel = "J [cm^-3 s^-1]", + title = "CliMA vs Baumgartner2022", + yscale = log10, + xticklabelsize = 14.0f0, + xlabelsize = 14, + ylabelsize = 14, +) + +MK.lines!(ax1, Spichtinger2023_temp, Spichtinger2023_log10J, label = "Spichtinger 2023 x = ?") +MK.lines!(ax1, T_range, log10J_1, label = "CliMA x = 0.03") +MK.lines!(ax1, T_range, log10J_2, label = "CliMA x = 0.04") +MK.lines!(ax1, T_range, log10J_3, label = "CliMA x = 0.06") + +MK.lines!(ax2, Baum_Delta_a, Baum_J, label = "Baumgartner 2022") +MK.lines!(ax2, Δa_range, J_given_Δa .* 1e-6, label = "CliMA") +#! format: on + +MK.axislegend(ax1, position = :rt, labelsize = 13.0f0) +MK.axislegend(ax2, position = :rb, labelsize = 14.0f0) + +MK.save("HomFreezingPlots.svg", fig) +fig