Skip to content
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

fix bug in PR 757 #767

Merged
merged 1 commit into from
Sep 12, 2024
Merged
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
10 changes: 5 additions & 5 deletions experiments/long_runs/land_region.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (10, 10, 15))
u_atmos,
q_atmos,
P_atmos,
ref_time,
start_date,
h_atmos,
earth_param_set,
)
Expand All @@ -170,20 +170,20 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (10, 10, 15))

function zenith_angle(
t,
ref_time;
start_date;
latitude = ClimaCore.Fields.coordinate_field(surface_space).lat,
longitude = ClimaCore.Fields.coordinate_field(surface_space).long,
insol_params::Insolation.Parameters.InsolationParameters{FT} = earth_param_set.insol_params,
) where {FT}
# This should be time in UTC
current_datetime = ref_time + Dates.Second(round(t))
current_datetime = start_date + Dates.Second(round(t))

# Orbital Data uses Float64, so we need to convert to our sim FT
d, δ, η_UTC =
FT.(
Insolation.helper_instantaneous_zenith_angle(
current_datetime,
ref_time,
start_date,
insol_params,
)
)
Expand All @@ -197,7 +197,7 @@ function setup_prob(t0, tf, Δt; outdir = outdir, nelements = (10, 10, 15))
).:1
end
radiation =
PrescribedRadiativeFluxes(FT, SW_d, LW_d, ref_time; θs = zenith_angle)
PrescribedRadiativeFluxes(FT, SW_d, LW_d, start_date; θs = zenith_angle)

soil_params_artifact_path =
ClimaLand.Artifacts.soil_params_artifact_folder_path(; context)
Expand Down
Loading