CliMA / LandHydrology.jl

The CliMA land hydrology model, including soil, snow, and surface processes
6 stars 0 forks source link

updated to 1.7, clima core 0.5, bounds checking #66

Open kmdeck opened 2 years ago

kmdeck commented 2 years ago

upgrade to use julia1.7 new ClimaCore version 0.5 checking bounds in CI

We have a bounds error in the init_aux functions. In general, we need initial condition functions as a function of space, but to work with the state vector structure, we have it set up that they return NamedTuples. This nicely makes a named tuple of Fields when we pass it z as a field, for example. But when the model type indicates no variables to be added, returning an empty NamedTuple does not work.


julia> function foo(z::ft) where {ft <: AbstractFloat}
       return (;)
       end
foo (generic function with 2 methods)

julia> foo.(zc)
ERROR: BoundsError: attempt to access ClimaCore.DataLayouts.VF{NamedTuple{(), Tuple{}}, Matrix{Float64}} at index [1]
kmdeck commented 2 years ago

bors try

bors[bot] commented 2 years ago

try

Build failed: