NCDatasets: performance issues deriving fast Minimum Maximum value as too slow

JosephPollacco
Wed, 21 Aug 2024 22:51:19 +0000
Geo

Finding minimum and maximum of a NetCDF files due to missing values is painfully slow. It takes me 2 minutes to perform this simple task:

"NameOutput="SoilWater"
Output_NCDatasets = NCDatasets.NCDataset(Path)

Data = Output_NCDatasets[NameOutput]
Pmin, Pmax = extrema(x for x ∈ skipmissing(Data) if !isnan(x))
println(Pmin,"," , Pmax)

Where the OUTPUT is:

OUTPUT (291 × 313 × 31)
    Datatype:    Union{Missing, Float32} (Float32)
    Dimensions:  lon × lat × time
    Attributes:
     _FillValue           = NaN

Many thanks for any help you could provide to speedup the process?

13 posts - 6 participants

Read full topic