Skip to content

Commit

Permalink
Merge pull request #3498 from CliMA/zs/prescribe_cloud_hourly
Browse files Browse the repository at this point in the history
prescribe hourly cloud properties
  • Loading branch information
szy21 authored Jan 23, 2025
2 parents bfe5960 + 9958358 commit 482b3f5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
13 changes: 8 additions & 5 deletions Artifacts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ git-tree-sha1 = "a4bf66aab365d42abe428129457327d5244ed6b0"
[ozone_concentrations]
git-tree-sha1 = "235a16e02c24a28b20244c0f2e7f149cc783166f"

[era5_cloud]
git-tree-sha1 = "8bad412ada94be95a2e11c794b499c49d746be50"

[cfsite_gcm_forcing]
git-tree-sha1 = "2f196bcac8950f8cb79ead41821f423d092b8951"
lazy = true
Expand Down Expand Up @@ -44,12 +47,12 @@ git-tree-sha1 = "9c3bd05b68e820fceb43d130ce6b4e86ce788e4e"
sha256 = "46923ec3e1f9028a11899c47e6b13d675d84daa9db2f37351a19ec9187f87865"
url = "https://caltech.box.com/shared/static/fuwajscgyblccy8y9aq01d0pgy91gwut.gz"

[era5_cloud]
git-tree-sha1 = "10742e0a2e343d13bb04df379e300a83402d4106"
[era5_cloud_lowres]
git-tree-sha1 = "b42adb958f0b2ba34194e5f5440753be5bb4dc34"

[[era5_cloud.download]]
sha256 = "bb51e2f2d315b487e05a8d38944d4ad937ee4a40c43b68541220c5d54425e24a"
url = "https://caltech.box.com/shared/static/b6ur4ap4vo04j09vdulem96z9fxqlgyn.gz"
[[era5_cloud_lowres.download]]
sha256 = "469d656f94f6e168c559399f9941e09cd16bc47d6fea3de44b511842ba7137b1"
url = "https://caltech.box.com/shared/static/lr9k1s2pgeqzli8goxq9y2liiy3u6kni.gz"

[DYAMOND_SUMMER_ICS_p98deg]
git-tree-sha1 = "46aa28a9177dd7e4cbb813eeba3e02597c3ba071"
Expand Down
1 change: 1 addition & 0 deletions reproducibility_tests/ref_counter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@


#=
203
- Remove `override_precip_timescale`
Expand Down
5 changes: 4 additions & 1 deletion src/callbacks/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ NVTX.@annotate function rrtmgp_model_callback!(integrator)
end

# assume that ᶜq_vap = ᶜq_tot when computing ᶜvmr_h2o
@. ᶜvmr_h2o = TD.shum_to_mixing_ratio(ᶜq_tot, ᶜq_tot)
@. ᶜvmr_h2o = TD.vol_vapor_mixing_ratio(
thermo_params,
TD.PhasePartition(ᶜq_tot),
)
else
@. ᶜvmr_h2o = TD.vol_vapor_mixing_ratio(
thermo_params,
Expand Down
7 changes: 2 additions & 5 deletions src/parameterized_tendencies/radiation/radiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function radiation_model_cache(
kwargs = (;
kwargs...,
# assuming fixed aerosol radius
center_dust_radius = 0.2,
center_dust_radius = 0.55,
center_ss_radius = 11.5,
center_dust_column_mass_density = NaN, # initialized in callback
center_ss_column_mass_density = NaN, # initialized in callback
Expand Down Expand Up @@ -311,10 +311,7 @@ function get_cloud_cache(::PrescribedCloudInRadiation, Y, start_date)
extrapolation_bc = (Intp.Periodic(), Intp.Flat(), Intp.Flat())
timevaryinginputs = [
TimeVaryingInput(
joinpath(
@clima_artifact("era5_cloud", ClimaComms.context(Y.c)),
"era5_cloud.nc",
),
AA.era5_cloud_file_path(; context = ClimaComms.context(Y.c)),
name,
target_space;
reference_date = start_date,
Expand Down
12 changes: 12 additions & 0 deletions src/utils/AtmosArtifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ function aerosol_concentration_file_path(; context = nothing)
return res_file_path("aerosol_concentrations"; context)
end

"""
era5_cloud_file_path(; context = nothing)
Construct the file path for the era5 cloud properties NetCDF file.
When available, use the high resolution artifact. Otherwise, download and use
the low-resolution one.
"""
function era5_cloud_file_path(; context = nothing)
return res_file_path("era5_cloud"; context)
end

"""
earth_orography_file_path(; context=nothing)
Expand Down

0 comments on commit 482b3f5

Please sign in to comment.