Skip to content

Commit

Permalink
use CC space for albedo
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Aug 17, 2023
1 parent 8708c03 commit cc9c318
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions test/standalone/Bucket/albedo_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,8 @@ end
end)
t_start = FT(0)

albedo = BulkAlbedoTemporal{FT}(
regrid_dir_temporal,
date_ref,
t_start,
space,
)
albedo =
BulkAlbedoTemporal{FT}(regrid_dir_temporal, date_ref, t_start, space)

Y = (; bucket = (; W = Fields.zeros(space)))
p = (; bucket = (; α_sfc = Fields.zeros(space)))
Expand Down Expand Up @@ -373,23 +369,25 @@ end
input_file = bareground_albedo_dataset_path()
date_ref = Dates.DateTime(1900, 1, 1)
t_start = FT(0)
space = nothing
err = nothing

try
BulkAlbedoTemporal{FT}(
regrid_dirpath,
date_ref,
t_start,
space,
input_file = input_file,
)
catch err
end
domain = create_domain_2d(FT)
space = domain.surface.space

@test err isa Exception
@test sprint(showerror, err) ==
"Using a temporal albedo map requires data with time dimension."
let err = nothing
try
BulkAlbedoTemporal{FT}(
regrid_dirpath,
date_ref,
t_start,
space,
input_file = input_file,
)
catch err
end

@test err isa Exception
@test sprint(showerror, err) ==
"Using a temporal albedo map requires data with time dimension."
end

end

Expand Down Expand Up @@ -430,12 +428,8 @@ end
for bucket_domain in bucket_domains
space = bucket_domain.surface.space
if bucket_domain isa LSMSphericalShellDomain
albedo_model = BulkAlbedoTemporal{FT}(
regrid_dirpath,
date_ref,
t_start,
space,
)
albedo_model =
BulkAlbedoTemporal{FT}(regrid_dirpath, date_ref, t_start, space)
# Radiation
SW_d = (t) -> eltype(t)(0.0)
LW_d = (t) -> eltype(t)(5.67e-8 * 280.0^4.0)
Expand Down

0 comments on commit cc9c318

Please sign in to comment.