Skip to content

Commit

Permalink
Merge branch 'develop' into feature/array_view_variant
Browse files Browse the repository at this point in the history
  • Loading branch information
odlomax authored Sep 16, 2024
2 parents f4d3697 + e2974ad commit b608818
Show file tree
Hide file tree
Showing 12 changed files with 1,403 additions and 11 deletions.
4 changes: 4 additions & 0 deletions src/atlas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,8 @@ interpolation/method/structured/QuasiCubic2D.cc
interpolation/method/structured/QuasiCubic2D.h
interpolation/method/structured/QuasiCubic3D.cc
interpolation/method/structured/QuasiCubic3D.h
interpolation/method/structured/RegionalLinear2D.cc
interpolation/method/structured/RegionalLinear2D.h
interpolation/method/structured/StructuredInterpolation2D.h
interpolation/method/structured/StructuredInterpolation2D.tcc
interpolation/method/structured/StructuredInterpolation3D.h
Expand Down Expand Up @@ -826,6 +828,8 @@ util/PolygonXY.cc
util/PolygonXY.h
util/Metadata.cc
util/Metadata.h
util/PackVectorFields.cc
util/PackVectorFields.h
util/Point.cc
util/Point.h
util/Polygon.cc
Expand Down
21 changes: 14 additions & 7 deletions src/atlas/functionspace/detail/StructuredColumns_setup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -588,13 +588,20 @@ void StructuredColumns::setup(const grid::Distribution& distribution, const ecki

atlas_omp_parallel_for(idx_t n = 0; n < gridpoints.size(); ++n) {
const GridPoint& gp = gridpoints[n];
if (gp.j >= 0 && gp.j < grid_->ny()) {
xy(gp.r, XX) = grid_->x(gp.i, gp.j);
xy(gp.r, YY) = grid_->y(gp.j);
}
else {
xy(gp.r, XX) = compute_x(gp.i, gp.j);
xy(gp.r, YY) = compute_y(gp.j);
if (regional) {
std::array<double,2> lonlatVec;
grid_->lonlat(gp.i, gp.j, lonlatVec.data());
xy(gp.r, XX) = lonlatVec[0];
xy(gp.r, YY) = lonlatVec[1];
} else {
if (gp.j >= 0 && gp.j < grid_->ny()) {
xy(gp.r, XX) = grid_->x(gp.i, gp.j);
xy(gp.r, YY) = grid_->y(gp.j);
}
else {
xy(gp.r, XX) = compute_x(gp.i, gp.j);
xy(gp.r, YY) = compute_y(gp.j);
}
}

bool in_domain(false);
Expand Down
2 changes: 2 additions & 0 deletions src/atlas/interpolation/method/MethodFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "structured/Linear3D.h"
#include "structured/QuasiCubic2D.h"
#include "structured/QuasiCubic3D.h"
#include "structured/RegionalLinear2D.h"
#include "unstructured/FiniteElement.h"
#include "unstructured/UnstructuredBilinearLonLat.h"

Expand All @@ -46,6 +47,7 @@ void force_link() {
MethodBuilder<method::Cubic3D>();
MethodBuilder<method::QuasiCubic2D>();
MethodBuilder<method::QuasiCubic3D>();
MethodBuilder<method::RegionalLinear2D>();
MethodBuilder<method::GridBoxAverage>();
MethodBuilder<method::GridBoxMaximum>();
MethodBuilder<method::CubedSphereBilinear>();
Expand Down
Loading

0 comments on commit b608818

Please sign in to comment.