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

Fix discrepancy in CommonDataModel package version errors #765

Closed
anastasia-popova opened this issue May 1, 2024 · 2 comments · Fixed by #772
Closed

Fix discrepancy in CommonDataModel package version errors #765

anastasia-popova opened this issue May 1, 2024 · 2 comments · Fixed by #772
Assignees
Labels
bug Something isn't working

Comments

@anastasia-popova
Copy link
Contributor

anastasia-popova commented May 1, 2024

CommonDataModel 0.3.6 is throwing following error when coupler_driver.jl is run:
ERROR: LoadError: NetCDF error: NetCDF: Invalid argument (NetCDF error code: -36)

Stacktrace:
  [1] check
    @ ~/.julia/packages/NCDatasets/JrRxr/src/errorhandling.jl:25 [inlined]
  [2] nc_def_var_chunking(ncid::Int32, varid::Int32, storage::Symbol, chunksizes::Vector{Int64})
    @ NCDatasets ~/.julia/packages/NCDatasets/JrRxr/src/netcdf_c.jl:1096
  [3] chunking(v::NCDatasets.Variable{Float32, 3, NCDatasets.NCDataset{Nothing, Missing}}, storage::Symbol, chunksizes::Tuple{Int64, Int64, Int64})
    @ NCDatasets ~/.julia/packages/NCDatasets/JrRxr/src/variable.jl:232
  [4] chunking(v::CommonDataModel.CFVariable{Union{…}, 3, NCDatasets.Variable{…}, CommonDataModel.Attributes{…}, @NamedTuple{…}}, storage::Symbol, chunksize::Tuple{Int64, Int64, Int64})
    @ CommonDataModel ~/.julia/packages/CommonDataModel/G3moc/src/cfvariable.jl:551
  [5] defVar(dest::NCDatasets.NCDataset{Nothing, Missing}, varname::String, srcvar::CommonDataModel.SubVariable{Union{…}, 3, CommonDataModel.CFVariable{…}, Tuple{…}, CommonDataModel.Attributes{…}, CommonDataModel.SubVariable{…}}; kwargs::@Kwargs{})
    @ CommonDataModel ~/.julia/packages/CommonDataModel/G3moc/src/variable.jl:238
  [6] defVar
    @ ~/.julia/packages/CommonDataModel/G3moc/src/variable.jl:206 [inlined]
  [7] #defVar#13
    @ ~/.julia/packages/CommonDataModel/G3moc/src/variable.jl:266 [inlined]
  [8] defVar(dest::NCDatasets.NCDataset{Nothing, Missing}, srcvar::CommonDataModel.SubVariable{Union{…}, 3, CommonDataModel.CFVariable{…}, Tuple{…}, CommonDataModel.Attributes{…}, CommonDataModel.SubVariable{…}})
    @ CommonDataModel ~/.julia/packages/CommonDataModel/G3moc/src/variable.jl:265
  [9] write(dest::NCDatasets.NCDataset{…}, src::CommonDataModel.SubDataset{…}; include::Vector{…}, exclude::Vector{…}, _ignore_checksum::Bool)
    @ CommonDataModel ~/.julia/packages/CommonDataModel/G3moc/src/dataset.jl:354
 [10] write(dest::NCDatasets.NCDataset{Nothing, Missing}, src::CommonDataModel.SubDataset{NCDatasets.NCDataset{Nothing, Missing}, @NamedTuple{time::UnitRange{…}}, CommonDataModel.Attributes{NCDatasets.NCDataset{…}}, OrderedCollections.OrderedDict{Any, Any}})
    @ CommonDataModel ~/.julia/packages/CommonDataModel/G3moc/src/dataset.jl:316
 [11] truncate_dataset(datafile::String, name::String, datapath_trunc::String, date0::Dates.DateTime, time_start::Float64, time_end::Float64, comms_ctx::ClimaComms.SingletonCommsContext{ClimaComms.CPUSingleThreaded})
    @ ClimaCoupler.Regridder ~/CliMA/ClimaCoupler.jl/src/Regridder.jl:666
 [12] artifact_data(datapath_full::String, name::String, datapath_trunc::String, date0::Dates.DateTime, time_start::Float64, time_end::Float64, comms_ctx::ClimaComms.SingletonCommsContext{ClimaComms.CPUSingleThreaded})
    @ Main ~/CliMA/ClimaCoupler.jl/artifacts/artifact_funcs.jl:80
 [13] top-level scope
    @ ~/CliMA/ClimaCoupler.jl/experiments/AMIP/coupler_driver.jl:171
 [14] include(fname::String)
    @ Base.MainInclude ./client.jl:489
 [15] top-level scope
    @ REPL[1]:1

To recreate: run coupler_driver.jl with CommonDataModel @0.3.6

Current solution: Pin CommonDataModel version to 0.3.5

@Sbozzolo
Copy link
Member

Sbozzolo commented May 4, 2024

FWIW, error -36 seems to be about invalid input looking at https://www.star.nesdis.noaa.gov/pub/ncei_team/tim.boyer/netcdf.inc

@juliasloan25
Copy link
Member

Once this is fixed, remove CommonDataModel from test and exp/ClimaCore environments (added in this PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants