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

Remove t_start from diagnostics #3287

Merged
merged 2 commits into from
Sep 11, 2024
Merged
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
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ ClimaAtmos.jl Release Notes
Main
-------

### ![][badge-🐛bugfix] Bug fixes

- Fixed incorrect time/date conversion in diagnostics when restarting a
simulation. PR [3287](https://github.com/CliMA/ClimaAtmos.jl/pull/3287)

v0.27.5
-------
- Update RRTMGP and allow multiple aerosols for radiation.
Expand Down
1 change: 1 addition & 0 deletions config/model_configs/plane_density_current_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ z_stretch: false
x_elem: 80
config: "plane"
z_max: 6400.0
output_default_diagnostics: false
diagnostics:
- short_name: thetaa
period: 900secs
13 changes: 4 additions & 9 deletions src/callbacks/get_callbacks.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function get_diagnostics(parsed_args, atmos_model, Y, p, t_start, dt)
function get_diagnostics(parsed_args, atmos_model, Y, p, dt)

FT = Spaces.undertype(axes(Y.c))

Expand Down Expand Up @@ -105,19 +105,15 @@ function get_diagnostics(parsed_args, atmos_model, Y, p, t_start, dt)
output_schedule = CAD.EveryCalendarDtSchedule(
period_dates;
reference_date = p.start_date,
t_start,
)
compute_schedule = CAD.EveryCalendarDtSchedule(
period_dates;
reference_date = p.start_date,
t_start,
)
else
period_seconds = FT(time_to_seconds(period_str))
output_schedule =
CAD.EveryDtSchedule(period_seconds; t_start)
compute_schedule =
CAD.EveryDtSchedule(period_seconds; t_start)
output_schedule = CAD.EveryDtSchedule(period_seconds)
compute_schedule = CAD.EveryDtSchedule(period_seconds)
end

if isnothing(output_name)
Expand Down Expand Up @@ -154,7 +150,6 @@ function get_diagnostics(parsed_args, atmos_model, Y, p, t_start, dt)
diagnostics = [
CAD.default_diagnostics(
atmos_model,
t_start,
time_to_seconds(parsed_args["t_end"]),
p.start_date;
output_writer = netcdf_writer,
Expand All @@ -177,7 +172,7 @@ function get_diagnostics(parsed_args, atmos_model, Y, p, t_start, dt)
return diagnostics, writers
end

function get_callbacks(config, sim_info, atmos, params, Y, p, t_start)
function get_callbacks(config, sim_info, atmos, params, Y, p)
(; parsed_args, comms_ctx) = config
FT = eltype(params)
(; dt, output_dir) = sim_info
Expand Down
Loading
Loading