SpeedyWeather / SpeedyWeather.jl

Play atmospheric modelling like it's LEGO.
https://speedyweather.github.io/SpeedyWeather.jl/dev
MIT License
438 stars 28 forks source link

Jablonowski test case #265

Open milankl opened 1 year ago

milankl commented 1 year ago

In the Jablonowski (#45) test case our day-9 baroclinic wave is currently not strong enough (T255 26 levls Float64 FullGaussianGrid $\alpha=1$ implicit stepping default diffusion)

image

versus

image

image

Maybe an issue in the initial conditions or the implicit stepping dampens too aggressively? Also, I didn't wait for the steady state to equilibrate as Jablonoswki suggest.

milankl commented 1 year ago

Same result at lower resolution (T170)

image

and apart from some additional waves in pressure also with implicit $\alpha = 0.5$

image

milankl commented 1 year ago

@christophernhill @jm-c any idea why that could be? šŸ‘†šŸ¼ Compared to Jablonowski, we are about a day behind šŸ™ˆ See day 8 below, that one fits quite well and looking at our day 10 is quite similar to Jablonowski's day 9. What controls the error growth time scale in this sytem, proportional to the initial perturbation and the available potential energy in the baroclinic background flow?

image

milankl commented 1 year ago

Okay, a stronger perturbation $u_p = 2$ m/s instead of 1m/s and a day later (day 10) yields roughly what we are supposed to see

image

milankl commented 1 year ago

With $u_p$ = 3m/s the strength of the baroclinic wave after 9 days is about correct, but it didn't travel far enough: The big vortex sits at about 65ĖšN, 195ĖšE for us but more like 60ĖšN, 215ĖšE for Jablonowski

Now actually interpolated on 850hPa

image

milankl commented 1 year ago

@hottad You can since v0.6 run the jablonoswki test as follows (pretty printing from #385 now in the main branch)

julia> using SpeedyWeather

julia> spectral_grid = SpectralGrid(trunc=85,nlev=8,Grid=OctaHEALPixGrid,dealiasing=2)
SpectralGrid:
ā”œ Spectral:   T85 LowerTriangularMatrix{Complex{Float32}}, radius = 6.371e6 m
ā”œ Grid:       127-ring OctaHEALPixGrid{Float32}, 16384 grid points
ā”œ Resolution: 176km (average), 156km Ɨ 198km (Equator)
ā”” Vertical:   8-level SigmaCoordinates

Once we've defined the SpectralGrid we can create the zonal ridge orography from Jablonowski like so

julia> orography = ZonalRidge(spectral_grid)
ZonalRidge{Float32, OctaHEALPixGrid{Float32}} <: AbstractOrography
ā”œ Ī·ā‚€::Float64 = 0.252
ā”œ uā‚€::Float64 = 35.0
ā””ā”€ā”€ arrays: orography, geopot_surf

And their initial conditions are called ZonalWind (because it is a zonal wind), I hope I have left all parameters to their defaults, need to check whether I changed Ī”T maybe?

julia> initial_conditions = ZonalWind()
ZonalWind <: InitialConditions
ā”œ Ī·ā‚€::Float64 = 0.252
ā”œ uā‚€::Float64 = 35.0
ā”œ perturb_lat::Float64 = 40.0
ā”œ perturb_lon::Float64 = 20.0
ā”œ perturb_uā‚š::Float64 = 1.0
ā”œ perturb_radius::Float64 = 0.1
ā”œ Ī”T::Float64 = 0.0
ā”œ Tmin::Float64 = 200.0
ā”” pressure_on_orography::Bool = false

Then construct the model and while we could have set all individual physics parameterizations we can also disable them all together with physics=false which skips the parameterization_tendencies! call entirely.

julia> model = PrimitiveDryModel(;spectral_grid,orography,initial_conditions,physics=false)
PrimitiveDryModel{Float32, SpeedyWeather.CPUDevice}
ā”œ spectral_grid: SpectralGrid
ā”œ planet: Earth
ā”œ atmosphere: EarthAtmosphere
ā”œ initial_conditions: ZonalWind
ā”œ orography: ZonalRidge{Float32, OctaHEALPixGrid{Float32}}
ā”œ physics: Bool
ā”œ boundary_layer_drag: LinearDrag{Float32}
ā”œ temperature_relaxation: HeldSuarez{Float32}
ā”œ static_energy_diffusion: SpeedyWeather.StaticEnergyDiffusion{Float32}
ā”œ vertical_advection: SpeedyWeather.CenteredVerticalAdvection{Float32, 1}
ā”œ time_stepping: Leapfrog{Float32}
ā”œ spectral_transform: SpectralTransform{Float32}
ā”œ horizontal_diffusion: HyperDiffusion{Float32}
ā”œ implicit: ImplicitPrimitiveEq{Float32}
ā”œ geometry: Geometry{Float32}
ā”œ constants: DynamicsConstants{Float32}
ā”œ device_setup: SpeedyWeather.DeviceSetup{SpeedyWeather.CPUDevice, DataType}
ā”œ output: OutputWriter{Float32, PrimitiveDry}
ā”” feedback: Feedback

initialize and run!

julia> simulation = initialize!(model)
SpeedyWeather.Simulation{PrimitiveDryModel{Float32, SpeedyWeather.CPUDevice}}
ā”œ PrimitiveDryModel{Float32, SpeedyWeather.CPUDevice}
ā”œ PrognosticVariables{Float32, PrimitiveDryModel{Float32, SpeedyWeather.CPUDevice}}
ā”” DiagnosticVariables{Float32, OctaHEALPixGrid{Float32}, PrimitiveDry}
julia> run!(simulation,n_days=9,output=true)

which yields

image

I'm a bit confused about the vorticity anomalies at the poles, I have not seen these before.

milankl commented 1 year ago

Same with the OctahedralGaussianGrid, looks like that's a good starting point to investigate what's going on here! image