Commit d8e56e6a authored by Volker Neff's avatar Volker Neff
Browse files

fix loadMissingData function

parent 88979fe5
Pipeline #10889 passed with stages
in 3 minutes and 18 seconds
......@@ -101,14 +101,18 @@ export loadData!
function loadMissingData!(data::VariableMissingDataType{N}, var::Variable)::VariableMissingDataType where {N}
@. data[:, :, :] = 0.0
streamReadVar(var.streamID, var.varID, convert(Array{Float64}, reshape(data, :)))
replace!(data, x -> x == var.missValue ? missing : x)
for i in CartesianIndices(data)
data[i] = data[i] == var.missValue ? missing : data[i]
end
return data
end
function loadMissingData!(data::VariableMissingDataType{1}, var::Variable)::VariableMissingDataType
@. data[:, :, :] = 0.0
streamReadVar(var.streamID, var.varID, convert(Array{Float64}, data))
replace!(data, x -> x == var.missValue ? missing : x)
for i in CartesianIndices(data)
data[i] = data[i] == var.missValue ? missing : data[i]
end
return data
end
export loadMissingData!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment