Broken 3D models?
user interface :musical_keyboard:compatibility :dancers:
Good morning,
after using this example for over one year, it now fails to run, I think that something has been updated and has broken compatibility. I can see the initial conditions being created, but when I try to initialise I get an error.
```julia
using SpeedyWeather
spectral_grid = SpectralGrid(trunc = 31, nlayers = 8, Grid=FullGaussianGrid, dealiasing = 3)
orography = ZonalRidge(spectral_grid)
initial_conditions = (; # collect initial conditions into NamedTuple
vordiv = ZonalWind(spectral_grid),
temp = JablonowskiTemperature(spectral_grid),
pres = ConstantPressure(spectral_grid))
model = PrimitiveDryModel(spectral_grid; orography, initial_conditions, dynamics_only = true)
simulation = initialize!(model)
run!(simulation, period = Day(9))
ERROR MESSAGES:
MethodError: no method matching PrimitiveDryModel(; spectral_grid::SpectralGrid{…}, orography::ZonalRidge{…}, initial_conditions::@NamedTuple{…}, dynamics_only::Bool)
This method does not support all of the given keyword arguments (and may not support any).
Closest candidates are:
PrimitiveDryModel(; spectral_grid, architecture, dynamics, geometry, planet, atmosphere, coriolis, geopotential, adiabatic_conversion, particle_advection, initial_conditions, forcing, drag, random_process, tracers, orography, land_sea_mask, ocean, sea_ice, land, solar_zenith, albedo, physics, boundary_layer_drag, vertical_diffusion, surface_condition, surface_momentum_flux, surface_heat_flux, convection, shortwave_radiation, longwave_radiation, stochastic_physics, custom_parameterization, time_stepping, spectral_transform, implicit, horizontal_diffusion, vertical_advection, output, callbacks, feedback, model_parameters, parameterizations, extra_parameterizations, params) got unsupported keyword argument "dynamics_only"
@ SpeedyWeather [~/.julia/packages/SpeedyWeather/Ztk8y/src/models/primitive_dry.jl:13](http://localhost:8889/lab/tree/~/.julia/packages/SpeedyWeather/Ztk8y/src/models/primitive_dry.jl#line=12)
PrimitiveDryModel(::SG, ::AR, ::Bool, ::GE, ::PL, ::AT, ::CO, ::GO, ::AC, ::PA, ::IC, ::FR, ::DR, ::RP, ::Dict{Symbol, Tracer}, ::OR, ::LS, ::OC, ::SI, ::LA, ::ZE, ::AL, ::Bool, ::BL, ::VD, ::SC, ::SM, ::SH, ::CV, ::SW, ::LW, ::SP, ::CP, ::TS, ::ST, ::IM, ::HD, ::VA, ::OU, ::Dict{Symbol, SpeedyWeather.AbstractCallback}, ::FB, ::TS1, ::TS2, ::TS3, ::PV) where {SG, AR, GE, PL, AT, CO, GO, AC, PA, IC, FR, DR, RP, OR, LS, OC, SI, LA, ZE, AL, BL, VD, SC, SM, SH, CV, SW, LW, SP, CP, TS, ST, IM, HD, VA, OU, FB, TS1, TS2, TS3, PV} got unsupported keyword arguments "spectral_grid", "orography", "initial_conditions", "dynamics_only"
@ SpeedyWeather [~/.julia/packages/SpeedyWeather/Ztk8y/src/models/primitive_dry.jl:57](http://localhost:8889/lab/tree/~/.julia/packages/SpeedyWeather/Ztk8y/src/models/primitive_dry.jl#line=56)
(::Type{<:AbstractModel})(::SpectralGrid; kwargs...)
@ SpeedyWeather [~/.julia/packages/SpeedyWeather/Ztk8y/src/dynamics/spectral_grid.jl:269](http://localhost:8889/lab/tree/~/.julia/packages/SpeedyWeather/Ztk8y/src/dynamics/spectral_grid.jl#line=268)
Stacktrace:
[1] kwerr(kw::@NamedTuple{…}, args::Type)
@ Base ./error.jl:175
[2] SpeedyWeather.PrimitiveDryModel(SG::SpeedyWeather.SpectralGrid{…}; kwargs::@Kwargs{…})
@ SpeedyWeather [~/.julia/packages/SpeedyWeather/Ztk8y/src/dynamics/spectral_grid.jl:269](http://localhost:8889/lab/tree/~/.julia/packages/SpeedyWeather/Ztk8y/src/dynamics/spectral_grid.jl#line=268)
[3] top-level scope
@ In[1]:10
[4] eval(m::Module, e::Any)
@ Core ./boot.jl:489
Some type information was truncated. Use `show(err)` to see complete types.
```
1 条评论