-
Notifications
You must be signed in to change notification settings - Fork 190
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
Change default output array type for JLD2OutputWriter
to Array{Float64}
#2890
Conversation
…t64} While `Array{Float32}` is neat because user output is smaller, it's a bad default because it often leads to confusing results, like the fact that outputing `Field(Integral(c))` is different (possibly by `eps(Float32)`) than computing `Integral(c_output)` in post processing. Thus @xkykai and I propose to make the default `Array{Float64}`. We could regard outputting with `Array{Float32}` as an "optimization" which is premature as a default.
JLD2OutputWriter
to Array{Floa…JLD2OutputWriter
to Array{Float64}`
JLD2OutputWriter
to Array{Float64}`JLD2OutputWriter
to Array{Float64}
cc @navidcy we also ran into this problem with ParameterEstimocean once |
I remember… took days to figure out what was happening |
Only for JLD2OutputeWriter? |
Good point. |
test/test_netcdf_output_writer.jl
Outdated
@test eltype(ds2["xC"]) == Float64 | ||
@test eltype(ds2["xF"]) == Float64 | ||
@test eltype(ds2["yC"]) == Float64 | ||
@test eltype(ds2["yF"]) == Float64 | ||
@test eltype(ds2["zC"]) == Float64 | ||
@test eltype(ds2["zF"]) == Float64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ds2
is nc_sliced_writer
which was constructed with explicit array_type = Array{Float32}
(fyi I stopped the tests because everything was clogged... all tests in PRs have been running for 6-7 hrs... so perhaps restart when there is less load) |
merge? |
Let's bump |
why 0.79.3? we are only up to 0.79.1... am I missing something? |
you;re right |
Merge? |
While
Array{Float32}
is neat because user output is smaller, it's a bad default because it often leads to confusing results, like the fact that outputingField(Integral(c))
is different (possibly byeps(Float32)
) than computingIntegral(c_output)
in post processing whenField(Integral(c))
is close to 0.Thus @xkykai and I propose to make the default
Array{Float64}
. We could regard outputting withArray{Float32}
as an "optimization" which is premature as a default.