Skip to content

error in diffusive_ice_column_model.jl #76

@francispoulin

Description

@francispoulin

When I try and run this example I get an error due to the number of arguments in ice_ocean_temperature. I presume there is an easy fix but I haven't been able to get it to work. Any suggestions of what I can try?

julia> include("diffusive_ice_column_model.jl")
┌ Warning: This simulation will run forever as stop iteration = stop time = wall time limit = Inf.
└ @ Oceananigans.Simulations ~/.julia/packages/Oceananigans/CGCJ5/src/Simulations/simulation.jl:64
[ Info: Initializing simulation...
ERROR: LoadError: MethodError: no method matching ice_ocean_temperature(::Float64)

Closest candidates are:
  ice_ocean_temperature(::Any, ::Any, ::Any)
   @ Main ~/Software/ClimaSeaIce.jl/examples/diffusive_ice_column_model.jl:32

Stacktrace:
  [1] getbc
    @ ~/.julia/packages/Oceananigans/CGCJ5/src/BoundaryConditions/continuous_boundary_function.jl:153 [inlined]
  [2] getbc
    @ ~/.julia/packages/Oceananigans/CGCJ5/src/BoundaryConditions/boundary_condition.jl:112 [inlined]
  [3] left_gradient
    @ ~/.julia/packages/Oceananigans/CGCJ5/src/BoundaryConditions/fill_halo_regions_value_gradient.jl:12 [inlined]
  [4] _fill_bottom_halo!
    @ ~/.julia/packages/Oceananigans/CGCJ5/src/BoundaryConditions/fill_halo_regions_value_gradient.jl:83 [inlined]
  [5] macro expansion
    @ ~/.julia/packages/Oceananigans/CGCJ5/src/BoundaryConditions/fill_halo_regions.jl:216 [inlined]
  [6] cpu__fill_bottom_and_top_halo!
    @ ~/.julia/packages/KernelAbstractions/sWSE0/src/macros.jl:304 [inlined]
  [7] cpu__fill_bottom_and_top_halo!(__ctx__::KernelAbstractions.CompilerMetadata{…}, c::OffsetArrays.OffsetArray{…}, bottom_bc::BoundaryCondition{…}, top_bc::BoundaryCondition{…}, loc::Tuple{…}, grid::RectilinearGrid{…}, args::Tuple{…})
    @ Oceananigans.BoundaryConditions ./none:0
  [8] __thread_run(tid::Int64, len::Int64, rem::Int64, obj::KernelAbstractions.Kernel{…}, ndrange::Nothing, iterspace::KernelAbstractions.NDIteration.NDRange{…}, args::Tuple{…}, dynamic::KernelAbstractions.NDIteration.NoDynamicCheck)
    @ KernelAbstractions ~/.julia/packages/KernelAbstractions/sWSE0/src/cpu.jl:144
  [9] __run(obj::KernelAbstractions.Kernel{…}, ndrange::Nothing, iterspace::KernelAbstractions.NDIteration.NDRange{…}, args::Tuple{…}, dynamic::KernelAbstractions.NDIteration.NoDynamicCheck, static_threads::Bool)
    @ KernelAbstractions ~/.julia/packages/KernelAbstractions/sWSE0/src/cpu.jl:111
 [10] (::KernelAbstractions.Kernel{…})(::OffsetArrays.OffsetArray{…}, ::Vararg{…}; ndrange::Nothing, workgroupsize::Nothing)
    @ KernelAbstractions ~/.julia/packages/KernelAbstractions/sWSE0/src/cpu.jl:45
 [11] (::KernelAbstractions.Kernel{…})(::OffsetArrays.OffsetArray{…}, ::Vararg{…})
    @ KernelAbstractions ~/.julia/packages/KernelAbstractions/sWSE0/src/cpu.jl:38
 [12] _launch!(::CPU, ::RectilinearGrid{…}, ::Oceananigans.Utils.KernelParameters{…}, ::Function, ::OffsetArrays.OffsetArray{…}, ::BoundaryCondition{…}, ::Vararg{…}; exclude_periphery::Bool, reduced_dimensions::Tuple{}, active_cells_map::Nothing)
    @ Oceananigans.Utils ~/.julia/packages/Oceananigans/CGCJ5/src/Utils/kernel_launching.jl:329
 [13] _launch!
    @ ~/.julia/packages/Oceananigans/CGCJ5/src/Utils/kernel_launching.jl:306 [inlined]
 [14] launch!
    @ ~/.julia/packages/Oceananigans/CGCJ5/src/Utils/kernel_launching.jl:289 [inlined]
 [15] fill_bottom_and_top_halo!(::OffsetArrays.OffsetArray{…}, ::BoundaryCondition{…}, ::BoundaryCondition{…}, ::Symbol, ::Tuple{…}, ::Tuple{…}, ::CPU, ::RectilinearGrid{…}, ::Clock{…}, ::Vararg{…}; only_local_halos::Bool, kwargs::@Kwargs{…})
    @ Oceananigans.BoundaryConditions ~/.julia/packages/Oceananigans/CGCJ5/src/BoundaryConditions/fill_halo_regions.jl:341
 [16] fill_halo_event!(::OffsetArrays.OffsetArray{…}, ::Function, ::Tuple{…}, ::Tuple{…}, ::Tuple{…}, ::CPU, ::RectilinearGrid{…}, ::Clock{…}, ::Vararg{…}; async::Bool, kwargs::@Kwargs{…})
    @ Oceananigans.BoundaryConditions ~/.julia/packages/Oceananigans/CGCJ5/src/BoundaryConditions/fill_halo_regions.jl:79
 [17] fill_halo_regions!(::OffsetArrays.OffsetArray{…}, ::FieldBoundaryConditions{…}, ::Tuple{…}, ::Tuple{…}, ::RectilinearGrid{…}, ::Clock{…}, ::Vararg{…}; fill_boundary_normal_velocities::Bool, kwargs::@Kwargs{…})
    @ Oceananigans.BoundaryConditions ~/.julia/packages/Oceananigans/CGCJ5/src/BoundaryConditions/fill_halo_regions.jl:63
 [18] fill_halo_regions!
    @ ~/.julia/packages/Oceananigans/CGCJ5/src/BoundaryConditions/fill_halo_regions.jl:50 [inlined]
 [19] #fill_halo_regions!#62
    @ ~/.julia/packages/Oceananigans/CGCJ5/src/Fields/field.jl:774 [inlined]
 [20] fill_halo_regions!
    @ ~/.julia/packages/Oceananigans/CGCJ5/src/Fields/field.jl:771 [inlined]
 [21] compute_temperature!(model::EnthalpyMethodSeaIceModel{RectilinearGrid{…}, Nothing, Clock{…}, MolecularDiffusivity{…}, @NamedTuple{…}, Float64, Float64, @NamedTuple{…}})
    @ ClimaSeaIce.EnthalpyMethodSeaIceModels ~/.julia/packages/ClimaSeaIce/7Smwf/src/EnthalpyMethodSeaIceModel.jl:154
 [22] update_state!
    @ ~/.julia/packages/ClimaSeaIce/7Smwf/src/EnthalpyMethodSeaIceModel.jl:179 [inlined]
 [23] initialize!(sim::Simulation{…})
    @ Oceananigans.Simulations ~/.julia/packages/Oceananigans/CGCJ5/src/Simulations/run.jl:211
 [24] time_step!(sim::Simulation{…})
    @ Oceananigans.Simulations ~/.julia/packages/Oceananigans/CGCJ5/src/Simulations/run.jl:136
 [25] run!(sim::Simulation{…}; pickup::Bool)
    @ Oceananigans.Simulations ~/.julia/packages/Oceananigans/CGCJ5/src/Simulations/run.jl:105
 [26] run!(sim::Simulation{…})
    @ Oceananigans.Simulations ~/.julia/packages/Oceananigans/CGCJ5/src/Simulations/run.jl:92
 [27] top-level scope
    @ ~/Software/ClimaSeaIce.jl/examples/diffusive_ice_column_model.jl:136
 [28] include(fname::String)
    @ Base.MainInclude ./client.jl:494
 [29] top-level scope
    @ REPL[43]:1
in expression starting at /home/fpoulin/Software/ClimaSeaIce.jl/examples/diffusive_ice_column_model.jl:136
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions