CliMA / ClimaAtmos.jl

ClimaAtmos.jl is a library for building atmospheric circulation models that is designed from the outset to leverage data assimilation and machine learning tools. We welcome contributions!
Apache License 2.0
81 stars 15 forks source link

`implicit_diffusion` can be turned on without a turbconv model and with `vert_diff = false` #3360

Open Sbozzolo opened 2 days ago

Sbozzolo commented 2 days ago

And if you do so, you'll get the error

ERROR: LoadError: type NamedTuple has no field ᶜK_u
Stacktrace:
  [1] getproperty
    @ ./Base.jl:37 [inlined]
  [2] macro expansion
    @ ~/repos/ClimaAtmos.jl/src/prognostic_equations/implicit/implicit_solver.jl:400 [inlined]
  [3] Wfact!(A::ClimaAtmos.ImplicitEquationJacobian{…}, Y::FieldVector{…}, p::ClimaAtmos.AtmosCache{…}, dtγ::Float64, t::Float32)
    @ ClimaAtmos ~/.julia/packages/NVTX/pfSOQ/src/macro.jl:194
  [4] step_u!(int::ClimaTimeSteppers.DistributedODEIntegrator{…}, cache::ClimaTimeSteppers.RosenbrockCache{…})
    @ ClimaTimeSteppers ~/.julia/packages/ClimaTimeSteppers/Na6yl/src/solvers/rosenbrock.jl:134
  [5] macro expansion
    @ ~/.julia/packages/ClimaTimeSteppers/Na6yl/src/integrators.jl:265 [inlined]
  [6] step_u!(integrator::ClimaTimeSteppers.DistributedODEIntegrator{…})
    @ ClimaTimeSteppers ~/.julia/packages/NVTX/pfSOQ/src/macro.jl:194
  [7] __step!(integrator::ClimaTimeSteppers.DistributedODEIntegrator{…})
    @ ClimaTimeSteppers ~/.julia/packages/ClimaTimeSteppers/Na6yl/src/integrators.jl:237

instead of an informative error telling you that it doesn't make sense

szy21 commented 2 days ago

Just to clarify, we should be able to turn on implicit diffusion without a turbconv model. What doesn't make sense is to have implicit_diffusion with both vert_diff: false and turbconv: nothing.

Sbozzolo commented 2 days ago

Just to clarify, we should be able to turn on implicit diffusion without a turbconv model. What doesn't make sense is to have implicit_diffusion with both vert_diff: false and turbconv: nothing.

Thank you, I updated the title