-
Notifications
You must be signed in to change notification settings - Fork 195
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
Use default reader_kw=nothing
to make FieldTimeSeries
concretely typed
#3898
Comments
Ah good catch! Yeah |
It could be nice to support both |
Hmmm, might have to default to julia> f(x, y; kwargs...) = @show kwargs
f (generic function with 1 method)
julia> N = nothing
julia> f(1, 2; N...)
ERROR: MethodError: no method matching iterate(::Nothing)
Closest candidates are:
iterate(::Base.AsyncGenerator, ::Base.AsyncGeneratorState)
@ Base asyncmap.jl:362
iterate(::Base.AsyncGenerator)
@ Base asyncmap.jl:362
iterate(::Core.MethodMatch, ::Int64)
@ Base deprecated.jl:265
...
Stacktrace:
[1] merge(a::@NamedTuple{}, itr::Nothing)
@ Base ./namedtuple.jl:361
[2] top-level scope
@ REPL[12]:1 |
That works. I think they are sort of identical in the end |
The default is not a concrete type which may cause performance issues when
FieldTimeSeries
is used as boundary condition or forcing in a kernel:Oceananigans.jl/src/OutputReaders/field_time_series.jl
Line 373 in 6c40d7e
I suggest
nothing
as the default. Users can still change it if they want.We could also use a
NamedTuple
instead ofDict
.@ali-ramadhan I think you maybe were not thinking that we use
FieldTimeSeries
in kernels and models now (not just for reading output)The text was updated successfully, but these errors were encountered: