Speedy Weather Extension

This page documents the SpeedyWeather-based SFNO layers

ESM_PINOSpeedyWeatherExt.GaussianGridInfoType
GaussianGridInfo

Structure containing information about a Gaussian grid resolution.

Fields

  • truncation::Int: Spectral truncation number (e.g., 31 for T31)
  • nlat::Int: Number of latitude points
  • nlon::Int: Number of longitude points
  • km_at_equator::Float64: Approximate grid spacing at equator in km
  • deg_at_equator::Float64: Approximate grid spacing at equator in degrees
  • description::String: Human-readable description
source
ESM_PINOSpeedyWeatherExt.calculate_gaussian_grid_sizeMethod
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)
source
ESM_PINOSpeedyWeatherExt.gaussian_resolution_to_gridMethod
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
source
ESM_PINOSpeedyWeatherExt.get_truncation_from_nlatMethod
get_truncation_from_nlat(nlat::Int) -> Int

Retrieve 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)
255

Throws

  • ArgumentError: If nlat doesn't match any known Gaussian grid resolution
source