Skip to content

Commit

Permalink
Flip lat and long
Browse files Browse the repository at this point in the history
[skip ci][ci skip]
  • Loading branch information
Sbozzolo committed Sep 8, 2024
1 parent 6bc5983 commit 27374c0
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/shared_utilities/Domains.jl
Original file line number Diff line number Diff line change
Expand Up @@ -268,21 +268,22 @@ function Plane(;
radius_earth = FT(radius_earth)
long, lat = longlat
xlim =
(long - xlim[1] / (2radius_earth), long + xlim[2] / (2radius_earth))
ylim =
(lat - ylim[1] / (2radius_earth), lat + ylim[2] / (2radius_earth))
ylim =
(long - xlim[1] / (2radius_earth), long + xlim[2] / (2radius_earth))
@assert xlim[1] < xlim[2]
@assert ylim[1] < ylim[2]

# NOTE: We have LatLong instead of the other way because of ClimaCore
domain_x = ClimaCore.Domains.IntervalDomain(
ClimaCore.Geometry.LongPoint(xlim[1]),
ClimaCore.Geometry.LongPoint(xlim[2]);
boundary_names = (:west, :east),
ClimaCore.Geometry.LatPoint(xlim[1]),
ClimaCore.Geometry.LatPoint(xlim[2]);
boundary_names = (:north, :south),
)
domain_y = ClimaCore.Domains.IntervalDomain(
ClimaCore.Geometry.LatPoint(ylim[1]),
ClimaCore.Geometry.LatPoint(ylim[2]);
boundary_names = (:north, :south),
ClimaCore.Geometry.LongPoint(ylim[1]),
ClimaCore.Geometry.LongPoint(ylim[2]);
boundary_names = (:west, :east),
)
end
plane = ClimaCore.Domains.RectangleDomain(domain_x, domain_y)
Expand Down Expand Up @@ -922,10 +923,10 @@ end

"""
depth(space::Union{ClimaCore.Spaces.CenterFiniteDifferenceSpace,
ClimaCore.Spaces.CenterExtrudedFiniteDifferenceSpace})
ClimaCore.Spaces.CenterExtrudedFiniteDifferenceSpace})
Returns the depth of the domain as a scalar. Note that these functions
will need to be modified upon the introduction of
will need to be modified upon the introduction of
- topography at surface
- depth to bedrock (topography at bottom)
Expand Down

0 comments on commit 27374c0

Please sign in to comment.