Skip to content

Commit

Permalink
Fix start_date
Browse files Browse the repository at this point in the history
It was not working with AtmosCache
  • Loading branch information
Sbozzolo committed Oct 28, 2024
1 parent ef31693 commit 7e72202
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# NEWS

v0.2.10
-------
## Bug fixes

Fixed broken `start_date` feature.

v0.2.9
-------

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ClimaDiagnostics"
uuid = "1ecacbb8-0713-4841-9a07-eb5aa8a2d53f"
authors = ["Gabriele Bozzola <[email protected]>"]
version = "0.2.9"
version = "0.2.10"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand Down
4 changes: 3 additions & 1 deletion src/netcdf_writer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ function write_field!(writer::NetCDFWriter, field, diagnostic, u, p, t)

start_date = nothing
if isnothing(writer.start_date)
start_date = get(p, :start_date, nothing)
if hasproperty(p, :start_date)
start_date = getproperty(p, :start_date)
end
else
start_date = writer.start_date
end
Expand Down

0 comments on commit 7e72202

Please sign in to comment.