From 27374c07880b8a7c1933b59deb581316f57926f6 Mon Sep 17 00:00:00 2001 From: Gabriele Bozzola Date: Sun, 8 Sep 2024 11:39:41 -0700 Subject: [PATCH] Flip lat and long [skip ci][ci skip] --- src/shared_utilities/Domains.jl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/shared_utilities/Domains.jl b/src/shared_utilities/Domains.jl index 76e5d5654f..2abaf22f5a 100644 --- a/src/shared_utilities/Domains.jl +++ b/src/shared_utilities/Domains.jl @@ -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) @@ -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)