From 882ce429efba1ef23b02c1dd1863b77c2b6d834a Mon Sep 17 00:00:00 2001 From: Pedro Maciel Date: Fri, 6 Dec 2019 17:04:32 +0000 Subject: [PATCH 1/7] ATLAS-255: regression test --- src/tests/grid/test_grids.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/tests/grid/test_grids.cc b/src/tests/grid/test_grids.cc index 5d1ca840f..9105a8bca 100644 --- a/src/tests/grid/test_grids.cc +++ b/src/tests/grid/test_grids.cc @@ -196,6 +196,17 @@ CASE( "Create unstructured from unstructured" ) { EXPECT( ugrid.size() == StructuredGrid( agrid, domain ).size() ); } +CASE( "ATLAS-255: regular Gaussian grid with global domain" ) { + GlobalDomain globe; + Grid grid( "F80", globe ); + EXPECT( GaussianGrid( grid ) ); +} + +CASE( "ATLAS-255: reduced Gaussian grid with global domain" ) { + GlobalDomain globe; + Grid grid( "O80", globe ); + EXPECT( GaussianGrid( grid ) ); +} //----------------------------------------------------------------------------- From 0e7299916c27fcca6e4596c6236db226f5cf4a3d Mon Sep 17 00:00:00 2001 From: Pedro Maciel Date: Fri, 6 Dec 2019 17:44:35 +0000 Subject: [PATCH 2/7] ATLAS-255: regression test fix --- src/atlas/grid/detail/grid/Structured.cc | 185 +++++++++--------- .../trans/local/LegendreCacheCreatorLocal.cc | 9 +- 2 files changed, 96 insertions(+), 98 deletions(-) diff --git a/src/atlas/grid/detail/grid/Structured.cc b/src/atlas/grid/detail/grid/Structured.cc index 57570ba70..b9d2b4ec1 100644 --- a/src/atlas/grid/detail/grid/Structured.cc +++ b/src/atlas/grid/detail/grid/Structured.cc @@ -357,115 +357,110 @@ class Normalise { } // namespace void Structured::crop( const Domain& dom ) { - if ( dom ) { - ATLAS_ASSERT( dom.units() == projection().units() ); + if ( !dom || dom.global() ) { + domain_ = + RectangularDomain( {xspace_.min(), xspace_.max()}, {yspace_.min(), yspace_.max()}, projection_.units() ); + return; + } + ATLAS_ASSERT( dom.units() == projection().units() ); + auto rect_domain = RectangularDomain( dom ); - auto rect_domain = RectangularDomain( dom ); + if ( !rect_domain ) { + std::stringstream errmsg; + errmsg << "Cannot crop the grid with domain " << dom; + throw_Exception( errmsg.str(), Here() ); + } - if ( rect_domain ) { - const double cropped_ymin = rect_domain.ymin(); - const double cropped_ymax = rect_domain.ymax(); + const double cropped_ymin = rect_domain.ymin(); + const double cropped_ymax = rect_domain.ymax(); - // Cropping in Y - idx_t jmin = ny(); - idx_t jmax = 0; - for ( idx_t j = 0; j < ny(); ++j ) { - if ( rect_domain.contains_y( y( j ) ) ) { - jmin = std::min( j, jmin ); - jmax = std::max( j, jmax ); - } - } - ATLAS_ASSERT( jmax >= jmin ); - - idx_t cropped_ny = jmax - jmin + 1; - std::vector cropped_y( y_.begin() + jmin, y_.begin() + jmin + cropped_ny ); - std::vector cropped_dx( dx_.begin() + jmin, dx_.begin() + jmin + cropped_ny ); - - std::vector cropped_xmin( cropped_ny, std::numeric_limits::max() ); - std::vector cropped_xmax( cropped_ny, -std::numeric_limits::max() ); - std::vector cropped_nx( cropped_ny ); - - // Cropping in X - Normalise normalise( rect_domain ); - for ( idx_t j = jmin, jcropped = 0; j <= jmax; ++j, ++jcropped ) { - idx_t n = 0; - for ( idx_t i = 0; i < nx( j ); ++i ) { - const double _x = normalise( x( i, j ) ); - if ( rect_domain.contains_x( _x ) ) { - cropped_xmin[jcropped] = std::min( cropped_xmin[jcropped], _x ); - cropped_xmax[jcropped] = std::max( cropped_xmax[jcropped], _x ); - ++n; - } - } - cropped_nx[jcropped] = n; + // Cropping in Y + idx_t jmin = ny(); + idx_t jmax = 0; + for ( idx_t j = 0; j < ny(); ++j ) { + if ( rect_domain.contains_y( y( j ) ) ) { + jmin = std::min( j, jmin ); + jmax = std::max( j, jmax ); + } + } + ATLAS_ASSERT( jmax >= jmin ); + + idx_t cropped_ny = jmax - jmin + 1; + std::vector cropped_y( y_.begin() + jmin, y_.begin() + jmin + cropped_ny ); + std::vector cropped_dx( dx_.begin() + jmin, dx_.begin() + jmin + cropped_ny ); + + std::vector cropped_xmin( cropped_ny, std::numeric_limits::max() ); + std::vector cropped_xmax( cropped_ny, -std::numeric_limits::max() ); + std::vector cropped_nx( cropped_ny ); + + // Cropping in X + Normalise normalise( rect_domain ); + for ( idx_t j = jmin, jcropped = 0; j <= jmax; ++j, ++jcropped ) { + idx_t n = 0; + for ( idx_t i = 0; i < nx( j ); ++i ) { + const double _x = normalise( x( i, j ) ); + if ( rect_domain.contains_x( _x ) ) { + cropped_xmin[jcropped] = std::min( cropped_xmin[jcropped], _x ); + cropped_xmax[jcropped] = std::max( cropped_xmax[jcropped], _x ); + ++n; } - bool endpoint = true; - if ( ZonalBandDomain( rect_domain ) ) { - for ( idx_t j = 0; j < cropped_ny; ++j ) { - if ( eckit::types::is_approximately_equal( cropped_xmax[j] + cropped_dx[j], cropped_xmin[j] + 360., - 1.e-10 ) ) { - cropped_xmax[j] = cropped_xmin[j] + 360.; - endpoint = false; - } - } + } + cropped_nx[jcropped] = n; + } + bool endpoint = true; + if ( ZonalBandDomain( rect_domain ) ) { + for ( idx_t j = 0; j < cropped_ny; ++j ) { + if ( eckit::types::is_approximately_equal( cropped_xmax[j] + cropped_dx[j], cropped_xmin[j] + 360., + 1.e-10 ) ) { + cropped_xmax[j] = cropped_xmin[j] + 360.; + endpoint = false; } + } + } - // Complete structures + // Complete structures - idx_t cropped_nxmin, cropped_nxmax; - cropped_nxmin = cropped_nxmax = cropped_nx.front(); + idx_t cropped_nxmin, cropped_nxmax; + cropped_nxmin = cropped_nxmax = cropped_nx.front(); - for ( idx_t j = 1; j < cropped_ny; ++j ) { - cropped_nxmin = std::min( cropped_nx[j], cropped_nxmin ); - cropped_nxmax = std::max( cropped_nx[j], cropped_nxmax ); - } - idx_t cropped_npts = std::accumulate( cropped_nx.begin(), cropped_nx.end(), idx_t{0} ); + for ( idx_t j = 1; j < cropped_ny; ++j ) { + cropped_nxmin = std::min( cropped_nx[j], cropped_nxmin ); + cropped_nxmax = std::max( cropped_nx[j], cropped_nxmax ); + } + idx_t cropped_npts = std::accumulate( cropped_nx.begin(), cropped_nx.end(), idx_t{0} ); - Spacing cropped_yspace( - new spacing::CustomSpacing( cropped_ny, cropped_y.data(), {cropped_ymin, cropped_ymax} ) ); + Spacing cropped_yspace( new spacing::CustomSpacing( cropped_ny, cropped_y.data(), {cropped_ymin, cropped_ymax} ) ); - std::vector cropped_xspacings( cropped_ny ); - for ( idx_t j = 0; j < cropped_ny; ++j ) { - cropped_xspacings[j] = - new spacing::LinearSpacing( cropped_xmin[j], cropped_xmax[j], cropped_nx[j], endpoint ); - } - XSpace cropped_xspace( cropped_xspacings ); - - for ( idx_t j = 0; j < cropped_ny; ++j ) { - ATLAS_ASSERT( eckit::types::is_approximately_equal( cropped_xspace.xmin()[j], cropped_xmin[j] ) ); - if ( cropped_nx[j] > 1 ) { - ATLAS_ASSERT( - eckit::types::is_approximately_equal( cropped_xspace.dx()[j], cropped_dx[j], 1.e-10 ) ); - } - ATLAS_ASSERT( cropped_xspace.nx()[j] == cropped_nx[j] ); - ATLAS_ASSERT( cropped_xspace.nxmin() == cropped_nxmin ); - ATLAS_ASSERT( cropped_xspace.nxmax() == cropped_nxmax ); - } + std::vector cropped_xspacings( cropped_ny ); + for ( idx_t j = 0; j < cropped_ny; ++j ) { + cropped_xspacings[j] = new spacing::LinearSpacing( cropped_xmin[j], cropped_xmax[j], cropped_nx[j], endpoint ); + } + XSpace cropped_xspace( cropped_xspacings ); - // Modify grid - { - yspace_ = cropped_yspace; - xspace_ = cropped_xspace; - xmin_ = cropped_xmin; - xmax_ = cropped_xmax; - dx_ = cropped_dx; - nx_ = cropped_nx; - nxmin_ = cropped_nxmin; - nxmax_ = cropped_nxmax; - npts_ = cropped_npts; - y_ = cropped_y; - } - } - else { - std::stringstream errmsg; - errmsg << "Cannot crop the grid with domain " << dom; - throw_Exception( errmsg.str(), Here() ); + for ( idx_t j = 0; j < cropped_ny; ++j ) { + ATLAS_ASSERT( eckit::types::is_approximately_equal( cropped_xspace.xmin()[j], cropped_xmin[j] ) ); + if ( cropped_nx[j] > 1 ) { + ATLAS_ASSERT( eckit::types::is_approximately_equal( cropped_xspace.dx()[j], cropped_dx[j], 1.e-10 ) ); } + ATLAS_ASSERT( cropped_xspace.nx()[j] == cropped_nx[j] ); + ATLAS_ASSERT( cropped_xspace.nxmin() == cropped_nxmin ); + ATLAS_ASSERT( cropped_xspace.nxmax() == cropped_nxmax ); } - domain_ = - dom ? dom - : RectangularDomain( {xspace_.min(), xspace_.max()}, {yspace_.min(), yspace_.max()}, projection_.units() ); + + // Modify grid + yspace_ = cropped_yspace; + xspace_ = cropped_xspace; + xmin_ = cropped_xmin; + xmax_ = cropped_xmax; + dx_ = cropped_dx; + nx_ = cropped_nx; + nxmin_ = cropped_nxmin; + nxmax_ = cropped_nxmax; + npts_ = cropped_npts; + y_ = cropped_y; + + domain_ = dom; } void Structured::computeTruePeriodicity() { diff --git a/src/atlas/trans/local/LegendreCacheCreatorLocal.cc b/src/atlas/trans/local/LegendreCacheCreatorLocal.cc index 4995105aa..18e10fe37 100644 --- a/src/atlas/trans/local/LegendreCacheCreatorLocal.cc +++ b/src/atlas/trans/local/LegendreCacheCreatorLocal.cc @@ -68,8 +68,11 @@ std::string LegendreCacheCreatorLocal::uid() const { }; stream << "local-T" << truncation_ << "-"; StructuredGrid structured( grid_ ); - if ( GaussianGrid( grid_ ) ) { - // Same cache for any global Gaussian grid + if ( grid_.projection() ) { + give_up(); + } + else if ( GaussianGrid( grid_ ) && eckit::types::is_approximately_equal( structured.xspace().min(), 0. ) ) { + // Same cache for any global Gaussian grid, starting at Greenwich stream << "GaussianN" << GaussianGrid( grid_ ).N(); } else if ( RegularLonLatGrid( grid_ ) ) { @@ -94,7 +97,7 @@ std::string LegendreCacheCreatorLocal::uid() const { give_up(); } } - else if ( RegularGrid( grid_ ) && not grid_.projection() && structured.yspace().type() == "linear" ) { + else if ( RegularGrid( grid_ ) && structured.yspace().type() == "linear" ) { RectangularDomain domain( grid_.domain() ); ATLAS_ASSERT( domain ); stream << "Regional"; From 521c2506ac683c6815057b5623490714af789bcf Mon Sep 17 00:00:00 2001 From: Pedro Maciel Date: Sat, 7 Dec 2019 17:08:31 +0000 Subject: [PATCH 3/7] ATLAS-256, PGEN-274: unit tests for both 'local' and 'ifs' spectral transforms cache file naming --- src/tests/trans/test_trans.cc | 73 ++++++++++++++++++++++++ src/tests/trans/test_trans_localcache.cc | 37 ++++++++++++ 2 files changed, 110 insertions(+) diff --git a/src/tests/trans/test_trans.cc b/src/tests/trans/test_trans.cc index 349e9fb2e..4ec5cef87 100644 --- a/src/tests/trans/test_trans.cc +++ b/src/tests/trans/test_trans.cc @@ -30,6 +30,7 @@ #include "atlas/meshgenerator.h" #include "atlas/output/Gmsh.h" #include "atlas/parallel/mpi/mpi.h" +#include "atlas/trans/LegendreCacheCreator.h" #include "atlas/trans/Trans.h" #include "atlas/trans/VorDivToUV.h" #include "atlas/trans/detail/TransFactory.h" @@ -600,6 +601,78 @@ CASE( "test_trans_VorDivToUV" ) { } #endif +#ifdef TRANS_HAVE_IO +CASE( "ATLAS-256: Legendre coefficient expected unique identifiers" ) { + if ( mpi::comm().size() == 1 ) { + util::Config options; + options.set( option::type( "ifs" ) ); + options.set( "flt", false ); + + auto uids = {"ifs-T20-RegularGaussianN320-OPT4189816c2e", + "ifs-T20-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", + "ifs-T639-RegularGaussianN320-OPT4189816c2e", + "ifs-T639-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", + "ifs-T1279-RegularGaussianN320-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", + "ifs-T20-RegularGaussianN640-OPT4189816c2e", + "ifs-T20-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", + "ifs-T639-RegularGaussianN640-OPT4189816c2e", + "ifs-T639-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", + "ifs-T1279-RegularGaussianN640-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", + "ifs-T20-RegularGaussianN1280-OPT4189816c2e", + "ifs-T20-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T639-RegularGaussianN1280-OPT4189816c2e", + "ifs-T639-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T1279-RegularGaussianN1280-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T20-grid-526e85fea7-OPT4189816c2e", + "ifs-T20-grid-526e85fea7-OPT4189816c2e", + "ifs-T639-grid-526e85fea7-OPT4189816c2e", + "ifs-T639-grid-526e85fea7-OPT4189816c2e", + "ifs-T1279-grid-526e85fea7-OPT4189816c2e", + "ifs-T1279-grid-526e85fea7-OPT4189816c2e", + "ifs-T20-grid-67c6c40d80-OPT4189816c2e", + "ifs-T20-grid-67c6c40d80-OPT4189816c2e", + "ifs-T639-grid-67c6c40d80-OPT4189816c2e", + "ifs-T639-grid-67c6c40d80-OPT4189816c2e", + "ifs-T1279-grid-67c6c40d80-OPT4189816c2e", + "ifs-T1279-grid-67c6c40d80-OPT4189816c2e", + "ifs-T20-grid-aa80a6f660-OPT4189816c2e", + "ifs-T20-grid-aa80a6f660-OPT4189816c2e", + "ifs-T639-grid-aa80a6f660-OPT4189816c2e", + "ifs-T639-grid-aa80a6f660-OPT4189816c2e", + "ifs-T1279-grid-aa80a6f660-OPT4189816c2e", + "ifs-T1279-grid-aa80a6f660-OPT4189816c2e"}; + auto uid = uids.begin(); + + for ( auto& domain : std::vector{GlobalDomain(), RectangularDomain( {-10, 10}, {-20, 20} )} ) { + for ( auto N : {320, 640, 1280} ) { + for ( int T : {20, 639, 1279} ) { + Log::info() << "Case N:" << N << ", T:" << T << ", domain:" << domain << ", UID:'" << *uid << "'" + << std::endl; + + Grid grid1( "F" + std::to_string( N ), domain ); + auto test1 = trans::LegendreCacheCreator( grid1, T, options ).uid(); + ATLAS_DEBUG_VAR( test1 ); + EXPECT( test1 == *uid ); + uid++; + + for ( auto& type : {"N", "O"} ) { + Grid grid2( type + std::to_string( N ), domain ); + auto test2 = trans::LegendreCacheCreator( grid2, T, options ).uid(); + ATLAS_DEBUG_VAR( test2 ); + EXPECT( test2 == *uid ); + } + uid++; + + } + } + } + } +} +#endif + //----------------------------------------------------------------------------- } // namespace test diff --git a/src/tests/trans/test_trans_localcache.cc b/src/tests/trans/test_trans_localcache.cc index 65be88cb7..faa29c814 100644 --- a/src/tests/trans/test_trans_localcache.cc +++ b/src/tests/trans/test_trans_localcache.cc @@ -263,6 +263,43 @@ CASE( "test cache creator in memory" ) { auto trans2 = Trans( cache, grid_global, truncation ); } +CASE( "ATLAS-256: Legendre coefficient expected unique identifiers" ) { + util::Config options; + options.set( option::type( "local" ) ); + options.set( "flt", false ); + + auto uids = { + "local-T20-GaussianN320-OPT4189816c2e", "local-T639-GaussianN320-OPT4189816c2e", + "local-T1279-GaussianN320-OPT4189816c2e", "local-T20-GaussianN640-OPT4189816c2e", + "local-T639-GaussianN640-OPT4189816c2e", "local-T1279-GaussianN640-OPT4189816c2e", + "local-T20-GaussianN1280-OPT4189816c2e", "local-T639-GaussianN1280-OPT4189816c2e", + "local-T1279-GaussianN1280-OPT4189816c2e", "local-T20-grid-526e85fea7-OPT4189816c2e", + "local-T639-grid-526e85fea7-OPT4189816c2e", "local-T1279-grid-526e85fea7-OPT4189816c2e", + "local-T20-grid-67c6c40d80-OPT4189816c2e", "local-T639-grid-67c6c40d80-OPT4189816c2e", + "local-T1279-grid-67c6c40d80-OPT4189816c2e", "local-T20-grid-aa80a6f660-OPT4189816c2e", + "local-T639-grid-aa80a6f660-OPT4189816c2e", "local-T1279-grid-aa80a6f660-OPT4189816c2e" + }; + auto uid = uids.begin(); + + for ( auto& domain : std::vector{GlobalDomain(), RectangularDomain( {-10, 10}, {-20, 20} )} ) { + for ( auto N : {320, 640, 1280} ) { + for ( int T : {20, 639, 1279} ) { + Log::info() << "Case N:" << N << ", T:" << T << ", domain:" << domain << ", UID:'" << *uid << "'" + << std::endl; + + for ( auto& type : {"F", "N", "O"} ) { + Grid grid( type + std::to_string( N ), domain ); + auto test = trans::LegendreCacheCreator( grid, T, options ).uid(); + ATLAS_DEBUG_VAR( test ); + EXPECT( test == *uid ); + } + + uid++; + } + } + } +} + } // namespace test } // namespace atlas From 5c6addc730e0d9bb63e421e270f5e5c69f8c5f2c Mon Sep 17 00:00:00 2001 From: Pedro Maciel Date: Mon, 9 Dec 2019 15:46:11 +0000 Subject: [PATCH 4/7] ATLAS-256, PGEN-274: unit tests for both 'local' and 'ifs' spectral transforms cache file naming (more tests) --- src/tests/trans/test_trans.cc | 127 ++++++++++++++--------- src/tests/trans/test_trans_localcache.cc | 98 +++++++++++++---- 2 files changed, 153 insertions(+), 72 deletions(-) diff --git a/src/tests/trans/test_trans.cc b/src/tests/trans/test_trans.cc index 4ec5cef87..28cadf1a5 100644 --- a/src/tests/trans/test_trans.cc +++ b/src/tests/trans/test_trans.cc @@ -608,64 +608,89 @@ CASE( "ATLAS-256: Legendre coefficient expected unique identifiers" ) { options.set( option::type( "ifs" ) ); options.set( "flt", false ); - auto uids = {"ifs-T20-RegularGaussianN320-OPT4189816c2e", - "ifs-T20-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", - "ifs-T639-RegularGaussianN320-OPT4189816c2e", - "ifs-T639-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", - "ifs-T1279-RegularGaussianN320-OPT4189816c2e", - "ifs-T1279-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", - "ifs-T20-RegularGaussianN640-OPT4189816c2e", - "ifs-T20-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", - "ifs-T639-RegularGaussianN640-OPT4189816c2e", - "ifs-T639-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", - "ifs-T1279-RegularGaussianN640-OPT4189816c2e", - "ifs-T1279-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", - "ifs-T20-RegularGaussianN1280-OPT4189816c2e", - "ifs-T20-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", - "ifs-T639-RegularGaussianN1280-OPT4189816c2e", - "ifs-T639-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", - "ifs-T1279-RegularGaussianN1280-OPT4189816c2e", - "ifs-T1279-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", - "ifs-T20-grid-526e85fea7-OPT4189816c2e", - "ifs-T20-grid-526e85fea7-OPT4189816c2e", - "ifs-T639-grid-526e85fea7-OPT4189816c2e", - "ifs-T639-grid-526e85fea7-OPT4189816c2e", - "ifs-T1279-grid-526e85fea7-OPT4189816c2e", - "ifs-T1279-grid-526e85fea7-OPT4189816c2e", - "ifs-T20-grid-67c6c40d80-OPT4189816c2e", - "ifs-T20-grid-67c6c40d80-OPT4189816c2e", - "ifs-T639-grid-67c6c40d80-OPT4189816c2e", - "ifs-T639-grid-67c6c40d80-OPT4189816c2e", - "ifs-T1279-grid-67c6c40d80-OPT4189816c2e", - "ifs-T1279-grid-67c6c40d80-OPT4189816c2e", - "ifs-T20-grid-aa80a6f660-OPT4189816c2e", - "ifs-T20-grid-aa80a6f660-OPT4189816c2e", - "ifs-T639-grid-aa80a6f660-OPT4189816c2e", - "ifs-T639-grid-aa80a6f660-OPT4189816c2e", - "ifs-T1279-grid-aa80a6f660-OPT4189816c2e", - "ifs-T1279-grid-aa80a6f660-OPT4189816c2e"}; + auto uids = { + "ifs-T20-RegularGaussianN320-OPT4189816c2e", + "ifs-T20-RegularGaussianN640-OPT4189816c2e", + "ifs-T20-RegularGaussianN1280-OPT4189816c2e", + "ifs-T20-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", + "ifs-T20-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", + "ifs-T20-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T20-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", + "ifs-T20-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", + "ifs-T20-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T20-L360x181-OPT4189816c2e", + "ifs-T20-L3600x1801-OPT4189816c2e", + "ifs-T639-RegularGaussianN320-OPT4189816c2e", + "ifs-T639-RegularGaussianN640-OPT4189816c2e", + "ifs-T639-RegularGaussianN1280-OPT4189816c2e", + "ifs-T639-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", + "ifs-T639-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", + "ifs-T639-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T639-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", + "ifs-T639-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", + "ifs-T639-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T639-L360x181-OPT4189816c2e", + "ifs-T639-L3600x1801-OPT4189816c2e", + "ifs-T1279-RegularGaussianN320-OPT4189816c2e", + "ifs-T1279-RegularGaussianN640-OPT4189816c2e", + "ifs-T1279-RegularGaussianN1280-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T1279-L360x181-OPT4189816c2e", + "ifs-T1279-L3600x1801-OPT4189816c2e", + "ifs-T20-grid-526e85fea7-OPT4189816c2e", + "ifs-T20-grid-67c6c40d80-OPT4189816c2e", + "ifs-T20-grid-aa80a6f660-OPT4189816c2e", + "ifs-T20-grid-526e85fea7-OPT4189816c2e", + "ifs-T20-grid-67c6c40d80-OPT4189816c2e", + "ifs-T20-grid-aa80a6f660-OPT4189816c2e", + "ifs-T20-grid-526e85fea7-OPT4189816c2e", + "ifs-T20-grid-67c6c40d80-OPT4189816c2e", + "ifs-T20-grid-aa80a6f660-OPT4189816c2e", + "ifs-T20-grid-95fdf45d93-OPT4189816c2e", + "ifs-T20-grid-12e2d9ff5a-OPT4189816c2e", + "ifs-T639-grid-526e85fea7-OPT4189816c2e", + "ifs-T639-grid-67c6c40d80-OPT4189816c2e", + "ifs-T639-grid-aa80a6f660-OPT4189816c2e", + "ifs-T639-grid-526e85fea7-OPT4189816c2e", + "ifs-T639-grid-67c6c40d80-OPT4189816c2e", + "ifs-T639-grid-aa80a6f660-OPT4189816c2e", + "ifs-T639-grid-526e85fea7-OPT4189816c2e", + "ifs-T639-grid-67c6c40d80-OPT4189816c2e", + "ifs-T639-grid-aa80a6f660-OPT4189816c2e", + "ifs-T639-grid-95fdf45d93-OPT4189816c2e", + "ifs-T639-grid-12e2d9ff5a-OPT4189816c2e", + "ifs-T1279-grid-526e85fea7-OPT4189816c2e", + "ifs-T1279-grid-67c6c40d80-OPT4189816c2e", + "ifs-T1279-grid-aa80a6f660-OPT4189816c2e", + "ifs-T1279-grid-526e85fea7-OPT4189816c2e", + "ifs-T1279-grid-67c6c40d80-OPT4189816c2e", + "ifs-T1279-grid-aa80a6f660-OPT4189816c2e", + "ifs-T1279-grid-526e85fea7-OPT4189816c2e", + "ifs-T1279-grid-67c6c40d80-OPT4189816c2e", + "ifs-T1279-grid-aa80a6f660-OPT4189816c2e", + "ifs-T1279-grid-95fdf45d93-OPT4189816c2e", + "ifs-T1279-grid-12e2d9ff5a-OPT4189816c2e", + }; auto uid = uids.begin(); for ( auto& domain : std::vector{GlobalDomain(), RectangularDomain( {-10, 10}, {-20, 20} )} ) { - for ( auto N : {320, 640, 1280} ) { - for ( int T : {20, 639, 1279} ) { - Log::info() << "Case N:" << N << ", T:" << T << ", domain:" << domain << ", UID:'" << *uid << "'" + for ( int T : {20, 639, 1279} ) { + for ( auto name : + {"F320", "F640", "F1280", "N320", "N640", "N1280", "O320", "O640", "O1280", "L90", "L900"} ) { + Log::info() << "Case name:" << name << ", T:" << T << ", domain:" << domain << ", UID:'" << *uid << "'" << std::endl; - Grid grid1( "F" + std::to_string( N ), domain ); - auto test1 = trans::LegendreCacheCreator( grid1, T, options ).uid(); - ATLAS_DEBUG_VAR( test1 ); - EXPECT( test1 == *uid ); - uid++; + Grid grid( name, domain ); + auto test = trans::LegendreCacheCreator( grid, T, options ).uid(); + ATLAS_DEBUG_VAR( test ); + EXPECT( test == *uid ); - for ( auto& type : {"N", "O"} ) { - Grid grid2( type + std::to_string( N ), domain ); - auto test2 = trans::LegendreCacheCreator( grid2, T, options ).uid(); - ATLAS_DEBUG_VAR( test2 ); - EXPECT( test2 == *uid ); - } uid++; - } } } diff --git a/src/tests/trans/test_trans_localcache.cc b/src/tests/trans/test_trans_localcache.cc index faa29c814..3c1a09005 100644 --- a/src/tests/trans/test_trans_localcache.cc +++ b/src/tests/trans/test_trans_localcache.cc @@ -269,30 +269,86 @@ CASE( "ATLAS-256: Legendre coefficient expected unique identifiers" ) { options.set( "flt", false ); auto uids = { - "local-T20-GaussianN320-OPT4189816c2e", "local-T639-GaussianN320-OPT4189816c2e", - "local-T1279-GaussianN320-OPT4189816c2e", "local-T20-GaussianN640-OPT4189816c2e", - "local-T639-GaussianN640-OPT4189816c2e", "local-T1279-GaussianN640-OPT4189816c2e", - "local-T20-GaussianN1280-OPT4189816c2e", "local-T639-GaussianN1280-OPT4189816c2e", - "local-T1279-GaussianN1280-OPT4189816c2e", "local-T20-grid-526e85fea7-OPT4189816c2e", - "local-T639-grid-526e85fea7-OPT4189816c2e", "local-T1279-grid-526e85fea7-OPT4189816c2e", - "local-T20-grid-67c6c40d80-OPT4189816c2e", "local-T639-grid-67c6c40d80-OPT4189816c2e", - "local-T1279-grid-67c6c40d80-OPT4189816c2e", "local-T20-grid-aa80a6f660-OPT4189816c2e", - "local-T639-grid-aa80a6f660-OPT4189816c2e", "local-T1279-grid-aa80a6f660-OPT4189816c2e" + "local-T20-GaussianN320-OPT4189816c2e", + "local-T20-GaussianN640-OPT4189816c2e", + "local-T20-GaussianN1280-OPT4189816c2e", + "local-T20-GaussianN320-OPT4189816c2e", + "local-T20-GaussianN640-OPT4189816c2e", + "local-T20-GaussianN1280-OPT4189816c2e", + "local-T20-GaussianN320-OPT4189816c2e", + "local-T20-GaussianN640-OPT4189816c2e", + "local-T20-GaussianN1280-OPT4189816c2e", + "local-T20-L-ny181-OPT4189816c2e", + "local-T20-L-ny1801-OPT4189816c2e", + "local-T639-GaussianN320-OPT4189816c2e", + "local-T639-GaussianN640-OPT4189816c2e", + "local-T639-GaussianN1280-OPT4189816c2e", + "local-T639-GaussianN320-OPT4189816c2e", + "local-T639-GaussianN640-OPT4189816c2e", + "local-T639-GaussianN1280-OPT4189816c2e", + "local-T639-GaussianN320-OPT4189816c2e", + "local-T639-GaussianN640-OPT4189816c2e", + "local-T639-GaussianN1280-OPT4189816c2e", + "local-T639-L-ny181-OPT4189816c2e", + "local-T639-L-ny1801-OPT4189816c2e", + "local-T1279-GaussianN320-OPT4189816c2e", + "local-T1279-GaussianN640-OPT4189816c2e", + "local-T1279-GaussianN1280-OPT4189816c2e", + "local-T1279-GaussianN320-OPT4189816c2e", + "local-T1279-GaussianN640-OPT4189816c2e", + "local-T1279-GaussianN1280-OPT4189816c2e", + "local-T1279-GaussianN320-OPT4189816c2e", + "local-T1279-GaussianN640-OPT4189816c2e", + "local-T1279-GaussianN1280-OPT4189816c2e", + "local-T1279-L-ny181-OPT4189816c2e", + "local-T1279-L-ny1801-OPT4189816c2e", + "local-T20-grid-526e85fea7-OPT4189816c2e", + "local-T20-grid-67c6c40d80-OPT4189816c2e", + "local-T20-grid-aa80a6f660-OPT4189816c2e", + "local-T20-grid-526e85fea7-OPT4189816c2e", + "local-T20-grid-67c6c40d80-OPT4189816c2e", + "local-T20-grid-aa80a6f660-OPT4189816c2e", + "local-T20-grid-526e85fea7-OPT4189816c2e", + "local-T20-grid-67c6c40d80-OPT4189816c2e", + "local-T20-grid-aa80a6f660-OPT4189816c2e", + "local-T20-grid-95fdf45d93-OPT4189816c2e", + "local-T20-grid-12e2d9ff5a-OPT4189816c2e", + "local-T639-grid-526e85fea7-OPT4189816c2e", + "local-T639-grid-67c6c40d80-OPT4189816c2e", + "local-T639-grid-aa80a6f660-OPT4189816c2e", + "local-T639-grid-526e85fea7-OPT4189816c2e", + "local-T639-grid-67c6c40d80-OPT4189816c2e", + "local-T639-grid-aa80a6f660-OPT4189816c2e", + "local-T639-grid-526e85fea7-OPT4189816c2e", + "local-T639-grid-67c6c40d80-OPT4189816c2e", + "local-T639-grid-aa80a6f660-OPT4189816c2e", + "local-T639-grid-95fdf45d93-OPT4189816c2e", + "local-T639-grid-12e2d9ff5a-OPT4189816c2e", + "local-T1279-grid-526e85fea7-OPT4189816c2e", + "local-T1279-grid-67c6c40d80-OPT4189816c2e", + "local-T1279-grid-aa80a6f660-OPT4189816c2e", + "local-T1279-grid-526e85fea7-OPT4189816c2e", + "local-T1279-grid-67c6c40d80-OPT4189816c2e", + "local-T1279-grid-aa80a6f660-OPT4189816c2e", + "local-T1279-grid-526e85fea7-OPT4189816c2e", + "local-T1279-grid-67c6c40d80-OPT4189816c2e", + "local-T1279-grid-aa80a6f660-OPT4189816c2e", + "local-T1279-grid-95fdf45d93-OPT4189816c2e", + "local-T1279-grid-12e2d9ff5a-OPT4189816c2e", }; - auto uid = uids.begin(); + auto uid = uids.begin(); for ( auto& domain : std::vector{GlobalDomain(), RectangularDomain( {-10, 10}, {-20, 20} )} ) { - for ( auto N : {320, 640, 1280} ) { - for ( int T : {20, 639, 1279} ) { - Log::info() << "Case N:" << N << ", T:" << T << ", domain:" << domain << ", UID:'" << *uid << "'" - << std::endl; - - for ( auto& type : {"F", "N", "O"} ) { - Grid grid( type + std::to_string( N ), domain ); - auto test = trans::LegendreCacheCreator( grid, T, options ).uid(); - ATLAS_DEBUG_VAR( test ); - EXPECT( test == *uid ); - } + for ( int T : {20, 639, 1279} ) { + for ( auto name : + {"F320", "F640", "F1280", "N320", "N640", "N1280", "O320", "O640", "O1280", "L90", "L900"} ) { + Log::info() << "Case name:'" << name << "', T:" << T << ", domain:" << domain << ", UID:'" << *uid + << "'" << std::endl; + + Grid grid( name, domain ); + auto test = trans::LegendreCacheCreator( grid, T, options ).uid(); + ATLAS_DEBUG_VAR( test ); + EXPECT( test == *uid ); uid++; } From e9a1be46d742a35a6bc2c67abacca247b2a25949 Mon Sep 17 00:00:00 2001 From: Pedro Maciel Date: Mon, 9 Dec 2019 16:26:04 +0000 Subject: [PATCH 5/7] ATLAS-255: regression test fix --- src/atlas/grid/detail/grid/Structured.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/atlas/grid/detail/grid/Structured.cc b/src/atlas/grid/detail/grid/Structured.cc index b9d2b4ec1..3c7cb5ceb 100644 --- a/src/atlas/grid/detail/grid/Structured.cc +++ b/src/atlas/grid/detail/grid/Structured.cc @@ -357,7 +357,7 @@ class Normalise { } // namespace void Structured::crop( const Domain& dom ) { - if ( !dom || dom.global() ) { + if ( !dom ) { domain_ = RectangularDomain( {xspace_.min(), xspace_.max()}, {yspace_.min(), yspace_.max()}, projection_.units() ); return; @@ -387,6 +387,8 @@ void Structured::crop( const Domain& dom ) { ATLAS_ASSERT( jmax >= jmin ); idx_t cropped_ny = jmax - jmin + 1; + ATLAS_ASSERT( cropped_ny <= ny() ); + std::vector cropped_y( y_.begin() + jmin, y_.begin() + jmin + cropped_ny ); std::vector cropped_dx( dx_.begin() + jmin, dx_.begin() + jmin + cropped_ny ); @@ -430,8 +432,6 @@ void Structured::crop( const Domain& dom ) { } idx_t cropped_npts = std::accumulate( cropped_nx.begin(), cropped_nx.end(), idx_t{0} ); - Spacing cropped_yspace( new spacing::CustomSpacing( cropped_ny, cropped_y.data(), {cropped_ymin, cropped_ymax} ) ); - std::vector cropped_xspacings( cropped_ny ); for ( idx_t j = 0; j < cropped_ny; ++j ) { cropped_xspacings[j] = new spacing::LinearSpacing( cropped_xmin[j], cropped_xmax[j], cropped_nx[j], endpoint ); @@ -449,7 +449,11 @@ void Structured::crop( const Domain& dom ) { } // Modify grid - yspace_ = cropped_yspace; + if (ny() != cropped_ny) { + // keep specialised spacing (Gaussian, Linear, ...) unless cropping happens + yspace_ = new spacing::CustomSpacing( cropped_ny, cropped_y.data(), {cropped_ymin, cropped_ymax} ); + } + xspace_ = cropped_xspace; xmin_ = cropped_xmin; xmax_ = cropped_xmax; From 9bc67f5b56bf666e85ed6f1503cd491deca0d0aa Mon Sep 17 00:00:00 2001 From: Pedro Maciel Date: Wed, 18 Dec 2019 18:22:20 +0000 Subject: [PATCH 6/7] ATLAS-256, PGEN-274: fix different double array hashes and west=0 (different cache files, requires Legendre cache version increment) --- .../trans/ifs/LegendreCacheCreatorIFS.cc | 37 ++++-- .../trans/local/LegendreCacheCreatorLocal.cc | 14 ++- src/tests/trans/test_trans.cc | 111 ++++++++---------- src/tests/trans/test_trans_localcache.cc | 66 +++++------ 4 files changed, 122 insertions(+), 106 deletions(-) diff --git a/src/atlas/trans/ifs/LegendreCacheCreatorIFS.cc b/src/atlas/trans/ifs/LegendreCacheCreatorIFS.cc index df6774af4..1df42da6b 100644 --- a/src/atlas/trans/ifs/LegendreCacheCreatorIFS.cc +++ b/src/atlas/trans/ifs/LegendreCacheCreatorIFS.cc @@ -9,12 +9,17 @@ */ #include "atlas/trans/ifs/LegendreCacheCreatorIFS.h" + +#include #include #include + +#include "eckit/utils/MD5.h" + #include "atlas/grid.h" #include "atlas/option.h" +#include "atlas/runtime/Exception.h" #include "atlas/trans/Trans.h" -#include "eckit/utils/MD5.h" namespace atlas { namespace trans { @@ -32,9 +37,12 @@ std::string truncate( const std::string& str ) { std::string hash( const Grid& grid ) { eckit::MD5 h; - if ( StructuredGrid( grid ) && not grid.projection() ) { - auto g = StructuredGrid( grid ); - h.add( g.y().data(), g.y().size() * sizeof( double ) ); + + StructuredGrid structured( grid ); + if ( structured && not grid.projection() ) { + for ( auto& y : structured.y() ) { + h.add( std::lround( y * 1.e8 ) ); + } } else { grid.hash( h ); @@ -42,6 +50,19 @@ std::string hash( const Grid& grid ) { return truncate( h.digest() ); } +std::string hash_pl( const Grid& grid ) { + eckit::MD5 h; + + StructuredGrid structured( grid ); + ATLAS_ASSERT( structured ); + + for ( auto& n : structured.nx() ) { + h.add( long( n ) ); + } + + return truncate( h.digest() ); +} + std::string hash( const eckit::Configuration& config ) { eckit::MD5 h; @@ -57,13 +78,13 @@ std::string LegendreCacheCreatorIFS::uid() const { if ( unique_identifier_.empty() ) { std::ostringstream stream; stream << "ifs-T" << truncation_ << "-"; - if ( GaussianGrid( grid_ ) ) { + GaussianGrid gaussian( grid_ ); + if ( gaussian ) { if ( RegularGaussianGrid( grid_ ) ) { - stream << "RegularGaussianN" << GaussianGrid( grid_ ).N(); + stream << "RegularGaussianN" << gaussian.N(); } else { - stream << "ReducedGaussianN" << GaussianGrid( grid_ ).N() << "-PL"; - stream << hash( grid_ ); + stream << "ReducedGaussianN" << gaussian.N() << "-PL" << hash_pl( grid_ ); } } else if ( RegularLonLatGrid( grid_ ) ) { diff --git a/src/atlas/trans/local/LegendreCacheCreatorLocal.cc b/src/atlas/trans/local/LegendreCacheCreatorLocal.cc index 18e10fe37..5d38b22ae 100644 --- a/src/atlas/trans/local/LegendreCacheCreatorLocal.cc +++ b/src/atlas/trans/local/LegendreCacheCreatorLocal.cc @@ -10,6 +10,7 @@ #include "atlas/trans/local/LegendreCacheCreatorLocal.h" +#include #include #include @@ -38,9 +39,12 @@ std::string truncate( const std::string& str ) { std::string hash( const Grid& grid ) { eckit::MD5 h; - if ( StructuredGrid( grid ) && not grid.projection() ) { - auto g = StructuredGrid( grid ); - h.add( g.y().data(), g.y().size() * sizeof( double ) ); + + StructuredGrid structured( grid ); + if ( structured && not grid.projection() ) { + for ( auto& y : structured.y() ) { + h.add( std::lround( y * 1.e8 ) ); + } } else { grid.hash( h ); @@ -71,8 +75,8 @@ std::string LegendreCacheCreatorLocal::uid() const { if ( grid_.projection() ) { give_up(); } - else if ( GaussianGrid( grid_ ) && eckit::types::is_approximately_equal( structured.xspace().min(), 0. ) ) { - // Same cache for any global Gaussian grid, starting at Greenwich + else if ( GaussianGrid( grid_ ) ) { + // Same cache for any global Gaussian grid stream << "GaussianN" << GaussianGrid( grid_ ).N(); } else if ( RegularLonLatGrid( grid_ ) ) { diff --git a/src/tests/trans/test_trans.cc b/src/tests/trans/test_trans.cc index 28cadf1a5..8ccdce4a2 100644 --- a/src/tests/trans/test_trans.cc +++ b/src/tests/trans/test_trans.cc @@ -105,8 +105,6 @@ void read_rspecg( Field spec ) { //----------------------------------------------------------------------------- -#if 1 - CASE( "test_trans_distribution_matches_atlas" ) { EXPECT( grid::Partitioner::exists( "trans" ) ); @@ -196,9 +194,6 @@ CASE( "test_write_read_cache" ) { } #endif -#endif - -#if 1 CASE( "test_distspec" ) { trans::TransIFS trans( Grid( "F80" ), 159 ); Log::info() << "Trans initialized" << std::endl; @@ -229,8 +224,6 @@ CASE( "test_distspec" ) { Log::info() << "end test_distspec" << std::endl; } -#endif - CASE( "test_distspec_speconly" ) { functionspace::Spectral fs( 159 ); int nfld = 2; @@ -264,7 +257,6 @@ CASE( "test_distspec_speconly" ) { Log::info() << "end test_distspec_only" << std::endl; } -#if 1 CASE( "test_distribution" ) { Grid g( "O80" ); @@ -599,7 +591,6 @@ CASE( "test_trans_VorDivToUV" ) { } } } -#endif #ifdef TRANS_HAVE_IO CASE( "ATLAS-256: Legendre coefficient expected unique identifiers" ) { @@ -612,69 +603,69 @@ CASE( "ATLAS-256: Legendre coefficient expected unique identifiers" ) { "ifs-T20-RegularGaussianN320-OPT4189816c2e", "ifs-T20-RegularGaussianN640-OPT4189816c2e", "ifs-T20-RegularGaussianN1280-OPT4189816c2e", - "ifs-T20-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", - "ifs-T20-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", - "ifs-T20-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", - "ifs-T20-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", - "ifs-T20-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", - "ifs-T20-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T20-ReducedGaussianN320-PL52955330f8-OPT4189816c2e", + "ifs-T20-ReducedGaussianN640-PL296ba3f6fb-OPT4189816c2e", + "ifs-T20-ReducedGaussianN1280-PL9e14f63837-OPT4189816c2e", + "ifs-T20-ReducedGaussianN320-PL440b952c43-OPT4189816c2e", + "ifs-T20-ReducedGaussianN640-PLcbba2659c1-OPT4189816c2e", + "ifs-T20-ReducedGaussianN1280-PL8eadc35e89-OPT4189816c2e", "ifs-T20-L360x181-OPT4189816c2e", "ifs-T20-L3600x1801-OPT4189816c2e", "ifs-T639-RegularGaussianN320-OPT4189816c2e", "ifs-T639-RegularGaussianN640-OPT4189816c2e", "ifs-T639-RegularGaussianN1280-OPT4189816c2e", - "ifs-T639-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", - "ifs-T639-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", - "ifs-T639-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", - "ifs-T639-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", - "ifs-T639-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", - "ifs-T639-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T639-ReducedGaussianN320-PL52955330f8-OPT4189816c2e", + "ifs-T639-ReducedGaussianN640-PL296ba3f6fb-OPT4189816c2e", + "ifs-T639-ReducedGaussianN1280-PL9e14f63837-OPT4189816c2e", + "ifs-T639-ReducedGaussianN320-PL440b952c43-OPT4189816c2e", + "ifs-T639-ReducedGaussianN640-PLcbba2659c1-OPT4189816c2e", + "ifs-T639-ReducedGaussianN1280-PL8eadc35e89-OPT4189816c2e", "ifs-T639-L360x181-OPT4189816c2e", "ifs-T639-L3600x1801-OPT4189816c2e", "ifs-T1279-RegularGaussianN320-OPT4189816c2e", "ifs-T1279-RegularGaussianN640-OPT4189816c2e", "ifs-T1279-RegularGaussianN1280-OPT4189816c2e", - "ifs-T1279-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", - "ifs-T1279-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", - "ifs-T1279-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", - "ifs-T1279-ReducedGaussianN320-PL41ba9c00c8-OPT4189816c2e", - "ifs-T1279-ReducedGaussianN640-PL4203da28f1-OPT4189816c2e", - "ifs-T1279-ReducedGaussianN1280-PL2146987264-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN320-PL52955330f8-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN640-PL296ba3f6fb-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN1280-PL9e14f63837-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN320-PL440b952c43-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN640-PLcbba2659c1-OPT4189816c2e", + "ifs-T1279-ReducedGaussianN1280-PL8eadc35e89-OPT4189816c2e", "ifs-T1279-L360x181-OPT4189816c2e", "ifs-T1279-L3600x1801-OPT4189816c2e", - "ifs-T20-grid-526e85fea7-OPT4189816c2e", - "ifs-T20-grid-67c6c40d80-OPT4189816c2e", - "ifs-T20-grid-aa80a6f660-OPT4189816c2e", - "ifs-T20-grid-526e85fea7-OPT4189816c2e", - "ifs-T20-grid-67c6c40d80-OPT4189816c2e", - "ifs-T20-grid-aa80a6f660-OPT4189816c2e", - "ifs-T20-grid-526e85fea7-OPT4189816c2e", - "ifs-T20-grid-67c6c40d80-OPT4189816c2e", - "ifs-T20-grid-aa80a6f660-OPT4189816c2e", - "ifs-T20-grid-95fdf45d93-OPT4189816c2e", - "ifs-T20-grid-12e2d9ff5a-OPT4189816c2e", - "ifs-T639-grid-526e85fea7-OPT4189816c2e", - "ifs-T639-grid-67c6c40d80-OPT4189816c2e", - "ifs-T639-grid-aa80a6f660-OPT4189816c2e", - "ifs-T639-grid-526e85fea7-OPT4189816c2e", - "ifs-T639-grid-67c6c40d80-OPT4189816c2e", - "ifs-T639-grid-aa80a6f660-OPT4189816c2e", - "ifs-T639-grid-526e85fea7-OPT4189816c2e", - "ifs-T639-grid-67c6c40d80-OPT4189816c2e", - "ifs-T639-grid-aa80a6f660-OPT4189816c2e", - "ifs-T639-grid-95fdf45d93-OPT4189816c2e", - "ifs-T639-grid-12e2d9ff5a-OPT4189816c2e", - "ifs-T1279-grid-526e85fea7-OPT4189816c2e", - "ifs-T1279-grid-67c6c40d80-OPT4189816c2e", - "ifs-T1279-grid-aa80a6f660-OPT4189816c2e", - "ifs-T1279-grid-526e85fea7-OPT4189816c2e", - "ifs-T1279-grid-67c6c40d80-OPT4189816c2e", - "ifs-T1279-grid-aa80a6f660-OPT4189816c2e", - "ifs-T1279-grid-526e85fea7-OPT4189816c2e", - "ifs-T1279-grid-67c6c40d80-OPT4189816c2e", - "ifs-T1279-grid-aa80a6f660-OPT4189816c2e", - "ifs-T1279-grid-95fdf45d93-OPT4189816c2e", - "ifs-T1279-grid-12e2d9ff5a-OPT4189816c2e", + "ifs-T20-grid-800ac12540-OPT4189816c2e", + "ifs-T20-grid-0915e0f040-OPT4189816c2e", + "ifs-T20-grid-7c400822f0-OPT4189816c2e", + "ifs-T20-grid-800ac12540-OPT4189816c2e", + "ifs-T20-grid-0915e0f040-OPT4189816c2e", + "ifs-T20-grid-7c400822f0-OPT4189816c2e", + "ifs-T20-grid-800ac12540-OPT4189816c2e", + "ifs-T20-grid-0915e0f040-OPT4189816c2e", + "ifs-T20-grid-7c400822f0-OPT4189816c2e", + "ifs-T20-grid-7824deccdf-OPT4189816c2e", + "ifs-T20-grid-7d1771559e-OPT4189816c2e", + "ifs-T639-grid-800ac12540-OPT4189816c2e", + "ifs-T639-grid-0915e0f040-OPT4189816c2e", + "ifs-T639-grid-7c400822f0-OPT4189816c2e", + "ifs-T639-grid-800ac12540-OPT4189816c2e", + "ifs-T639-grid-0915e0f040-OPT4189816c2e", + "ifs-T639-grid-7c400822f0-OPT4189816c2e", + "ifs-T639-grid-800ac12540-OPT4189816c2e", + "ifs-T639-grid-0915e0f040-OPT4189816c2e", + "ifs-T639-grid-7c400822f0-OPT4189816c2e", + "ifs-T639-grid-7824deccdf-OPT4189816c2e", + "ifs-T639-grid-7d1771559e-OPT4189816c2e", + "ifs-T1279-grid-800ac12540-OPT4189816c2e", + "ifs-T1279-grid-0915e0f040-OPT4189816c2e", + "ifs-T1279-grid-7c400822f0-OPT4189816c2e", + "ifs-T1279-grid-800ac12540-OPT4189816c2e", + "ifs-T1279-grid-0915e0f040-OPT4189816c2e", + "ifs-T1279-grid-7c400822f0-OPT4189816c2e", + "ifs-T1279-grid-800ac12540-OPT4189816c2e", + "ifs-T1279-grid-0915e0f040-OPT4189816c2e", + "ifs-T1279-grid-7c400822f0-OPT4189816c2e", + "ifs-T1279-grid-7824deccdf-OPT4189816c2e", + "ifs-T1279-grid-7d1771559e-OPT4189816c2e", }; auto uid = uids.begin(); diff --git a/src/tests/trans/test_trans_localcache.cc b/src/tests/trans/test_trans_localcache.cc index 3c1a09005..4f046d148 100644 --- a/src/tests/trans/test_trans_localcache.cc +++ b/src/tests/trans/test_trans_localcache.cc @@ -302,39 +302,39 @@ CASE( "ATLAS-256: Legendre coefficient expected unique identifiers" ) { "local-T1279-GaussianN1280-OPT4189816c2e", "local-T1279-L-ny181-OPT4189816c2e", "local-T1279-L-ny1801-OPT4189816c2e", - "local-T20-grid-526e85fea7-OPT4189816c2e", - "local-T20-grid-67c6c40d80-OPT4189816c2e", - "local-T20-grid-aa80a6f660-OPT4189816c2e", - "local-T20-grid-526e85fea7-OPT4189816c2e", - "local-T20-grid-67c6c40d80-OPT4189816c2e", - "local-T20-grid-aa80a6f660-OPT4189816c2e", - "local-T20-grid-526e85fea7-OPT4189816c2e", - "local-T20-grid-67c6c40d80-OPT4189816c2e", - "local-T20-grid-aa80a6f660-OPT4189816c2e", - "local-T20-grid-95fdf45d93-OPT4189816c2e", - "local-T20-grid-12e2d9ff5a-OPT4189816c2e", - "local-T639-grid-526e85fea7-OPT4189816c2e", - "local-T639-grid-67c6c40d80-OPT4189816c2e", - "local-T639-grid-aa80a6f660-OPT4189816c2e", - "local-T639-grid-526e85fea7-OPT4189816c2e", - "local-T639-grid-67c6c40d80-OPT4189816c2e", - "local-T639-grid-aa80a6f660-OPT4189816c2e", - "local-T639-grid-526e85fea7-OPT4189816c2e", - "local-T639-grid-67c6c40d80-OPT4189816c2e", - "local-T639-grid-aa80a6f660-OPT4189816c2e", - "local-T639-grid-95fdf45d93-OPT4189816c2e", - "local-T639-grid-12e2d9ff5a-OPT4189816c2e", - "local-T1279-grid-526e85fea7-OPT4189816c2e", - "local-T1279-grid-67c6c40d80-OPT4189816c2e", - "local-T1279-grid-aa80a6f660-OPT4189816c2e", - "local-T1279-grid-526e85fea7-OPT4189816c2e", - "local-T1279-grid-67c6c40d80-OPT4189816c2e", - "local-T1279-grid-aa80a6f660-OPT4189816c2e", - "local-T1279-grid-526e85fea7-OPT4189816c2e", - "local-T1279-grid-67c6c40d80-OPT4189816c2e", - "local-T1279-grid-aa80a6f660-OPT4189816c2e", - "local-T1279-grid-95fdf45d93-OPT4189816c2e", - "local-T1279-grid-12e2d9ff5a-OPT4189816c2e", + "local-T20-grid-800ac12540-OPT4189816c2e", + "local-T20-grid-0915e0f040-OPT4189816c2e", + "local-T20-grid-7c400822f0-OPT4189816c2e", + "local-T20-grid-800ac12540-OPT4189816c2e", + "local-T20-grid-0915e0f040-OPT4189816c2e", + "local-T20-grid-7c400822f0-OPT4189816c2e", + "local-T20-grid-800ac12540-OPT4189816c2e", + "local-T20-grid-0915e0f040-OPT4189816c2e", + "local-T20-grid-7c400822f0-OPT4189816c2e", + "local-T20-grid-7824deccdf-OPT4189816c2e", + "local-T20-grid-7d1771559e-OPT4189816c2e", + "local-T639-grid-800ac12540-OPT4189816c2e", + "local-T639-grid-0915e0f040-OPT4189816c2e", + "local-T639-grid-7c400822f0-OPT4189816c2e", + "local-T639-grid-800ac12540-OPT4189816c2e", + "local-T639-grid-0915e0f040-OPT4189816c2e", + "local-T639-grid-7c400822f0-OPT4189816c2e", + "local-T639-grid-800ac12540-OPT4189816c2e", + "local-T639-grid-0915e0f040-OPT4189816c2e", + "local-T639-grid-7c400822f0-OPT4189816c2e", + "local-T639-grid-7824deccdf-OPT4189816c2e", + "local-T639-grid-7d1771559e-OPT4189816c2e", + "local-T1279-grid-800ac12540-OPT4189816c2e", + "local-T1279-grid-0915e0f040-OPT4189816c2e", + "local-T1279-grid-7c400822f0-OPT4189816c2e", + "local-T1279-grid-800ac12540-OPT4189816c2e", + "local-T1279-grid-0915e0f040-OPT4189816c2e", + "local-T1279-grid-7c400822f0-OPT4189816c2e", + "local-T1279-grid-800ac12540-OPT4189816c2e", + "local-T1279-grid-0915e0f040-OPT4189816c2e", + "local-T1279-grid-7c400822f0-OPT4189816c2e", + "local-T1279-grid-7824deccdf-OPT4189816c2e", + "local-T1279-grid-7d1771559e-OPT4189816c2e", }; auto uid = uids.begin(); From 69a5c1f734fb56b89e8b29fdf1255d1f71cc6771 Mon Sep 17 00:00:00 2001 From: Willem Deconinck Date: Tue, 17 Dec 2019 17:15:43 +0000 Subject: [PATCH 7/7] Version 0.19.1 --- CHANGELOG.md | 5 +++++ VERSION.cmake | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8553fdca..05238b0b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html ## [Unreleased] +## [0.19.1] - 2019-12-19 +### Fixed +- Keep Gaussian identity of a Gaussian grid if a given domain does not crop any latitudes +- Fix naming for LegendreCache, to be more specific, and platform independent + ## [0.19.0] - 2019-10-01 ### Fixed - Lambert ( conformal conic ) projection xy coordinates are now corrected diff --git a/VERSION.cmake b/VERSION.cmake index 412631bad..8d0bf1a92 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -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.19.0" ) +set ( ${PROJECT_NAME}_VERSION_STR "0.19.1" )