Skip to content
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

Skipping keys with open_dataset ? #465

Closed
Balinus opened this issue Oct 28, 2024 · 2 comments
Closed

Skipping keys with open_dataset ? #465

Balinus opened this issue Oct 28, 2024 · 2 comments

Comments

@Balinus
Copy link
Contributor

Balinus commented Oct 28, 2024

Is there a way to skip a variable/keys/etc when using open_dataset?

Right now, I have badly formatted netcdf file, where there is no information on one of the coordinates (nbnds):

image

I am not able to open the file with open_dataset though and I was wondering if it was possible to ignore some the of variables or something similar:

image

@Balinus
Copy link
Contributor Author

Balinus commented Oct 28, 2024

output from NCDatasets.jl:

Group: /

Dimensions
   forecast_date = 1
   lead = 4
   lat = 258
   lon = 480
   quantiles = 19
   nbnds = 2

Variables
  forecast_date   (1)
    Datatype:    DateTime (Int64)
    Dimensions:  forecast_date
    Attributes:
     long_name            = Forecast Creation Date
     units                = days since 2024-03-15
     calendar             = proleptic_gregorian

  lead   (4)
    Datatype:    Int64 (Int64)
    Dimensions:  lead
    Attributes:
     long_name            = Forecast Lead
     units                = months
     bounds               = lead_bnds

  lat   (258)
    Datatype:    Union{Missing, Float32} (Float32)
    Dimensions:  lat
    Attributes:
     _FillValue           = NaN
     long_name            = Latitude

  lon   (480)
    Datatype:    Union{Missing, Float32} (Float32)
    Dimensions:  lon
    Attributes:
     _FillValue           = NaN
     long_name            = Longitude

  quantiles   (19)
    Datatype:    Union{Missing, Float64} (Float64)
    Dimensions:  quantiles
    Attributes:
     _FillValue           = NaN
     long_name            = Quantiles

  vals   (19 × 480 × 258 × 4 × 1)
    Datatype:    Union{Missing, Float32} (Float32)
    Dimensions:  quantiles × lon × lat × lead × forecast_date
    Attributes:
     _FillValue           = NaN
     long_name            = Average Temperature
     units                = degC

  anom   (19 × 480 × 258 × 4 × 1)
    Datatype:    Union{Missing, Float32} (Float32)
    Dimensions:  quantiles × lon × lat × lead × forecast_date
    Attributes:
     _FillValue           = NaN
     long_name            = Average Temperature Anomaly
     units                = degC

  forecast_period   (2 × 4 × 1)
    Datatype:    DateTime (Int64)
    Dimensions:  nbnds × lead × forecast_date
    Attributes:
     long_name            = Forecast Validity Period
     units                = days since 2024-04-01 00:00:00
     calendar             = proleptic_gregorian

  lead_bnds   (2 × 4)
    Datatype:    Int64 (Int64)
    Dimensions:  nbnds × lead
    Attributes:
     long_name            = Lead Bounds

Global attributes
  long_name            = Average Temperature
  units                = degC
  clim_period          = ["1990-01-01", "2019-12-31"]
  coordinates          = forecast_period

@lazarusA
Copy link
Collaborator

closed by #480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants