diff --git a/core/src/utils.jl b/core/src/utils.jl index daeb1ca00..b2fda3d4f 100644 --- a/core/src/utils.jl +++ b/core/src/utils.jl @@ -626,7 +626,7 @@ If a value is NaN, it is not set. function set_table_row!(table::NamedTuple, row, i::Int)::NamedTuple for (symbol, vector) in pairs(table) val = getproperty(row, symbol) - if !isnan(val) + if !ismissing(val) && !isnan(val) vector[i] = val end end @@ -668,7 +668,7 @@ function set_current_value!( for (i, id) in enumerate(node_id) for (symbol, vector) in pairs(table) idx = findlast( - row -> row.node_id == id && !isnan(getproperty(row, symbol)), + row -> row.node_id == id && !ismissing(getproperty(row, symbol)), pre_table, ) if idx !== nothing diff --git a/core/src/validation.jl b/core/src/validation.jl index 8ff6e59cc..7a11305ae 100644 --- a/core/src/validation.jl +++ b/core/src/validation.jl @@ -185,9 +185,9 @@ end @version BasinTimeV1 begin node_id::Int time::DateTime - drainage::Float64 + drainage::Union{Missing, Float64} potential_evaporation::Float64 - infiltration::Float64 + infiltration::Union{Missing, Float64} precipitation::Float64 urban_runoff::Float64 end