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

fix loadMissingData function

parent af10d0ff
Pipeline #10887 passed with stages
in 3 minutes
name = "cdi"
uuid = "4aeab5ff-df69-4724-9e4d-8219d9dcd5ba"
authors = ["Volker Neff"]
version = "0.2.2"
version = "0.2.3"
[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
......
......@@ -99,14 +99,14 @@ end
export loadData!
function loadMissingData!(data::VariableMissingDataType{N}, var::Variable)::VariableMissingDataType where {N}
replace!(data, x -> 0.0)
data[:, :, :] = 0.0
streamReadVar(var.streamID, var.varID, convert(Array{Float64}, reshape(data, :)))
replace!(data, x -> x == var.missValue ? missing : x)
return data
end
function loadMissingData!(data::VariableMissingDataType{1}, var::Variable)::VariableMissingDataType
replace!(data, x -> 0.0)
data[:, :, :] = 0.0
streamReadVar(var.streamID, var.varID, convert(Array{Float64}, data))
replace!(data, x -> x == var.missValue ? missing : x)
return data
......
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