Skip to content

Commit

Permalink
Merge branch 'release/0.19.0'
Browse files Browse the repository at this point in the history
* release/0.19.0: (40 commits)
  Version 0.19.0
  Fix compilation of test_mesh_reorder.cc for Cray/8.5
  MIR-77, MIR-385, MIR-386 Replace native Lambert projection with LambertConformalConic projection
  MIR-77, MIR-385, MIR-386: preliminary support for interpolation from Lambert Conformal projected grids
  MIR-77, MIR-385, MIR-386: preliminary support for interpolation from Lambert Conformal projected grids
  Test Proj projections using yml
  Add false_easting and false_northing to LambertAzimuthalEqualAreaProjection
  Fix testing of grids
  ATLAS-245 Test reordering for unstructured meshes
  Stay backwards compatibile with eckit 1.0.2 for now
  Update to eckit 1.4
  Fix gridtools_storage backend
  Compatibility with eckit master branch [1.3.2] (was working already as of eckit 0a9743cb)
  ATLAS-246: Proj-based projections unit test (from Proj examples)
  ATLAS-247 Comment regarding status
  ATLAS-247 cleanup
  ATLAS-247 Preliminary support for CellColumns functionspace and Gmsh output
  mesh::Elements::indexview() function added
  Fix EdgeColumns::haloExchange for fields with rank!=2
  LocalView::shape() function added
  ...
  • Loading branch information
wdeconinck committed Oct 1, 2019
2 parents 0ef1dad + e68f021 commit e058524
Show file tree
Hide file tree
Showing 140 changed files with 5,004 additions and 536 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,26 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

## [Unreleased]


## [0.19.0] - 2019-10-01
### Fixed
- Lambert ( conformal conic ) projection xy coordinates are now corrected

### Changed
- LambertProjection renamed to LambertConformalConic

### Added
- Reordering of nodes strategies (Hilbert curve, ReverseCuthillMckee)
- Preliminary CellColumns functionspace with Gmsh IO; halos are not yet fully supported


## [0.18.1] - 2019-08-10
### Fixed
- Match vertical structured interpolation to IFS
- Fix in creating vertical dimension in StructuredColumns using interval
- Fix in caching StructuredColumnsHaloExchange


## [0.18.0] - 2019-07-15
### Changed
- Make grid hashes crossplatform
Expand All @@ -28,6 +42,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
- StructuredColumns bug with iSend
- Memory corruption in Spectral functionspace with GT CUDA backend


## [0.17.2] - 2019-06-04
### Fixed
- Compilation with PGI 19.4
Expand Down Expand Up @@ -134,6 +149,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
## 0.13.0 - 2018-02-16

[Unreleased]: https://github.com/ecmwf/atlas/compare/master...develop
[0.19.0]: https://github.com/ecmwf/atlas/compare/0.18.1...0.19.0
[0.18.1]: https://github.com/ecmwf/atlas/compare/0.18.0...0.18.1
[0.18.0]: https://github.com/ecmwf/atlas/compare/0.17.2...0.18.0
[0.17.2]: https://github.com/ecmwf/atlas/compare/0.17.1...0.17.2
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ecbuild_declare_project()

### eckit

ecbuild_use_package( PROJECT eckit VERSION 0.21.0 REQUIRED )
ecbuild_use_package( PROJECT eckit VERSION 1.0.2 REQUIRED )
ecbuild_debug( " ECKIT_FEATURES : [${ECKIT_FEATURES}]" )

# options & dependencies
Expand Down Expand Up @@ -200,6 +200,13 @@ ecbuild_add_option( FEATURE EIGEN
DESCRIPTION "Use Eigen linear algebra library"
REQUIRED_PACKAGES Eigen3 )

### Proj

ecbuild_add_option( FEATURE PROJ
DESCRIPTION "PROJ-based projections"
DEFAULT OFF
REQUIRED_PACKAGES PROJ4 )

### Type for Global indices and unique point ids

set( ATLAS_BITS_GLOBAL 64 )
Expand Down
2 changes: 1 addition & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.

set ( ${PROJECT_NAME}_VERSION_STR "0.18.1" )
set ( ${PROJECT_NAME}_VERSION_STR "0.19.0" )

20 changes: 18 additions & 2 deletions cmake/FeatureClangTidy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ ecbuild_add_option( FEATURE CLANG_TIDY
CONDITION CLANG_TIDY_EXE )

if (HAVE_CLANG_TIDY)
set(CLANG_TIDY_CHECKS "-*,readability-braces-around-statements,redundant-string-init")
set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXE};-checks=${CLANG_TIDY_CHECKS};-header-filter='${CMAKE_SOURCE_DIR}/*'")

# Uncomment to apply fixes. Make sure to use a clean build, and apply clang-format afterwards!
# set( CLANG_TIDY_FIXIT ";-fix" )

set( CLANG_TIDY_CHECKS "-*" )
foreach( _clang_tidy_check
readability-braces-around-statements
redundant-string-init
modernize-use-nullptr
modernize-use-using
modernize-use-override
modernize-use-emplace
modernize-use-equals-default
modernize-use-equals-delete
)
set( CLANG_TIDY_CHECKS "${CLANG_TIDY_CHECKS},${_clang_tidy_check}" )
endforeach()
set( CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXE};-checks=${CLANG_TIDY_CHECKS};-header-filter='${CMAKE_SOURCE_DIR}/*'${CLANG_TIDY_FIXIT}" )
endif()
2 changes: 1 addition & 1 deletion doc/example-grids/cropped_shifted_lonlat_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ check :
size : 4140
lonlat(first) : [1,89]
lonlat(last) : [359,45]
uid : a1426cb32c8694d07d997cd224805947
uid : 18b1a156853d2cca30b7d13ef8400510
bounding_box(n,w,s,e) : [90,0,45,360]
11 changes: 9 additions & 2 deletions doc/example-grids/regional_lambert_azimuthal_equal_area_2.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# EFAS grid
# Close resemblance to EFAS grid
# Here the sphere is used instead of "GRS80" ellipsoid
# Actual EFAS grid uses "+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs"
# For real EFAS grid, check "regional_lambert_azimuthal_equal_area_4.yml"

type : "regional"
nx : 1000
Expand All @@ -10,6 +13,8 @@ projection :
type : "lambert_azimuthal_equal_area"
standard_parallel : 52
central_longitude : 10
false_easting : 4321000
false_northing : 3210000
y_numbering : -1


Expand All @@ -18,4 +23,6 @@ check :
lonlat(first) : [-35.034,66.9821]
lonlat(last) : [41.2436,23.8962]
bounding_box(n,w,s,e) : [72.647, -35.035, 23.895, 74.144]
uid : a87b2f233e26156d01c05a9ef2466721
uid : 2ef4f1bb005cf8e24ecc9464f8b7e089
xmin : 2510375.79
ymin : 748404.45
26 changes: 26 additions & 0 deletions doc/example-grids/regional_lambert_azimuthal_equal_area_3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# !!! Requires proj external package (aka proj4) --> ENABLE_PROJ=ON

# Close resemblance to EFAS grid ( equivalent to regional_lambert_azimuthal_equal_area_2.yml )
# Here the sphere is used instead of ellipsoid
# Actual EFAS grid uses "+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs"

type : "regional"
nx : 1000
ny : 950
dx : 5000
dy : 5000
lonlat(xmin,ymax) : [-35.034,66.9821]
projection :
type : "proj"
proj : "+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +R=6371229.0"
y_numbering : -1


check :
size : 950000
lonlat(first) : [-35.034,66.9821]
lonlat(last) : [41.2436,23.8962]
bounding_box(n,w,s,e) : [72.647, -35.035, 23.895, 74.144]
uid : da2de78744323533eff5069272924741
xmin : 2510375.79
ymin : 748404.45
26 changes: 26 additions & 0 deletions doc/example-grids/regional_lambert_azimuthal_equal_area_4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# !!! Requires proj external package (aka proj4) --> ENABLE_PROJ=ON

# EFAS grid

type : "regional"
nx : 1000
ny : 950
dx : 5000
dy : 5000
lonlat(xmin,ymax) : [-35.034,66.9821]
projection :
type : "proj"
proj : "+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs"
# Equivalent proj string, but leads to different uid (a71208b89dc4bc8d20494514e562c6b7)
# proj : "EPSG:3035"
y_numbering : -1


check :
size : 950000
lonlat(first) : [-35.034,66.9821]
lonlat(last) : [41.1397,23.9423]
bounding_box(n,w,s,e) : [72.6426, -35.035, 23.9413, 73.9386]
uid : fe4ea53ff38ccefeae02e53ee307ab42
xmin : 2502497.60
ymin : 752495.56
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ ny : 40
dx : 50000
dy : 50000
lonlat(centre) : [4,50]

projection :
type : "lambert"
latitude1 : 50
type : "lambert_conformal_conic"
longitude0 : 4
y_numbering : +1
latitude1 : 50

y_numbering : +1

check :
size : 2000
lonlat(first) : [-10.3173,40.22]
lonlat(last) : [24.4368,57.2335]
uid : 1cb0b7c8f91617c3b6065d72b85c65c4
uid : 2e01d66aa6df870b0ad346da4e80c4ff
bounding_box(n,w,s,e) : [58.7333,-16.4378,40.219,24.4378]
xmin : -1225000.00
ymin : -975000.00
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dx : 13545.0
dy : 13545.0
lonlat(xmin,ymin): [-126.138,16.281]
projection :
type : "lambert"
type : "lambert_conformal_conic"
latitude1 : 25.0
longitude0 : -95.0
y_numbering : +1
Expand All @@ -15,5 +15,7 @@ check :
size : 151987
lonlat(first) : [-126.138,16.281]
lonlat(last) : [-57.3811,55.4813]
uid : ec98b263e57286710aeb4131a614b5f9
uid : 5c9a0f242e68ff6dd7711ba3ab6f5c7b
bounding_box(n,w,s,e) : [58.3664,-139.857,16.28,-57.3801]
xmin : -3332155.29
ymin : -588892.76
1 change: 1 addition & 0 deletions doc/example-grids/regular_lonlat_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ check:
bounding_box(n,w,s,e) : [60.001, -164.730, 39.999, -151.270]
lonlat(first) : [-158., 40.]
lonlat(last) : [-164.729, 59.547]
uid : 5ba0c02a9508d662d751ba34fdb4279e

1 change: 1 addition & 0 deletions doc/example-grids/regular_lonlat_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ check:
bounding_box(n,w,s,e) : [-19.999, 18.370, -40.001, 25.630]
lonlat(first) : [18.371, -20.243]
lonlat(last) : [22., -40.]
uid : 8c3901b64831fa8418485aba519874df

46 changes: 25 additions & 21 deletions doc/example-grids/update_uid.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

#
# This script checks all example-grids and updates the uid to a newly calculated uid
Expand All @@ -25,29 +25,33 @@ def run_program_get_error(file):

def process_file( file, newfile ):

import string
print( "File: " , file )
import string
print( "File: " , file )

f = open(file,"r+")
text = f.read()
f.close()
f = open(file,"r+")
text = f.read()
f.close()

line = run_program_get_error( file )
if line:
print( line )
import re
replace = re.match( r"Check failed: grid uid (.*) expected to be (.*)$", line ).group(1)
uid = re.findall( r"^ uid : (.*)$", text, re.MULTILINE)[0]
print("Search/Replace ",uid, " to ", replace )
newtext = text.replace( uid, replace )
else:
print( "Nothing to replace, copy-only" )
newtext = text
newtext = text

print( "New file: ", newfile)
f = open(newfile,"w")
f.write(newtext)
f.close()
lines = run_program_get_error( file )
if lines:
for line in lines.splitlines():
import re
matched = re.match( r"Check failed: grid uid (.*) expected to be (.*)$", line )
if matched :
print( line )
replace = matched.group(1)
uid = re.findall( r"^ uid : (.*)$", text, re.MULTILINE)[0]
print("Search/Replace ",uid, " to ", replace )
newtext = text.replace( uid, replace )
else:
print( "Nothing to replace, copy-only" )

print( "New file: ", newfile)
f = open(newfile,"w")
f.write(newtext)
f.close()


import sys
Expand Down
14 changes: 12 additions & 2 deletions src/apps/atlas-benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "atlas/mesh/actions/BuildHalo.h"
#include "atlas/mesh/actions/BuildParallelFields.h"
#include "atlas/mesh/actions/BuildPeriodicBoundaries.h"
#include "atlas/mesh/actions/Reorder.h"
#include "atlas/meshgenerator.h"
#include "atlas/output/Gmsh.h"
#include "atlas/parallel/Checksum.h"
Expand Down Expand Up @@ -126,7 +127,7 @@ struct TimerStats {
//----------------------------------------------------------------------------------------------------------------------

class AtlasBenchmark : public AtlasTool {
virtual int execute( const Args& args );
int execute( const Args& args ) override;

public:
AtlasBenchmark( int argc, char** argv ) : AtlasTool( argc, argv ) {
Expand All @@ -138,6 +139,8 @@ class AtlasBenchmark : public AtlasTool {
add_option( new SimpleOption<bool>( "output", "Write output in gmsh format" ) );
add_option( new SimpleOption<long>( "exclude", "Exclude number of iterations in statistics (default=1)" ) );
add_option( new SimpleOption<bool>( "details", "Show detailed timers (default=false)" ) );
add_option( new SimpleOption<std::string>( "reorder", "Reorder mesh (default=none)" ) );
add_option( new SimpleOption<bool>( "sort_edges", "Sort edges by lowest node local index" ) );
}

void setup();
Expand Down Expand Up @@ -169,6 +172,8 @@ class AtlasBenchmark : public AtlasTool {
long omp_threads;
double dz;
std::string gridname;
std::string reorder{"none"};
bool sort_edges{false};

TimerStats iteration_timer;
TimerStats haloexchange_timer;
Expand Down Expand Up @@ -196,6 +201,8 @@ int AtlasBenchmark::execute( const Args& args ) {
args.get( "exclude", exclude );
output = false;
args.get( "output", output );
args.get( "reorder", reorder );
args.get( "sort_edges", sort_edges );
bool help( false );
args.get( "help", help );

Expand Down Expand Up @@ -308,9 +315,12 @@ void AtlasBenchmark::setup() {
ATLAS_TRACE_SCOPE( "Create mesh" ) {
mesh = MeshGenerator( "structured", util::Config( "partitioner", "equal_regions" ) ).generate( grid );
}
mesh::actions::Reorder{option::type( reorder )}( mesh );

ATLAS_TRACE_SCOPE( "Create node_fs" ) { nodes_fs = functionspace::NodeColumns( mesh, option::halo( halo ) ); }
ATLAS_TRACE_SCOPE( "Create edges_fs" ) { edges_fs = functionspace::EdgeColumns( mesh, option::halo( halo ) ); }
ATLAS_TRACE_SCOPE( "Create edges_fs" ) {
edges_fs = functionspace::EdgeColumns( mesh, option::halo( halo ) | util::Config( "sort_edges", sort_edges ) );
}

// mesh.polygon(0).outputPythonScript("plot_polygon.py");
// atlas::output::Output gmsh = atlas::output::Gmsh( "edges.msh",
Expand Down
2 changes: 1 addition & 1 deletion src/apps/atlas-gaussian-latitudes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ using atlas::grid::spacing::GaussianSpacing;
//------------------------------------------------------------------------------------------------------

class AtlasGaussianLatitudes : public eckit::Tool {
virtual void run();
void run() override;

public:
AtlasGaussianLatitudes( int argc, char** argv ) : eckit::Tool( argc, argv ) {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/atlas-gmsh-extract.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ using namespace atlas;
//------------------------------------------------------------------------------------------------------

class gmsh_extract : public eckit::Tool {
virtual void run();
void run() override;

public:
gmsh_extract( int argc, char** argv ) : eckit::Tool( argc, argv ) {
Expand Down
Loading

0 comments on commit e058524

Please sign in to comment.