Skip to content

Commit

Permalink
Merge branch 'release/0.18.0'
Browse files Browse the repository at this point in the history
* release/0.18.0: (86 commits)
  Update changelog
  Version 0.18.0
  Remove spuriouis includes
  Fix missing return
  Fix floating-point exception in Projection::lonlatBoundingBox
  Apply clang-tidy fix 'readability-braces-around-statements'
  clang-format: AllowShortBlocksOnASingleLine -> false, AllowShortIfStatementsOnASingleLine -> false
  Update to clang-format 7.0.1
  ATLAS-237 Enforce more checks in the example-grids
  ATLAS-237 Crossplatform grid hashes
  Fix overwriting of Domain
  Apply clang-format
  ATLAS-240, MIR-4, MIR-77, MIR-385, MIR-386: use atlas/util/CoordinateEnums.h
  For fussy compilers
  ATLAS-240 rename {Grid,Projection}::boundingBox() to {Grid,Projection}::lonlatBoundingBox() and add RectangularLonLatDomain
  travis: enable more CI builds
  Fix missing override keywords in Unstructured
  Fix compilation
  ATLAS-242 Workaround until ATLAS-241 is addressed
  Fix LambertAzimuthalEqualAreaProjection when round-off errors cause asin to become undefined
  ...
  • Loading branch information
wdeconinck committed Jul 15, 2019
2 parents 5064d1e + d24eb72 commit 327e213
Show file tree
Hide file tree
Showing 333 changed files with 7,514 additions and 2,612 deletions.
25 changes: 18 additions & 7 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: true
Expand All @@ -28,6 +28,7 @@ BraceWrapping:
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
Expand All @@ -37,6 +38,7 @@ BraceWrapping:
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
Expand All @@ -53,11 +55,12 @@ DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeCategories:
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Expand All @@ -66,7 +69,8 @@ IncludeCategories:
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentWidth: 4
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
Expand All @@ -75,6 +79,7 @@ MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
Expand All @@ -83,6 +88,7 @@ PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
Expand All @@ -92,7 +98,11 @@ SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
Expand All @@ -104,3 +114,4 @@ Standard: Auto
TabWidth: 4
UseTab: Never
...

36 changes: 16 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,22 @@ matrix:
- cgal
- fftw

##################################
# KNOWN TO FAIL, so comment
##################################

# - os: osx
# env:
# - CACHE_NAME=osx-clang-mpich
# - CXX_COMPILER='clang++' C_COMPILER='clang' Fortran_COMPILER='gfortran'
# - MPI=mpich
# osx_image: xcode9

# - os: linux
# compiler: gcc
# env:
# - CACHE_NAME=linux-pgi-openmpi
# - CXX_COMPILER='pgc++' C_COMPILER='pgcc' Fortran_COMPILER='pgfortran'
# - MPI='openmpi'
# - PGI_VERSION="CommunityEdition"
# - ECKIT_CMAKE_OPTIONS="-DRT_LIB=/usr/lib/x86_64-linux-gnu/librt.so -DCURSES_LIBRARY=/usr/lib/x86_64-linux-gnu/libcurses.so"
# - ATLAS_CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=DEBUG -DENABLE_FORTRAN=OFF" # Fortran tests known to be broken with pgi/17.10
- os: osx
env:
- CACHE_NAME=osx-clang-mpich
- CXX_COMPILER='clang++' C_COMPILER='clang' Fortran_COMPILER='gfortran'
- MPI=mpich
osx_image: xcode9

- os: linux
compiler: gcc
env:
- CACHE_NAME=linux-pgi-openmpi
- CXX_COMPILER='pgc++' C_COMPILER='pgcc' Fortran_COMPILER='pgfortran'
- MPI='openmpi'
- PGI_VERSION="CommunityEdition"
- ECKIT_CMAKE_OPTIONS="-DENABLE_ECKIT-395=OFF -DRT_LIB=/usr/lib/x86_64-linux-gnu/librt.so -DCURSES_LIBRARY=/usr/lib/x86_64-linux-gnu/libcurses.so"
- ATLAS_CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=DEBUG"

before_install:

Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

## [Unreleased]

## [0.18.0] - 2019-07-15
### Changed
- Make grid hashes crossplatform

### Added
- Fortran: Can now use TransLocal
- Fortran: Can now create unstructured grids
- LonLat Bounding box computations for grids using its projection
- Serialisation of Mesh Connectivity tables to/from eckit::Stream

### Fixed
- Structured interpolation bugs
- 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 @@ -113,6 +128,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.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
[0.17.1]: https://github.com/ecmwf/atlas/compare/0.17.0...0.17.1
[0.17.0]: https://github.com/ecmwf/atlas/compare/0.16.0...0.17.0
Expand Down
39 changes: 38 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ ecbuild_debug( " ECKIT_FEATURES : [${ECKIT_FEATURES}]" )

# options & dependencies

ecbuild_add_cxx11_flags()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

ecbuild_find_python()

Expand Down Expand Up @@ -239,12 +240,48 @@ ecbuild_add_option( FEATURE SANDBOX
DESCRIPTION "Build the sandbox stuff" )


### use of atlas-run for tests
ecbuild_add_option( FEATURE ATLAS_RUN
DEFAULT ON
DESCRIPTION "Use atlas/tools/atlas-run to run atlas tests" )

if( HAVE_ATLAS_RUN )
set( MPIEXEC_EXECUTABLE ${CMAKE_CURRENT_SOURCE_DIR}/tools/atlas-run )
set( MPIEXEC_NUMPROC_FLAG='-n' )
set( CMAKE_CROSSCOMPILING_EMULATOR ${CMAKE_CURRENT_SOURCE_DIR}/tools/atlas-run )
endif()

################################################################################
# sources

set( MIR_NEEDS_TRANSI TRUE CACHE BOOL "Deprecated" INTERNAL )

include(CompileFlags)

find_program (CLANG_TIDY_EXE NAMES "clang-tidy" )
if( CLANG_TIDY_EXE )
message(STATUS "Found clang-tidy: ${CLANG_TIDY_EXE}")
endif()
ecbuild_add_option( FEATURE CLANG_TIDY
DESCRIPTION "Use 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}/*'")
endif()

find_program (INCLUDE_WHAT_YOU_USE_EXE NAMES "include-what-you-use" )
if( INCLUDE_WHAT_YOU_USE_EXE )
message(STATUS "Found include-what-you-use: ${INCLUDE_WHAT_YOU_USE_EXE}" )
endif()
ecbuild_add_option( FEATURE INCLUDE_WHAT_YOU_USE
DEFAULT OFF # Need clang compiler?
DESCRIPTION "Use include-what-you-use clang-tool"
CONDITION INCLUDE_WHAT_YOU_USE_EXE )
if( HAVE_INCLUDE_WHAT_YOU_USE )
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${INCLUDE_WHAT_YOU_USE_EXE})
endif()

add_subdirectory( src )

################################################################################
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.17.2" )
set ( ${PROJECT_NAME}_VERSION_STR "0.18.0" )

6 changes: 0 additions & 6 deletions doc/example-grids/classic_gaussian_1.json

This file was deleted.

10 changes: 10 additions & 0 deletions doc/example-grids/classic_gaussian_1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type : "classic_gaussian"
N : 16


check :
size : 1688
lonlat(first) : [0,85.7606]
lonlat(last) : [342,-85.7606]
uid : 49cbbc2cde26050896e000d1e0f5fb7b
bounding_box(n,w,s,e) : [90,0,-90,360]
7 changes: 0 additions & 7 deletions doc/example-grids/classic_gaussian_2.json

This file was deleted.

16 changes: 16 additions & 0 deletions doc/example-grids/classic_gaussian_2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Classic Gaussian grid 'N16'

type : "classic_gaussian"
N : 16
projection :
type : "rotated_schmidt"
stretching_factor : 2.0
north_pole : [3.0,47.0]


check :
size : 1688
lonlat(first) : [3,44.8796]
lonlat(last) : [-172.453,-54.9736]
uid : 64d609c6ee4b036b209047aef97a10eb
bounding_box(n,w,s,e) : [90,0,-90,360]
5 changes: 0 additions & 5 deletions doc/example-grids/classic_gaussian_3.json

This file was deleted.

11 changes: 11 additions & 0 deletions doc/example-grids/classic_gaussian_3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Classic Gaussian grid 'O16'

name : "N16"


check :
size : 1688
lonlat(first) : [0,85.7606]
lonlat(last) : [342,-85.7606]
uid : 49cbbc2cde26050896e000d1e0f5fb7b
bounding_box(n,w,s,e) : [90,0,-90,360]
8 changes: 0 additions & 8 deletions doc/example-grids/cropped_classic_gaussian_1.json

This file was deleted.

17 changes: 17 additions & 0 deletions doc/example-grids/cropped_classic_gaussian_1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Classic Gaussian grid 'N16'

type : "classic_gaussian"
N : 16

domain :
type : "zonal_band"
ymax : 90
ymin : 45


check :
size : 332
lonlat(first) : [0,85.7606]
lonlat(last) : [354,47.0696]
uid : 7f87a4865eb08403c179c6488c2eeeca
bounding_box(n,w,s,e) : [90,0,45,360]
8 changes: 0 additions & 8 deletions doc/example-grids/cropped_classic_gaussian_2.json

This file was deleted.

20 changes: 20 additions & 0 deletions doc/example-grids/cropped_classic_gaussian_2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Classic Gaussian grid 'N16'

type : "octahedral_gaussian"
N : 16

domain:
type : "rectangular"
ymax : 45
ymin : -45
xmin : 45
xmax : 90
units : "degrees"


check :
size : 144
lonlat(first) : [48.4615,41.5325]
lonlat(last) : [90,-41.5325]
uid : e55a302d0bb56f50523e6bc2d28c4234
bounding_box(n,w,s,e) : [45,45,-45,90]
6 changes: 0 additions & 6 deletions doc/example-grids/cropped_shifted_lonlat_1.json

This file was deleted.

15 changes: 15 additions & 0 deletions doc/example-grids/cropped_shifted_lonlat_1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Shifted lonlat grid 'S45'

name : "S45"
domain :
type : "zonal_band"
ymax : 90
ymin : 45


check :
size : 4140
lonlat(first) : [1,89]
lonlat(last) : [359,45]
uid : a1426cb32c8694d07d997cd224805947
bounding_box(n,w,s,e) : [90,0,45,360]
7 changes: 0 additions & 7 deletions doc/example-grids/custom_structured_1.json

This file was deleted.

13 changes: 13 additions & 0 deletions doc/example-grids/custom_structured_1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Regular lonlat grid 'L4' but given in custom manner

type : "structured"
yspace : { type : "linear", N : 9, start : 90, end : -90 }
xspace : { type : "linear", N : 16, start : 0, end : 360, endpoint : false }


check :
size : 144
lonlat(first) : [0,90]
lonlat(last) : [337.5,-90]
uid : 714c5d2db88b5eefdf8f789e8012f0aa
bounding_box(n,w,s,e) : [90,0,-90,360]
Loading

0 comments on commit 327e213

Please sign in to comment.