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

No consistency check is performed for nonequil + diagnostic_edmf #3325

Open
Sbozzolo opened this issue Sep 23, 2024 · 0 comments
Open

No consistency check is performed for nonequil + diagnostic_edmf #3325

Sbozzolo opened this issue Sep 23, 2024 · 0 comments

Comments

@Sbozzolo
Copy link
Member

Sbozzolo commented Sep 23, 2024

The following config fails:

test_dict = Dict(
                    "test_dycore_consistency" => true, # We will add NaNs to the cache, just to make sure
                    "check_nan_every" => 3,
                    "log_progress" => false,
                    "moist" => "nonequil",
                    "precip_model" => "M0",
                    "config" => "sphere",
                    "topography" => "Earth",
                    "turbconv" ="diagnostic_edmf",
                    "dt" => "1secs",
                    "bubble" => bubble,
                    "viscous_sponge" => true,
                    "rayleigh_sponge" => true,
                    "surface_setup" => "DefaultMoninObukhov",
                    "call_cloud_diagnostics_per_stage" => true,  
                    "t_end" => "3secs",
                    "dt_save_state_to_disk" => "1secs",
                    "enable_diagnostics" => false,
                    "output_dir" => joinpath(output_loc, job_id),
                )

with

ERROR: LoadError: MethodError: Cannot `convert` an object of type Thermodynamics.PhaseEquil{Float32} to an object of type Thermodynamics.PhaseNonEquil{Float32}

Closest candidates are:
  convert(::Type{Thermodynamics.PhaseNonEquil{FT}}, ::Thermodynamics.PhaseNonEquil) where FT
   @ Thermodynamics ~/.julia/packages/Thermodynamics/2xPNI/src/states.jl:704
  convert(::Type{T}, ::T) where T
   @ Base Base.jl:84
  (::Type{Thermodynamics.PhaseNonEquil{FT}} where FT)(::Any, ::Any, ::Any)
   @ Thermodynamics ~/.julia/packages/Thermodynamics/2xPNI/src/states.jl:694

Stacktrace:
  [1] copyto!(dest::ClimaCore.DataLayouts.IJF{…}, bc::Base.Broadcast.Broadcasted{…}, ::ClimaCore.DataLayouts.ToCPU)
    @ ClimaCore.DataLayouts ~/repos/ClimaCore.jl/src/DataLayouts/copyto.jl:82
  [2] copyto!(dest::ClimaCore.DataLayouts.IJF{…}, bc::Base.Broadcast.Broadcasted{…})
    @ ClimaCore.DataLayouts ~/repos/ClimaCore.jl/src/DataLayouts/copyto.jl:5
  [3] copyto!(dest::ClimaCore.DataLayouts.IJFH{…}, bc::Base.Broadcast.Broadcasted{…}, ::ClimaCore.DataLayouts.ToCPU)
    @ ClimaCore.DataLayouts ~/repos/ClimaCore.jl/src/DataLayouts/copyto.jl:56
  [4] copyto!(dest::ClimaCore.DataLayouts.IJFH{…}, bc::Base.Broadcast.Broadcasted{…})
    @ ClimaCore.DataLayouts ~/repos/ClimaCore.jl/src/DataLayouts/copyto.jl:5
  [5] materialize!
    @ ./broadcast.jl:914 [inlined]
  [6] materialize!
    @ ./broadcast.jl:911 [inlined]
  [7] macro expansion
    @ ~/repos/ClimaAtmos.jl/src/cache/diagnostic_edmf_precomputed_quantities.jl:42 [inlined]
  [8] set_diagnostic_edmfx_draft_quantities_level!(thermo_params::Thermodynamics.Parameters.ThermodynamicsParameters{…}, ts_level::ClimaCore.DataLayouts.IJFH{…}, ρ_level::ClimaCore.DataLayouts.IJFH{…}, mse_level::ClimaCore.DataLayouts.IJFH{…}, q_tot_level::ClimaCore.DataLayouts.IJFH{…}, p_level::ClimaCore.DataLayouts.IJFH{…}, Φ_level::ClimaCore.DataLayouts.IJFH{…})
    @ ClimaAtmos ~/.julia/packages/NVTX/pfSOQ/src/macro.jl:194
  [9] macro expansion
    @ ~/repos/ClimaAtmos.jl/src/cache/diagnostic_edmf_precomputed_quantities.jl:187 [inlined]
 [10] set_diagnostic_edmf_precomputed_quantities_bottom_bc!(Y::ClimaCore.Fields.FieldVector{…}, p::@NamedTuple{…}, t::Float32)
    @ ClimaAtmos ~/.julia/packages/NVTX/pfSOQ/src/macro.jl:194
 [11] macro expansion
    @ ~/repos/ClimaAtmos.jl/src/cache/precomputed_quantities.jl:532 [inlined]
[......]

I assume that this is because I cannot put diagnostic edmf together with nonequil. If that's the case, the incompatibility should be checked and a meaningful error message produced.

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

1 participant