Skip to content

Commit

Permalink
correct testing
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-silvestri committed Oct 10, 2024
1 parent bce1b41 commit 3592c0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/dependencies_for_runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using OrthogonalSphericalShellGrids
using Oceananigans
using Oceananigans.Grids: halo_size
using Oceananigans.Grids: halo_size, φnodes, λnodes
using Oceananigans.Utils
using Oceananigans.BoundaryConditions
using OrthogonalSphericalShellGrids: get_cartesian_nodes_and_vertices
Expand Down
13 changes: 8 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ include("dependencies_for_runtests.jl")
@test grid.conformal_mapping.north_poles_latitude == 35
@test grid.conformal_mapping.southermost_latitude == -80

min_Δφ = minimum(grid.φᶜᶜᵃ[:, 2] .- grid.φᶜᶜᵃ[:, 1])
λᶜᶜᵃ = λnodes(grid, Center(), Center())
φᶜᶜᵃ = φnodes(grid, Center(), Center())

@test minimum(grid.λᶜᶜᵃ) 0
@test maximum(grid.λᶜᶜᵃ) 360
@test maximum(grid.φᶜᶜᵃ) 90
min_Δφ = minimum(φᶜᶜᵃ[:, 2] .- φᶜᶜᵃ[:, 1])

@test minimum(λᶜᶜᵃ) 0
@test maximum(λᶜᶜᵃ) 360
@test maximum(φᶜᶜᵃ) 90

# 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(grid.φᶜᶜᵃ .+ min_Δφ / 10) grid.conformal_mapping.southermost_latitude
@test minimum(φᶜᶜᶜ .+ min_Δφ / 10) grid.conformal_mapping.southermost_latitude
end

include("test_tripolar_grid.jl")
Expand Down

0 comments on commit 3592c0b

Please sign in to comment.