Skip to content

Set default snow parameters to calibrated values #1137

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions experiments/long_runs/snowy_land.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function setup_prob(
SAI = FT(0.0) # m2/m2
f_root_to_shoot = FT(3.5)
RAI = FT(1.0)
K_sat_plant = FT(7e-8) # m/s
K_sat_plant = FT(7e-8) # m/s
ψ63 = FT(-4 / 0.0098) # / MPa to m
Weibull_param = FT(4) # unitless
a = FT(0.2 * 0.0098) # 1/m
Expand Down Expand Up @@ -316,11 +316,11 @@ function setup_prob(
# α_snow = Snow.ConstantAlbedoModel(FT(0.7))
# Set β = 0 in order to regain model without density dependence
α_snow = Snow.ZenithAngleAlbedoModel(
FT(0.64),
FT(0.06),
FT(2);
β = FT(0.4),
x0 = FT(0.2),
FT(0.7899), # Calibrated
FT(0.06575), # Calibrated
FT(17.92); # Calibrated
β = FT(0.7875), # Calibrated
x0 = FT(0.1046), # Calibrated
)
horz_degree_res =
sum(ClimaLand.Domains.average_horizontal_resolution_degrees(domain)) / 2 # mean of resolution in latitude and longitude, in degrees
Expand Down
28 changes: 16 additions & 12 deletions src/standalone/Snow/Snow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ end
AbstractAlbedoModel{FT}

Defines the model type for albedo parameterization
for use within an `AbstractSnowModel` type.
for use within an `AbstractSnowModel` type.

These parameterizations are stored in parameters.α_snow, and
These parameterizations are stored in parameters.α_snow, and
are used to update the value of p.snow.α_snow (the broadband
albedo of the snow at a point).
stored
stored
"""
abstract type AbstractAlbedoModel{FT <: AbstractFloat} end

Expand All @@ -110,8 +110,8 @@ Establishes the albedo parameterization where albedo
depends on the cosine of the zenith angle of the sun, as
α = f(x) * [α_0 + Δα*exp(-k*cos(θs))],

where cos θs is the cosine of the zenith angle, α_0, Δα, and k
are free parameters. The factor out front is a function of
where cos θs is the cosine of the zenith angle, α_0, Δα, and k
are free parameters. The factor out front is a function of
x = ρ_snow/ρ_liq, of the form f(x) = min(1 - β(x-x0), 1). The parameters
x0 ∈ [0,1] and β ∈ [0,1] are free. Choose β = 0 to remove this dependence on snow density.

Expand All @@ -136,8 +136,8 @@ function ZenithAngleAlbedoModel(
α_0::FT,
Δα::FT,
k::FT;
β = FT(0),
x0 = FT(0.2),
β = FT(0.7875), # Calibrated value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can change the constructor to supply defaults for all parameters now, and then use this in the long run.

x0 = FT(0.1046), # Calibrated value
) where {FT}
@assert 0 ≤ x0 ≤ 1
@assert 0 ≤ β ≤ 1
Expand All @@ -148,17 +148,17 @@ end
AbstractSnowCoverFractionModel{FT}

Defines the model type for snow cover parameterization
for use within an `AbstractSnowModel` type.
for use within an `AbstractSnowModel` type.

These parameterizations are stored in parameters.scf, and
These parameterizations are stored in parameters.scf, and
are used to update the value of p.snow.snow_cover_fraction.
"""
abstract type AbstractSnowCoverFractionModel{FT <: AbstractFloat} end

"""
WuWuSnowCoverFractionModel{FT <: AbstractFloat} <: AbstractSnowCoverFractionModel{FT}

Establishes the snow cover parameterization of Wu, Tongwen, and
Establishes the snow cover parameterization of Wu, Tongwen, and
Guoxiong Wu. "An empirical formula to compute
snow cover fraction in GCMs." Advances in Atmospheric Sciences
21 (2004): 529-535,
Expand All @@ -171,7 +171,7 @@ horizontal resolution of the simulation, in degrees, and β0, β_min and γ
are unitless. It is correct to think of β0, β_min, γ, and z0 as the free
parameters, while horz_degree_res is provided and β_scf is determined.

β0, β_min, γ, and β_scf must be > 0.
β0, β_min, γ, and β_scf must be > 0.

From Wu and Wu et al, β0 ∼ 1.77 and γ ∼ 0.08, over a range of 1.5-4.5∘
"""
Expand Down Expand Up @@ -293,7 +293,11 @@ function SnowParameters{FT}(
density::DM = MinimumDensityModel(FT(200)),
z_0m = FT(0.0024),
z_0b = FT(0.00024),
α_snow::AM = ConstantAlbedoModel(FT(0.8)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of our unit tests fail probably because they use this default.

Others fail probably because they are testing the default of the ZenithAngleAlbedo model and now that has changed.

can test locally with "julia --project=test test/standalone/Snow/test_file_name.jl" for each of the files in that directory.

α_snow::AM = ZenithAngleAlbedoModel(
FT(0.7899), # Calibrated α_0
FT(0.06575), # Calibrated Δα
FT(17.92), # Calibrated k
), # β and x0 default values are calibrated as well
Comment on lines +296 to +300
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Changed default snow albedo model to calibrated values

Major improvement: Changed the default snow albedo model from a simple constant value (ConstantAlbedoModel(0.8)) to a more sophisticated zenith-angle-dependent model with calibrated parameters.

This change will provide more realistic snow albedo representation by default, accounting for both solar angle and snow density effects.

The pipeline reports a formatting issue around this line. Please fix the indentation to match the project's formatting guidelines:

#!/bin/bash
# Check the formatting error mentioned in the pipeline failure
grep -A 10 "Git diff detected formatting changes" pipeline_failures.txt

ϵ_snow = FT(0.99),
θ_r = FT(0.08),
Ksat = FT(1e-3),
Expand Down
Loading