From 2b48385b923a15057012622e7541157ba67f2fcd Mon Sep 17 00:00:00 2001 From: Simone Silvestri Date: Thu, 10 Oct 2024 09:56:32 +0200 Subject: [PATCH] correct typo --- src/distributed_tripolar_grid.jl | 4 ++-- src/tripolar_grid.jl | 18 +++++++++--------- src/with_halo.jl | 8 ++++---- test/runtests.jl | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/distributed_tripolar_grid.jl b/src/distributed_tripolar_grid.jl index 3387e57..91b4d84 100644 --- a/src/distributed_tripolar_grid.jl +++ b/src/distributed_tripolar_grid.jl @@ -220,13 +220,13 @@ function reconstruct_global_grid(grid::DistributedTripolarGrid) north_poles_latitude = grid.conformal_mapping.north_poles_latitude first_pole_longitude = grid.conformal_mapping.first_pole_longitude - southermost_latitude = grid.conformal_mapping.southermost_latitude + southernmost_latitude = grid.conformal_mapping.southernmost_latitude return TripolarGrid(child_arch, FT; halo, size, north_poles_latitude, first_pole_longitude, - southermost_latitude, + southernmost_latitude, z) end diff --git a/src/tripolar_grid.jl b/src/tripolar_grid.jl index 85c0681..d87db8b 100644 --- a/src/tripolar_grid.jl +++ b/src/tripolar_grid.jl @@ -2,20 +2,20 @@ struct Tripolar{N, F, S} north_poles_latitude :: N first_pole_longitude :: F - southermost_latitude :: S + southernmost_latitude :: S end Adapt.adapt_structure(to, t::Tripolar) = Tripolar(Adapt.adapt(to, t.north_poles_latitude), Adapt.adapt(to, t.first_pole_longitude), - Adapt.adapt(to, t.southermost_latitude)) + Adapt.adapt(to, t.southernmost_latitude)) const TripolarGrid{FT, TX, TY, TZ, A, R, FR, Arch} = OrthogonalSphericalShellGrid{FT, TX, TY, TZ, A, R, FR, <:Tripolar, Arch} """ TripolarGrid(arch = CPU(), FT::DataType = Float64; size, - southermost_latitude = -80, + southernmost_latitude = -80, halo = (4, 4, 4), radius = R_Earth, z = (0, 1), @@ -39,7 +39,7 @@ Keyword Arguments ================= - `size`: The number of cells in the (longitude, latitude, vertical) dimensions. -- `southermost_latitude`: The southernmost `Center` latitude of the grid. Default is -80. +- `southernmost_latitude`: The southernmost `Center` latitude of the grid. Default is -80. - `halo`: The halo size in the (longitude, latitude, vertical) dimensions. Default is (4, 4, 4). - `radius`: The radius of the spherical shell. Default is `R_Earth`. - `z`: The vertical ``z``-coordinate range of the grid. Default is (0, 1). @@ -57,7 +57,7 @@ The north singularities are located at """ function TripolarGrid(arch = CPU(), FT::DataType = Float64; size, - southermost_latitude = -80, # The southermost `Center` latitude of the grid + southernmost_latitude = -80, # The southermost `Center` latitude of the grid halo = (4, 4, 4), radius = R_Earth, z = (0, 1), @@ -68,7 +68,7 @@ function TripolarGrid(arch = CPU(), FT::DataType = Float64; # to construct the grid on the GPU. This is not a huge problem as # grid generation is quite fast, but it might become for sub-kilometer grids - latitude = (southermost_latitude, 90) + latitude = (southernmost_latitude, 90) longitude = (-180, 180) focal_distance = tand((90 - north_poles_latitude) / 2) @@ -87,8 +87,8 @@ function TripolarGrid(arch = CPU(), FT::DataType = Float64; Lz, zᵃᵃᶠ, zᵃᵃᶜ, Δzᵃᵃᶠ, Δzᵃᵃᶜ = generate_coordinate(FT, Bounded(), Nz, Hz, z, :z, CPU()) # The φ coordinate is a bit more complicated because the center points start from - # southermost_latitude and end at 90ᵒ N. - φᵃᶜᵃ = collect(range(southermost_latitude, 90, length = Nφ)) + # southernmost_latitude and end at 90ᵒ N. + φᵃᶜᵃ = collect(range(southernmost_latitude, 90, length = Nφ)) Δφ = φᵃᶜᵃ[2] - φᵃᶜᵃ[1] φᵃᶠᵃ = φᵃᶜᵃ .- Δφ / 2 @@ -322,7 +322,7 @@ function TripolarGrid(arch = CPU(), FT::DataType = Float64; on_architecture(arch, Azᶜᶠᵃ), on_architecture(arch, Azᶠᶠᵃ), radius, - Tripolar(north_poles_latitude, first_pole_longitude, southermost_latitude)) + Tripolar(north_poles_latitude, first_pole_longitude, southernmost_latitude)) return grid end diff --git a/src/with_halo.jl b/src/with_halo.jl index c5ce92b..9207ef9 100644 --- a/src/with_halo.jl +++ b/src/with_halo.jl @@ -10,14 +10,14 @@ function with_halo(new_halo, old_grid::TripolarGrid) north_poles_latitude = old_grid.conformal_mapping.north_poles_latitude first_pole_longitude = old_grid.conformal_mapping.first_pole_longitude - southermost_latitude = old_grid.conformal_mapping.southermost_latitude + southernmost_latitude = old_grid.conformal_mapping.southernmost_latitude new_grid = TripolarGrid(architecture(old_grid), eltype(old_grid); size, z, halo = new_halo, radius = old_grid.radius, north_poles_latitude, first_pole_longitude, - southermost_latitude) + southernmost_latitude) return new_grid end @@ -32,13 +32,13 @@ function with_halo(new_halo, old_grid::DistributedTripolarGrid) north_poles_latitude = old_grid.conformal_mapping.north_poles_latitude first_pole_longitude = old_grid.conformal_mapping.first_pole_longitude - southermost_latitude = old_grid.conformal_mapping.southermost_latitude + southernmost_latitude = old_grid.conformal_mapping.southernmost_latitude return TripolarGrid(arch, eltype(old_grid); halo = new_halo, size = N, north_poles_latitude, first_pole_longitude, - southermost_latitude, + southernmost_latitude, z) end diff --git a/test/runtests.jl b/test/runtests.jl index b89be24..d750175 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,7 +4,7 @@ include("dependencies_for_runtests.jl") grid = TripolarGrid(size = (4, 5, 1), z = (0, 1), first_pole_longitude = 75, north_poles_latitude = 35, - southermost_latitude = -80) + southernmost_latitude = -80) @test grid isa TripolarGrid @@ -14,7 +14,7 @@ include("dependencies_for_runtests.jl") @test grid.conformal_mapping.first_pole_longitude == 75 @test grid.conformal_mapping.north_poles_latitude == 35 - @test grid.conformal_mapping.southermost_latitude == -80 + @test grid.conformal_mapping.southernmost_latitude == -80 λᶜᶜᵃ = λnodes(grid, Center(), Center()) φᶜᶜᵃ = φnodes(grid, Center(), Center()) @@ -28,7 +28,7 @@ include("dependencies_for_runtests.jl") # The minimum latitude is not exactly the southermost latitude because the grid # undulates slightly to maintain the same analytical description in the whole sphere # (i.e. constant latitude lines do not exist anywhere in this grid) - @test minimum(φᶜᶜᶜ .+ min_Δφ / 10) ≥ grid.conformal_mapping.southermost_latitude + @test minimum(φᶜᶜᶜ .+ min_Δφ / 10) ≥ grid.conformal_mapping.southernmost_latitude end include("test_tripolar_grid.jl")