Skip to content

Commit

Permalink
Merge pull request #3566 from CliMA/zs/up_rrtmgp
Browse files Browse the repository at this point in the history
update RRTMGP
  • Loading branch information
szy21 authored Jan 31, 2025
2 parents 2ff7b58 + 0e47301 commit 989a900
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .buildkite/Manifest-v1.11.toml
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ version = "0.5.7"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"

[[deps.ClimaAtmos]]
deps = ["ArgParse", "ArtifactWrappers", "Artifacts", "AtmosphericProfilesLibrary", "ClimaComms", "ClimaCore", "ClimaDiagnostics", "ClimaParams", "ClimaTimeSteppers", "ClimaUtilities", "CloudMicrophysics", "Dates", "DiffEqBase", "FastGaussQuadrature", "Insolation", "Interpolations", "LazyArtifacts", "LazyBroadcast", "LinearAlgebra", "Logging", "NCDatasets", "NVTX", "RRTMGP", "Random", "SciMLBase", "StaticArrays", "Statistics", "SurfaceFluxes", "Thermodynamics", "UnrolledUtilities", "YAML"]
deps = ["ArgParse", "Artifacts", "AtmosphericProfilesLibrary", "ClimaComms", "ClimaCore", "ClimaDiagnostics", "ClimaParams", "ClimaTimeSteppers", "ClimaUtilities", "CloudMicrophysics", "Dates", "DiffEqBase", "FastGaussQuadrature", "Insolation", "Interpolations", "LazyArtifacts", "LazyBroadcast", "LinearAlgebra", "Logging", "NCDatasets", "NVTX", "RRTMGP", "Random", "SciMLBase", "StaticArrays", "Statistics", "SurfaceFluxes", "Thermodynamics", "UnrolledUtilities", "YAML"]
path = ".."
uuid = "b2c96348-7fb7-4fe0-8da9-78d88439e717"
version = "0.28.3"
Expand Down Expand Up @@ -1977,9 +1977,9 @@ version = "1.11.0"

[[deps.RRTMGP]]
deps = ["Adapt", "Artifacts", "ClimaComms", "DocStringExtensions", "Random"]
git-tree-sha1 = "7a79ddde89bf2082d13fbf2f80428e0439e15128"
git-tree-sha1 = "56240e81cd9fa6dde6c860509cb88833920d0d99"
uuid = "a01a1ee8-cea4-48fc-987c-fc7878d79da1"
version = "0.19.1"
version = "0.19.2"
weakdeps = ["CUDA", "ClimaParams"]

[deps.RRTMGP.extensions]
Expand Down
2 changes: 1 addition & 1 deletion .dev/climaformat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
println("climaformat.jl has been discontinued in favor of JuliaFormatter")
println("To use JuliaFormatter, add it to your base environment with: ")
println()
println("julia -e 'using Pkg. Pkg.add(\"JuliaFormatter\")'")
println("julia -e 'using Pkg; Pkg.add(\"JuliaFormatter\")'")
println()
println("Then, format your current package with")
println()
Expand Down
2 changes: 1 addition & 1 deletion .dev/up_deps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
println("up_dev.jl has been discontinued in favor of PkgDevTools")
println("To use PkgDevTool, add it to your base environment with: ")
println()
println("julia -e 'using Pkg. Pkg.add(\"PkgDevTools\")'")
println("julia -e 'using Pkg; Pkg.add(\"PkgDevTools\")'")
println()
println("Then, update the manifests with")
println("using PkgDevTools; PkgDevToos.update_deps(\".\")")
Expand Down
5 changes: 4 additions & 1 deletion reproducibility_tests/ref_counter.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
207
208

# **README**
#
Expand All @@ -20,6 +20,9 @@


#=
208
- Update RRTMGP to v0.19.2, which changes cloud optics slightly
207
- Changes in the CI for the working fluid
Expand Down
20 changes: 2 additions & 18 deletions src/parameterized_tendencies/radiation/RRTMGPInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@ array.
- `disable_shortwave`: whether to ignore shortwave fluxes
- `use_one_scalar_mode`: whether to use the one-scalar method for computing
optical properties instead of the default two-stream method
- `use_pade_cloud_optics_mode`: whether to use PADE interpolation for computing
cloud optical properties instead of the default LUT interpolation
- `use_global_means_for_well_mixed_gases`: whether to use a scalar value to
represent the volume mixing ratio of each well-mixed gas (i.e., a gas that is
not water vapor or ozone), instead of using an array that represents a
Expand Down Expand Up @@ -432,7 +430,6 @@ function RRTMGPModel(
disable_longwave::Bool = false,
disable_shortwave::Bool = false,
use_one_scalar_mode::Bool = false,
use_pade_cloud_optics_mode::Bool = false,
use_global_means_for_well_mixed_gases::Bool = false,
kwargs...,
)
Expand All @@ -449,13 +446,6 @@ function RRTMGPModel(
@warn "upward shortwave fluxes are not computed when \
use_one_scalar_mode is true"
end
if use_pade_cloud_optics_mode && (
radiation_mode isa GrayRadiation ||
radiation_mode isa ClearSkyRadiation
)
@warn "use_pade_cloud_optics_mode is ignored when using GrayRadiation \
or ClearSkyRadiation"
end
if use_global_means_for_well_mixed_gases && radiation_mode isa GrayRadiation
@warn "use_global_means_for_well_mixed_gases is ignored when using \
GrayRadiation"
Expand Down Expand Up @@ -538,10 +528,7 @@ function RRTMGPModel(
data_loader(
RRTMGP.ArtifactPaths.get_lookup_filename(:cloud, :lw),
) do ds
lookup_lw_cld =
use_pade_cloud_optics_mode ?
RRTMGP.LookUpTables.PadeCld(ds, FT, DA) :
RRTMGP.LookUpTables.LookUpCld(ds, FT, DA)
lookup_lw_cld = RRTMGP.LookUpTables.LookUpCld(ds, FT, DA)
end
lookups = (; lookups..., lookup_lw_cld)
end
Expand Down Expand Up @@ -615,10 +602,7 @@ function RRTMGPModel(
data_loader(
RRTMGP.ArtifactPaths.get_lookup_filename(:cloud, :sw),
) do ds
lookup_sw_cld =
use_pade_cloud_optics_mode ?
RRTMGP.LookUpTables.PadeCld(ds, FT, DA) :
RRTMGP.LookUpTables.LookUpCld(ds, FT, DA)
lookup_sw_cld = RRTMGP.LookUpTables.LookUpCld(ds, FT, DA)
end
lookups = (; lookups..., lookup_sw_cld)
end
Expand Down
2 changes: 1 addition & 1 deletion src/parameterized_tendencies/radiation/radiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function radiation_model_cache(
kwargs = (;
kwargs...,
center_cloud_liquid_effective_radius = 12,
center_cloud_ice_effective_radius = 50, # rrtmgp uses diameter for ice
center_cloud_ice_effective_radius = 25,
ice_roughness = 2,
)
ᶜz = Fields.coordinate_field(Y.c).z
Expand Down

0 comments on commit 989a900

Please sign in to comment.