@@ -503,7 +503,7 @@ function add_space_coordinates_maybe!(
503
503
add_space_coordinates_maybe! (nc, horizontal_space, num_points_horiz)
504
504
505
505
vertical_space = Spaces. FiniteDifferenceSpace (
506
- Spaces. vertical_topology (space),
506
+ Spaces. grid (space). vertical_grid ,
507
507
Spaces. staggering (space),
508
508
)
509
509
@@ -611,7 +611,7 @@ function target_coordinates(
611
611
target_coordinates (Spaces. horizontal_space (space), num_points_horiz)
612
612
613
613
vertical_space = Spaces. FiniteDifferenceSpace (
614
- Spaces. vertical_topology (space),
614
+ Spaces. grid (space). vertical_grid ,
615
615
Spaces. staggering (space),
616
616
)
617
617
vcoords =
@@ -681,79 +681,68 @@ Return a tuple with number of points that are optimally suited to interpolate th
681
681
"Optimally suited" here means approximately the same as the number of points as the given
682
682
`space`.
683
683
"""
684
- function default_num_points (
685
- space:: ClimaCore.Spaces.ExtrudedFiniteDifferenceSpace ,
686
- )
687
- horizontal_space = ClimaCore. Spaces. horizontal_space (space)
684
+ function default_num_points (space:: Spaces.ExtrudedFiniteDifferenceSpace )
685
+ horizontal_space = Spaces. horizontal_space (space)
688
686
num_horz = default_num_points (horizontal_space)
689
687
690
- vertical_space = ClimaCore . Spaces. FiniteDifferenceSpace (
691
- Spaces. vertical_topology (space),
688
+ vertical_space = Spaces. FiniteDifferenceSpace (
689
+ Spaces. grid (space). vertical_grid ,
692
690
Spaces. staggering (space),
693
691
)
694
692
num_vert = default_num_points (vertical_space)
695
693
return (num_horz... , num_vert... )
696
694
end
697
695
698
696
# 2D sphere
699
- function default_num_points (
700
- space:: ClimaCore.Spaces.CubedSphereSpectralElementSpace2D ,
701
- )
697
+ function default_num_points (space:: Spaces.CubedSphereSpectralElementSpace2D )
702
698
# A cubed sphere has 4 panels to cover the range of longitudes, each panel has
703
699
# `num_elements_per_panel` elements, each with `unique_degrees_of_freedom` points. Same
704
700
# for latitudes, except that we need 2 panels to cover from 0 to 180.
705
701
706
702
unique_degrees_of_freedom = ClimaCore. Quadratures. unique_degrees_of_freedom (
707
- ClimaCore . Grids. quadrature_style (space),
703
+ Grids. quadrature_style (space),
708
704
)
709
705
num_elements_per_panel = ClimaCore. Meshes. n_elements_per_panel_direction (
710
- ClimaCore . Spaces. topology (space). mesh,
706
+ Spaces. topology (space). mesh,
711
707
)
712
708
num_lat = 2 * num_elements_per_panel * unique_degrees_of_freedom
713
709
num_lon = 2 num_lat
714
710
return (num_lon, num_lat)
715
711
end
716
712
717
713
# TODO : Maybe move to ClimaCore?
718
- const RectilinearSpectralElementSpace1D =
719
- ClimaCore. Spaces. SpectralElementSpace1D{
720
- <: ClimaCore.Grids.SpectralElementGrid1D {
721
- <: ClimaCore.Topologies.IntervalTopology ,
722
- },
723
- }
714
+ const RectilinearSpectralElementSpace1D = Spaces. SpectralElementSpace1D{
715
+ <: Grids.SpectralElementGrid1D{<:ClimaCore.Topologies.IntervalTopology} ,
716
+ }
724
717
725
718
# 1D box
726
719
function default_num_points (space:: RectilinearSpectralElementSpace1D )
727
720
unique_degrees_of_freedom = ClimaCore. Quadratures. unique_degrees_of_freedom (
728
- ClimaCore . Grids. quadrature_style (space),
721
+ Grids. quadrature_style (space),
729
722
)
730
723
return (
731
724
unique_degrees_of_freedom *
732
- ClimaCore. Meshes. nelements (ClimaCore . Spaces. topology (space). mesh),
725
+ ClimaCore. Meshes. nelements (Spaces. topology (space). mesh),
733
726
)
734
727
end
735
728
736
729
# 2D box
737
- function default_num_points (
738
- space:: ClimaCore.Spaces.RectilinearSpectralElementSpace2D ,
739
- )
730
+ function default_num_points (space:: Spaces.RectilinearSpectralElementSpace2D )
740
731
unique_degrees_of_freedom = ClimaCore. Quadratures. unique_degrees_of_freedom (
741
- ClimaCore . Grids. quadrature_style (space),
732
+ Grids. quadrature_style (space),
742
733
)
743
734
744
735
return (
745
- unique_degrees_of_freedom * ClimaCore. Meshes. nelements (
746
- ClimaCore. Spaces. topology (space). mesh. intervalmesh1,
747
- ),
748
- unique_degrees_of_freedom * ClimaCore. Meshes. nelements (
749
- ClimaCore. Spaces. topology (space). mesh. intervalmesh2,
750
- ),
736
+ unique_degrees_of_freedom *
737
+ ClimaCore. Meshes. nelements (Spaces. topology (space). mesh. intervalmesh1),
738
+ unique_degrees_of_freedom *
739
+ ClimaCore. Meshes. nelements (Spaces. topology (space). mesh. intervalmesh2),
751
740
)
752
741
end
753
742
754
743
# Column
755
744
function default_num_points (space:: Spaces.FiniteDifferenceSpace )
756
745
# We always want the center space for interpolation
757
746
cspace = Spaces. center_space (space)
758
- return (ClimaCore . Spaces. nlevels (cspace),)
747
+ return (Spaces. nlevels (cspace),)
759
748
end
0 commit comments