Tree structure

At the top of SpeedyWeather's type tree sits the Simulation, containing variables and model, which in itself contains model components with their own fields and so on. (Note that we are talking about the structure of structs within structs not the type hierarchy as defined by subtyping abstract types.) This can quickly get complicated with a lot of nested structs. The following is to give users a better overview of how simulation, variables and model are structured within SpeedyWeather. Many types in SpeedyWeather have extended Julia's show function to give you an overview of its contents, e.g. a clock::Clock is printed as

using SpeedyWeather
clock = Clock()
Clock
├ time::DateTime = 2000-01-01T00:00:00
├ start::DateTime = 2000-01-01T00:00:00
├ period::Second = 0 seconds
├ timestep_counter::Int64 = 0
├ n_timesteps::Int64 = 0
└ Δt::Dates.Millisecond = 0 milliseconds

illustrating the fields within a clock, their types and (unless they are an array) also their values. For structs within structs however, this information, would not be printed by default. You could use Julia's autocomplete like clock.<tab> by hitting tab after the . to inspect the fields of an instance but that would require you to manually go down every branch of that tree. To better visualise this, we have defined a tree(S) function for any instance S defined in SpeedyWeather which will print every field, and also its containing fields if they are also defined within SpeedyWeather. The "if defined in SpeedyWeather" is important because otherwise the tree would also show you the contents of a complex number or other types defined in Julia Base itself that we aren't interested in here. But let's start at the top.

Simulation

When creating a Simulation, its fields are

spectral_grid = SpectralGrid(nlev = 1)
model = BarotropicModel(; spectral_grid)
simulation = initialize!(model)
Simulation{BarotropicModel}
├ PrognosticVariables{Float32, OctahedralGaussianGrid{Float32}, Barotropic}
├ DiagnosticVariables{Float32, OctahedralGaussianGrid{Float32}, Barotropic}
└ model::BarotropicModel

the prognostic_variables, the diagnostic_variables and the model (that we just initialized). We could now do tree(simulation) but that gets very lengthy and so will split things into tree(simulation.prognostic_variables), tree(simulation.diagnostic_variables) and tree(simulation.model) for more digestible chunks. You can also provide the with_types=true keyword to get also the types of these fields printed, but we'll skip that here.

Prognostic variables

The prognostic variables struct is parametric on the model type, model_type(model) (which strips away its parameters), but this is only to dispatch over it. The fields are for all models the same, just the barotropic model would not use temperature for example (but you could use nevertheless).

tree(simulation.prognostic_variables)
PrognosticVariables{Float32, OctahedralGaussianGrid{Float32}, Barotropic}
├ trunc
├ nlat_half
├ nlev
├ n_steps
├┐layers
│└┐timesteps
│ ├ trunc
│ ├ vor
│ ├ div
│ ├ temp
│ └ humid
├┐surface
│└┐timesteps
│ ├ trunc
│ └ pres
├┐ocean
│├ nlat_half
│├ time
│├ sea_surface_temperature
│└ sea_ice_concentration
├┐land
│├ nlat_half
│├ time
│├ land_surface_temperature
│├ snow_depth
│├ soil_moisture_layer1
│└ soil_moisture_layer2
├ particles
├ scale
└┐clock
 ├ time
 ├ start
 ├ period
 ├ timestep_counter
 ├ n_timesteps
 └ Δt

Diagnostic variables

Similar for the diagnostic variables, regardless the model type, they contain the same fields but for the 2D models many will not be used for example.

tree(simulation.diagnostic_variables)
DiagnosticVariables{Float32, OctahedralGaussianGrid{Float32}, Barotropic}
├┐layers
│├ npoints
│├ k
│├┐tendencies
││├ nlat_half
││├ trunc
││├ vor_tend
││├ div_tend
││├ temp_tend
││├ humid_tend
││├ u_tend
││├ v_tend
││├ u_tend_grid
││├ v_tend_grid
││├ temp_tend_grid
││└ humid_tend_grid
│├┐grid_variables
││├ nlat_half
││├ vor_grid
││├ div_grid
││├ temp_grid
││├ temp_grid_prev
││├ temp_virt_grid
││├ humid_grid
││├ humid_grid_prev
││├ u_grid
││├ v_grid
││├ u_grid_prev
││└ v_grid_prev
│├┐dynamics_variables
││├ nlat_half
││├ trunc
││├ a
││├ b
││├ a_grid
││├ b_grid
││├ uv∇lnp
││├ uv∇lnp_sum_above
││├ div_sum_above
││├ temp_virt
││├ geopot
││└ σ_tend
│└ temp_average
├┐surface
│├ nlat_half
│├ trunc
│├ npoints
│├ pres_grid
│├ pres_tend
│├ pres_tend_grid
│├ ∇lnp_x
│├ ∇lnp_y
│├ u_mean_grid
│├ v_mean_grid
│├ div_mean_grid
│├ div_mean
│├ precip_large_scale
│├ precip_convection
│├ cloud_top
│├ soil_moisture_availability
│└ cos_zenith
├┐columns
│├ nlev
│├ ij
│├ jring
│├ lond
│├ latd
│├ land_fraction
│├ orography
│├ u
│├ v
│├ temp
│├ humid
│├ ln_pres
│├ pres
│├ u_tend
│├ v_tend
│├ temp_tend
│├ humid_tend
│├ flux_u_upward
│├ flux_u_downward
│├ flux_v_upward
│├ flux_v_downward
│├ flux_temp_upward
│├ flux_temp_downward
│├ flux_humid_upward
│├ flux_humid_downward
│├ boundary_layer_depth
│├ boundary_layer_drag
│├ surface_geopotential
│├ surface_u
│├ surface_v
│├ surface_temp
│├ surface_humid
│├ surface_wind_speed
│├ skin_temperature_sea
│├ skin_temperature_land
│├ soil_moisture_availability
│├ surface_air_density
│├ sat_humid
│├ dry_static_energy
│├ temp_virt
│├ geopot
│├ cloud_top
│├ precip_convection
│├ precip_large_scale
│├ cos_zenith
│├ albedo
│├ a
│├ b
│├ c
│└ d
├┐particles
│├ n_particles
│├ nlat_half
│├ locations
│├ u
│├ v
│├ σ_tend
│└ interpolator
├ nlat_half
├ nlev
├ npoints
└ scale

BarotropicModel

The BarotropicModel is the simplest model we have, which will not have many of the model components that are needed to define the primitive equations for example. Note that forcing or drag aren't further branched which is because the default BarotropicModel has NoForcing and NoDrag which don't have any fields. If you create a model with non-default conponents they will show up here. tree dynamicallt inspects the current contents of a (mutable) struct and that tree may look different depending on what model you have constructed!

model = BarotropicModel(; spectral_grid)
tree(model)
BarotropicModel{...}
├┐spectral_grid
│├ NF
│├ trunc
│├ Grid
│├ dealiasing
│├ radius
│├ n_particles
│├ nlat_half
│├ nlat
│├ npoints
│├ nlev
│└┐vertical_coordinates
│ ├ nlev
│ └ σ_half
├┐device_setup
│├ device
│├ device_KA
│└ n
├┐geometry
│├┐spectral_grid
││├ NF
││├ trunc
││├ Grid
││├ dealiasing
││├ radius
││├ n_particles
││├ nlat_half
││├ nlat
││├ npoints
││├ nlev
││└┐vertical_coordinates
││ ├ nlev
││ └ σ_half
│├ Grid
│├ nlat_half
│├ nlon_max
│├ nlon
│├ nlat
│├ nlev
│├ npoints
│├ radius
│├ colat
│├ lat
│├ latd
│├ lond
│├ londs
│├ latds
│├ lons
│├ lats
│├ sinlat
│├ coslat
│├ coslat⁻¹
│├ coslat²
│├ coslat⁻²
│├ σ_levels_half
│├ σ_levels_full
│├ σ_levels_thick
│├ ln_σ_levels_full
│└ full_to_half_interpolation
├┐planet
│├ rotation
│├ gravity
│├ daily_cycle
│├ length_of_day
│├ seasonal_cycle
│├ length_of_year
│├ equinox
│├ axial_tilt
│└ solar_constant
├┐atmosphere
│├ mol_mass_dry_air
│├ mol_mass_vapour
│├ heat_capacity
│├ R_gas
│├ R_dry
│├ R_vapour
│├ mol_ratio
│├ μ_virt_temp
│├ κ
│├ water_density
│├ latent_heat_condensation
│├ latent_heat_sublimation
│├ stefan_boltzmann
│├ pres_ref
│├ temp_ref
│├ moist_lapse_rate
│├ dry_lapse_rate
│└ layer_thickness
├┐coriolis
│├ nlat
│└ f
├ forcing
├ drag
├ particle_advection
├┐initial_conditions
│├┐vordiv
││├ power
││└ amplitude
│├ pres
│├ temp
│└ humid
├┐time_stepping
│├ trunc
│├ Δt_at_T31
│├ radius
│├ adjust_with_output
│├ robert_filter
│├ williams_filter
│├ Δt_millisec
│├ Δt_sec
│└ Δt
├ spectral_transform
├ implicit
├┐horizontal_diffusion
│├ trunc
│├ nlev
│├ power
│├ time_scale
│├ time_scale_temp_humid
│├ resolution_scaling
│├ power_stratosphere
│├ tapering_σ
│├ ∇²ⁿ
│├ ∇²ⁿ_implicit
│├ ∇²ⁿc
│└ ∇²ⁿc_implicit
├┐output
│├┐spectral_grid
││├ NF
││├ trunc
││├ Grid
││├ dealiasing
││├ radius
││├ n_particles
││├ nlat_half
││├ nlat
││├ npoints
││├ nlev
││└┐vertical_coordinates
││ ├ nlev
││ └ σ_half
│├ output
│├ path
│├ id
│├ run_path
│├ filename
│├ write_restart
│├ pkg_version
│├ startdate
│├ output_dt
│├ output_vars
│├ missing_value
│├ compression_level
│├ shuffle
│├┐keepbits
││├ u
││├ v
││├ vor
││├ div
││├ temp
││├ pres
││├ humid
││├ precip_cond
││├ precip_conv
││└ cloud
│├ output_every_n_steps
│├ timestep_counter
│├ output_counter
│├ netcdf_file
│├ input_Grid
│├ as_matrix
│├ quadrant_rotation
│├ matrix_quadrant
│├ output_Grid
│├ nlat_half
│├ nlon
│├ nlat
│├ npoints
│├ nlev
│├ interpolator
│├ u
│├ v
│├ vor
│├ div
│├ temp
│├ pres
│├ humid
│├ precip_cond
│├ precip_conv
│└ cloud
├ callbacks
└┐feedback
 ├ verbose
 ├ debug
 ├ output
 ├ id
 ├ run_path
 ├ progress_meter
 ├ progress_txt
 └ nars_detected

ShallowWaterModel

The ShallowWaterModel is similar to the BarotropicModel, but it contains for example orography, that the BarotropicModel doesn't have.

model = ShallowWaterModel(; spectral_grid)
tree(model)
ShallowWaterModel{...}
├┐spectral_grid
│├ NF
│├ trunc
│├ Grid
│├ dealiasing
│├ radius
│├ n_particles
│├ nlat_half
│├ nlat
│├ npoints
│├ nlev
│└┐vertical_coordinates
│ ├ nlev
│ └ σ_half
├┐device_setup
│├ device
│├ device_KA
│└ n
├┐geometry
│├┐spectral_grid
││├ NF
││├ trunc
││├ Grid
││├ dealiasing
││├ radius
││├ n_particles
││├ nlat_half
││├ nlat
││├ npoints
││├ nlev
││└┐vertical_coordinates
││ ├ nlev
││ └ σ_half
│├ Grid
│├ nlat_half
│├ nlon_max
│├ nlon
│├ nlat
│├ nlev
│├ npoints
│├ radius
│├ colat
│├ lat
│├ latd
│├ lond
│├ londs
│├ latds
│├ lons
│├ lats
│├ sinlat
│├ coslat
│├ coslat⁻¹
│├ coslat²
│├ coslat⁻²
│├ σ_levels_half
│├ σ_levels_full
│├ σ_levels_thick
│├ ln_σ_levels_full
│└ full_to_half_interpolation
├┐planet
│├ rotation
│├ gravity
│├ daily_cycle
│├ length_of_day
│├ seasonal_cycle
│├ length_of_year
│├ equinox
│├ axial_tilt
│└ solar_constant
├┐atmosphere
│├ mol_mass_dry_air
│├ mol_mass_vapour
│├ heat_capacity
│├ R_gas
│├ R_dry
│├ R_vapour
│├ mol_ratio
│├ μ_virt_temp
│├ κ
│├ water_density
│├ latent_heat_condensation
│├ latent_heat_sublimation
│├ stefan_boltzmann
│├ pres_ref
│├ temp_ref
│├ moist_lapse_rate
│├ dry_lapse_rate
│└ layer_thickness
├┐coriolis
│├ nlat
│└ f
├┐orography
│├ path
│├ file
│├ file_Grid
│├ scale
│├ smoothing
│├ smoothing_power
│├ smoothing_strength
│├ smoothing_fraction
│├ orography
│└ geopot_surf
├ forcing
├ drag
├ particle_advection
├┐initial_conditions
│├┐vordiv
││├ latitude
││├ width
││├ umax
││├ perturb_lat
││├ perturb_lon
││├ perturb_xwidth
││├ perturb_ywidth
││└ perturb_height
│├ pres
│├ temp
│└ humid
├┐time_stepping
│├ trunc
│├ Δt_at_T31
│├ radius
│├ adjust_with_output
│├ robert_filter
│├ williams_filter
│├ Δt_millisec
│├ Δt_sec
│└ Δt
├ spectral_transform
├┐implicit
│├ trunc
│├ α
│├ H
│├ ξH
│├ g∇²
│├ ξg∇²
│└ S⁻¹
├┐horizontal_diffusion
│├ trunc
│├ nlev
│├ power
│├ time_scale
│├ time_scale_temp_humid
│├ resolution_scaling
│├ power_stratosphere
│├ tapering_σ
│├ ∇²ⁿ
│├ ∇²ⁿ_implicit
│├ ∇²ⁿc
│└ ∇²ⁿc_implicit
├┐output
│├┐spectral_grid
││├ NF
││├ trunc
││├ Grid
││├ dealiasing
││├ radius
││├ n_particles
││├ nlat_half
││├ nlat
││├ npoints
││├ nlev
││└┐vertical_coordinates
││ ├ nlev
││ └ σ_half
│├ output
│├ path
│├ id
│├ run_path
│├ filename
│├ write_restart
│├ pkg_version
│├ startdate
│├ output_dt
│├ output_vars
│├ missing_value
│├ compression_level
│├ shuffle
│├┐keepbits
││├ u
││├ v
││├ vor
││├ div
││├ temp
││├ pres
││├ humid
││├ precip_cond
││├ precip_conv
││└ cloud
│├ output_every_n_steps
│├ timestep_counter
│├ output_counter
│├ netcdf_file
│├ input_Grid
│├ as_matrix
│├ quadrant_rotation
│├ matrix_quadrant
│├ output_Grid
│├ nlat_half
│├ nlon
│├ nlat
│├ npoints
│├ nlev
│├ interpolator
│├ u
│├ v
│├ vor
│├ div
│├ temp
│├ pres
│├ humid
│├ precip_cond
│├ precip_conv
│└ cloud
├ callbacks
└┐feedback
 ├ verbose
 ├ debug
 ├ output
 ├ id
 ├ run_path
 ├ progress_meter
 ├ progress_txt
 └ nars_detected

PrimitiveDryModel

The PrimitiveDryModel is a big jump in complexity compared to the 2D models, but because it doesn't contain humidity, several model components like evaporation aren't needed.

spectral_grid = SpectralGrid()
model = PrimitiveDryModel(; spectral_grid)
tree(model)
PrimitiveDryModel{...}
├┐spectral_grid
│├ NF
│├ trunc
│├ Grid
│├ dealiasing
│├ radius
│├ n_particles
│├ nlat_half
│├ nlat
│├ npoints
│├ nlev
│└┐vertical_coordinates
│ ├ nlev
│ └ σ_half
├┐device_setup
│├ device
│├ device_KA
│└ n
├ dynamics
├┐geometry
│├┐spectral_grid
││├ NF
││├ trunc
││├ Grid
││├ dealiasing
││├ radius
││├ n_particles
││├ nlat_half
││├ nlat
││├ npoints
││├ nlev
││└┐vertical_coordinates
││ ├ nlev
││ └ σ_half
│├ Grid
│├ nlat_half
│├ nlon_max
│├ nlon
│├ nlat
│├ nlev
│├ npoints
│├ radius
│├ colat
│├ lat
│├ latd
│├ lond
│├ londs
│├ latds
│├ lons
│├ lats
│├ sinlat
│├ coslat
│├ coslat⁻¹
│├ coslat²
│├ coslat⁻²
│├ σ_levels_half
│├ σ_levels_full
│├ σ_levels_thick
│├ ln_σ_levels_full
│└ full_to_half_interpolation
├┐planet
│├ rotation
│├ gravity
│├ daily_cycle
│├ length_of_day
│├ seasonal_cycle
│├ length_of_year
│├ equinox
│├ axial_tilt
│└ solar_constant
├┐atmosphere
│├ mol_mass_dry_air
│├ mol_mass_vapour
│├ heat_capacity
│├ R_gas
│├ R_dry
│├ R_vapour
│├ mol_ratio
│├ μ_virt_temp
│├ κ
│├ water_density
│├ latent_heat_condensation
│├ latent_heat_sublimation
│├ stefan_boltzmann
│├ pres_ref
│├ temp_ref
│├ moist_lapse_rate
│├ dry_lapse_rate
│└ layer_thickness
├┐coriolis
│├ nlat
│└ f
├┐geopotential
│├ nlev
│├ Δp_geopot_half
│└ Δp_geopot_full
├┐adiabatic_conversion
│├ nlev
│├ σ_lnp_A
│└ σ_lnp_B
├ particle_advection
├┐initial_conditions
│├┐vordiv
││├ η₀
││├ u₀
││├ perturb_lat
││├ perturb_lon
││├ perturb_uₚ
││└ perturb_radius
│├ pres
│├┐temp
││├ η₀
││├ σ_tropopause
││├ u₀
││├ ΔT
││└ Tmin
│└ humid
├┐orography
│├ path
│├ file
│├ file_Grid
│├ scale
│├ smoothing
│├ smoothing_power
│├ smoothing_strength
│├ smoothing_fraction
│├ orography
│└ geopot_surf
├┐land_sea_mask
│├ path
│├ file
│├ file_Grid
│└ mask
├┐ocean
│├ nlat_half
│├ Δt
│├ path
│├ file
│├ varname
│├ file_Grid
│├ missing_value
│└ monthly_temperature
├┐land
│├ nlat_half
│├ Δt
│├ path
│├ file
│├ varname
│├ file_Grid
│├ missing_value
│└ monthly_temperature
├┐solar_zenith
│├ length_of_day
│├ length_of_year
│├ equation_of_time
│├ seasonal_cycle
│├┐solar_declination
││├ axial_tilt
││├ equinox
││├ length_of_year
││└ length_of_day
│├┐time_correction
││├ a
││├ s1
││├ c1
││├ s2
││└ c2
│└ initial_time
├┐albedo
│├ nlat_half
│├ path
│├ file
│├ varname
│├ file_Grid
│└ albedo
├ physics
├┐boundary_layer_drag
│├ κ
│├ z₀
│├ Ri_c
│└ drag_max
├ temperature_relaxation
├┐vertical_diffusion
│├ nlev
│├ κ
│├ z₀
│├ Ri_c
│├ fb
│├ diffuse_static_energy
│├ diffuse_momentum
│├ diffuse_humidity
│├ logZ_z₀
│├ sqrtC_max
│├ ∇²_above
│└ ∇²_below
├ surface_thermodynamics
├┐surface_wind
│├ f_wind
│├ V_gust
│├ use_boundary_layer_drag
│├ drag_land
│└ drag_sea
├┐surface_heat_flux
│├ use_boundary_layer_drag
│├ heat_exchange_land
│└ heat_exchange_sea
├┐convection
│├ nlev
│└ time_scale
├ shortwave_radiation
├┐longwave_radiation
│├ α
│├ temp_tropopause
│└ time_scale
├┐time_stepping
│├ trunc
│├ Δt_at_T31
│├ radius
│├ adjust_with_output
│├ robert_filter
│├ williams_filter
│├ Δt_millisec
│├ Δt_sec
│└ Δt
├ spectral_transform
├┐implicit
│├ trunc
│├ nlev
│├ α
│├ temp_profile
│├ ξ
│├ R
│├ U
│├ L
│├ W
│├ L0
│├ L1
│├ L2
│├ L3
│├ L4
│├ S
│└ S⁻¹
├┐horizontal_diffusion
│├ trunc
│├ nlev
│├ power
│├ time_scale
│├ time_scale_temp_humid
│├ resolution_scaling
│├ power_stratosphere
│├ tapering_σ
│├ ∇²ⁿ
│├ ∇²ⁿ_implicit
│├ ∇²ⁿc
│└ ∇²ⁿc_implicit
├ vertical_advection
├┐output
│├┐spectral_grid
││├ NF
││├ trunc
││├ Grid
││├ dealiasing
││├ radius
││├ n_particles
││├ nlat_half
││├ nlat
││├ npoints
││├ nlev
││└┐vertical_coordinates
││ ├ nlev
││ └ σ_half
│├ output
│├ path
│├ id
│├ run_path
│├ filename
│├ write_restart
│├ pkg_version
│├ startdate
│├ output_dt
│├ output_vars
│├ missing_value
│├ compression_level
│├ shuffle
│├┐keepbits
││├ u
││├ v
││├ vor
││├ div
││├ temp
││├ pres
││├ humid
││├ precip_cond
││├ precip_conv
││└ cloud
│├ output_every_n_steps
│├ timestep_counter
│├ output_counter
│├ netcdf_file
│├ input_Grid
│├ as_matrix
│├ quadrant_rotation
│├ matrix_quadrant
│├ output_Grid
│├ nlat_half
│├ nlon
│├ nlat
│├ npoints
│├ nlev
│├ interpolator
│├ u
│├ v
│├ vor
│├ div
│├ temp
│├ pres
│├ humid
│├ precip_cond
│├ precip_conv
│└ cloud
├ callbacks
└┐feedback
 ├ verbose
 ├ debug
 ├ output
 ├ id
 ├ run_path
 ├ progress_meter
 ├ progress_txt
 └ nars_detected

PrimitiveWetModel

The PrimitiveWetModel is the most complex model we currently have, hence its field tree is the longest, defining many components for the physics parameterizations.

model = PrimitiveWetModel(; spectral_grid)
tree(model)
PrimitiveWetModel{...}
├┐spectral_grid
│├ NF
│├ trunc
│├ Grid
│├ dealiasing
│├ radius
│├ n_particles
│├ nlat_half
│├ nlat
│├ npoints
│├ nlev
│└┐vertical_coordinates
│ ├ nlev
│ └ σ_half
├┐device_setup
│├ device
│├ device_KA
│└ n
├ dynamics
├┐geometry
│├┐spectral_grid
││├ NF
││├ trunc
││├ Grid
││├ dealiasing
││├ radius
││├ n_particles
││├ nlat_half
││├ nlat
││├ npoints
││├ nlev
││└┐vertical_coordinates
││ ├ nlev
││ └ σ_half
│├ Grid
│├ nlat_half
│├ nlon_max
│├ nlon
│├ nlat
│├ nlev
│├ npoints
│├ radius
│├ colat
│├ lat
│├ latd
│├ lond
│├ londs
│├ latds
│├ lons
│├ lats
│├ sinlat
│├ coslat
│├ coslat⁻¹
│├ coslat²
│├ coslat⁻²
│├ σ_levels_half
│├ σ_levels_full
│├ σ_levels_thick
│├ ln_σ_levels_full
│└ full_to_half_interpolation
├┐planet
│├ rotation
│├ gravity
│├ daily_cycle
│├ length_of_day
│├ seasonal_cycle
│├ length_of_year
│├ equinox
│├ axial_tilt
│└ solar_constant
├┐atmosphere
│├ mol_mass_dry_air
│├ mol_mass_vapour
│├ heat_capacity
│├ R_gas
│├ R_dry
│├ R_vapour
│├ mol_ratio
│├ μ_virt_temp
│├ κ
│├ water_density
│├ latent_heat_condensation
│├ latent_heat_sublimation
│├ stefan_boltzmann
│├ pres_ref
│├ temp_ref
│├ moist_lapse_rate
│├ dry_lapse_rate
│└ layer_thickness
├┐coriolis
│├ nlat
│└ f
├┐geopotential
│├ nlev
│├ Δp_geopot_half
│└ Δp_geopot_full
├┐adiabatic_conversion
│├ nlev
│├ σ_lnp_A
│└ σ_lnp_B
├ particle_advection
├┐initial_conditions
│├┐vordiv
││├ η₀
││├ u₀
││├ perturb_lat
││├ perturb_lon
││├ perturb_uₚ
││└ perturb_radius
│├ pres
│├┐temp
││├ η₀
││├ σ_tropopause
││├ u₀
││├ ΔT
││└ Tmin
│└┐humid
│ └ relhumid_ref
├┐orography
│├ path
│├ file
│├ file_Grid
│├ scale
│├ smoothing
│├ smoothing_power
│├ smoothing_strength
│├ smoothing_fraction
│├ orography
│└ geopot_surf
├┐land_sea_mask
│├ path
│├ file
│├ file_Grid
│└ mask
├┐ocean
│├ nlat_half
│├ Δt
│├ path
│├ file
│├ varname
│├ file_Grid
│├ missing_value
│└ monthly_temperature
├┐land
│├ nlat_half
│├ Δt
│├ path
│├ file
│├ varname
│├ file_Grid
│├ missing_value
│└ monthly_temperature
├┐solar_zenith
│├ length_of_day
│├ length_of_year
│├ equation_of_time
│├ seasonal_cycle
│├┐solar_declination
││├ axial_tilt
││├ equinox
││├ length_of_year
││└ length_of_day
│├┐time_correction
││├ a
││├ s1
││├ c1
││├ s2
││└ c2
│└ initial_time
├┐albedo
│├ nlat_half
│├ path
│├ file
│├ varname
│├ file_Grid
│└ albedo
├┐soil
│├ nlat_half
│├ D_top
│├ D_root
│├ W_cap
│├ W_wilt
│├ path
│├ file
│├ varname_layer1
│├ varname_layer2
│├ file_Grid
│├ missing_value
│├ monthly_soil_moisture_layer1
│└ monthly_soil_moisture_layer2
├┐vegetation
│├ nlat_half
│├ low_veg_factor
│├ path
│├ file
│├ varname_vegh
│├ varname_vegl
│├ file_Grid
│├ missing_value
│├ high_cover
│└ low_cover
├ physics
├┐clausius_clapeyron
│├ e₀
│├ T₀
│├ Lᵥ
│├ cₚ
│├ R_vapour
│├ R_dry
│├ Lᵥ_Rᵥ
│├ T₀⁻¹
│└ mol_ratio
├┐boundary_layer_drag
│├ κ
│├ z₀
│├ Ri_c
│└ drag_max
├ temperature_relaxation
├┐vertical_diffusion
│├ nlev
│├ κ
│├ z₀
│├ Ri_c
│├ fb
│├ diffuse_static_energy
│├ diffuse_momentum
│├ diffuse_humidity
│├ logZ_z₀
│├ sqrtC_max
│├ ∇²_above
│└ ∇²_below
├ surface_thermodynamics
├┐surface_wind
│├ f_wind
│├ V_gust
│├ use_boundary_layer_drag
│├ drag_land
│└ drag_sea
├┐surface_heat_flux
│├ use_boundary_layer_drag
│├ heat_exchange_land
│└ heat_exchange_sea
├┐surface_evaporation
│├ use_boundary_layer_drag
│├ moisture_exchange_land
│└ moisture_exchange_sea
├┐large_scale_condensation
│├ relative_humidity_threshold
│└ time_scale
├┐convection
│├ nlev
│├ time_scale
│└ relative_humidity
├ shortwave_radiation
├┐longwave_radiation
│├ α
│├ temp_tropopause
│└ time_scale
├┐time_stepping
│├ trunc
│├ Δt_at_T31
│├ radius
│├ adjust_with_output
│├ robert_filter
│├ williams_filter
│├ Δt_millisec
│├ Δt_sec
│└ Δt
├ spectral_transform
├┐implicit
│├ trunc
│├ nlev
│├ α
│├ temp_profile
│├ ξ
│├ R
│├ U
│├ L
│├ W
│├ L0
│├ L1
│├ L2
│├ L3
│├ L4
│├ S
│└ S⁻¹
├┐horizontal_diffusion
│├ trunc
│├ nlev
│├ power
│├ time_scale
│├ time_scale_temp_humid
│├ resolution_scaling
│├ power_stratosphere
│├ tapering_σ
│├ ∇²ⁿ
│├ ∇²ⁿ_implicit
│├ ∇²ⁿc
│└ ∇²ⁿc_implicit
├ vertical_advection
├ hole_filling
├┐output
│├┐spectral_grid
││├ NF
││├ trunc
││├ Grid
││├ dealiasing
││├ radius
││├ n_particles
││├ nlat_half
││├ nlat
││├ npoints
││├ nlev
││└┐vertical_coordinates
││ ├ nlev
││ └ σ_half
│├ output
│├ path
│├ id
│├ run_path
│├ filename
│├ write_restart
│├ pkg_version
│├ startdate
│├ output_dt
│├ output_vars
│├ missing_value
│├ compression_level
│├ shuffle
│├┐keepbits
││├ u
││├ v
││├ vor
││├ div
││├ temp
││├ pres
││├ humid
││├ precip_cond
││├ precip_conv
││└ cloud
│├ output_every_n_steps
│├ timestep_counter
│├ output_counter
│├ netcdf_file
│├ input_Grid
│├ as_matrix
│├ quadrant_rotation
│├ matrix_quadrant
│├ output_Grid
│├ nlat_half
│├ nlon
│├ nlat
│├ npoints
│├ nlev
│├ interpolator
│├ u
│├ v
│├ vor
│├ div
│├ temp
│├ pres
│├ humid
│├ precip_cond
│├ precip_conv
│└ cloud
├ callbacks
└┐feedback
 ├ verbose
 ├ debug
 ├ output
 ├ id
 ├ run_path
 ├ progress_meter
 ├ progress_txt
 └ nars_detected

Size of a Simulation

The tree function also allows for the with_size::Bool keyword (default false), which will also print the size of the respective branches to give you an idea of how much memory a SpeedyWeather simulation uses.

tree(simulation, max_level=1, with_size=true)
Simulation{BarotropicModel} (1.26 MB)
├┐prognostic_variables (127.75 KB)
├┐diagnostic_variables (534.68 KB)
└┐model (600.50 KB)

And with max_level you can truncate the tree to go down at most that many levels. 1MB is a typical size for a one-level T31 resolution simulation. In comparison, a higher resolution PrimitiveWetModel would use

spectral_grid = SpectralGrid(trunc=127, nlev=8)
model = PrimitiveWetModel(;spectral_grid)
simulation = initialize!(model)
tree(simulation, max_level=1, with_size=true)
Simulation{PrimitiveWetModel} (61.15 MB)
├┐prognostic_variables (5.42 MB)
├┐diagnostic_variables (35.46 MB)
└┐model (20.27 MB)