Skip to content

Commit

Permalink
Merge pull request #3287 from CliMA/gb/remove_tstart
Browse files Browse the repository at this point in the history
Remove t_start from diagnostics
  • Loading branch information
Sbozzolo authored Sep 11, 2024
2 parents 53dc7db + a2644aa commit a22b643
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 250 deletions.
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

0 comments on commit a22b643

Please sign in to comment.