Speedy Weather Extension
This page documents the SpeedyWeather-based SFNO layers
ESM_PINOSpeedyWeatherExt.GaussianGridInfo — Type
GaussianGridInfoStructure containing information about a Gaussian grid resolution.
Fields
truncation::Int: Spectral truncation number (e.g., 31 for T31)nlat::Int: Number of latitude pointsnlon::Int: Number of longitude pointskm_at_equator::Float64: Approximate grid spacing at equator in kmdeg_at_equator::Float64: Approximate grid spacing at equator in degreesdescription::String: Human-readable description
ESM_PINOSpeedyWeatherExt.calculate_gaussian_grid_size — Method
calculate_gaussian_grid_size(truncation::Int) -> Tuple{Int, Int}Calculate Gaussian grid dimensions from spectral truncation number using standard formulas.
For a spectral truncation T, the standard relationships are:
- nlat = (truncation + 1) * 3 / 2 (for reduced grids, varies slightly)
- nlon = 2 * nlat (for regular grids)
Arguments
truncation::Int: Spectral truncation number
Returns
Tuple{Int, Int}: (nlat, nlon)
ESM_PINOSpeedyWeatherExt.gaussian_resolution_to_grid — Method
gaussian_resolution_to_grid(resolution::AbstractString) -> Tuple{Int, Int}Convert a Gaussian grid resolution string (e.g., "T31", "T63") to (nlat, nlon) tuple.
Arguments
resolution::AbstractString: Grid resolution in format "TN" where N is truncation number
Returns
Tuple{Int, Int}: (number of latitude points, number of longitude points)
Examples
julia> gaussian_resolution_to_grid("T31")
(48, 96)
julia> gaussian_resolution_to_grid("T63")
(96, 192)
julia> gaussian_resolution_to_grid("T255")
(256, 512)Throws
ArgumentError: If resolution is not recognized
ESM_PINOSpeedyWeatherExt.get_truncation_from_nlat — Method
get_truncation_from_nlat(nlat::Int) -> IntRetrieve the spectral truncation number for a given number of latitude points.
Arguments
nlat::Int: Number of latitude points
Returns
Int: Spectral truncation number (e.g., 31 for T31)
Examples
julia> get_truncation_from_nlat(48)
31
julia> get_truncation_from_nlat(96)
63
julia> get_truncation_from_nlat(256)
255Throws
ArgumentError: If nlat doesn't match any known Gaussian grid resolution