CliMA / ClimaOcean.jl

🌎 Framework for realistic regional-to-global ocean simulations, and coupled ocean + sea-ice simulations based on Oceananigans and ClimaSeaIce. Basis for the ocean and sea-ice component of CliMA's Earth system model.
https://clima.github.io/ClimaOceanDocumentation/dev/
MIT License
33 stars 9 forks source link

generate_atmos_dataset.jl bug #259

Open waywardpidgeon opened 4 hours ago

waywardpidgeon commented 4 hours ago

suggestion: edit the line

to be

time_indices=Colon()
julia> versioninfo()
Julia Version 1.10.5
Commit 6f3fdf7b36 (2024-08-27 14:19 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 24 × 13th Gen Intel(R) Core(TM) i7-13700F
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, goldmont)
Threads: 1 default, 0 interactive, 1 GC (on 24 virtual cores)

Error:

time_indices=1:1
qt = ClimaOcean.JRA55.JRA55_field_time_series(:specific_humidity; time_indices)
ERROR: BoundsError: attempt to access 1-element StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64} at index [0]
simone-silvestri commented 3 hours ago

Hi @waywardpidgeon, the problem with JRA55_field_time_series is that we need at least two indices to interpolate the atmos state in time. We can probably spit out an error message if trying to load a fieldtimeseries with only one index. Or we can fix the codebase to allow loading just one index. What is the trace of this error?