Skip to content

Commit

Permalink
Feature/update atlas 0.38.1 (#107)
Browse files Browse the repository at this point in the history
* test changes for atlas 0.38.1

* specify minimum atlas version
  • Loading branch information
twsearle authored Aug 29, 2024
1 parent 0f16f83 commit 02e0994
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [develop]
env:
REGISTRY: ghcr.io
IMAGE_NAME: twsearle/orca-jedi/ci-almalinux9:v1.2.0
IMAGE_NAME: twsearle/orca-jedi/ci-almalinux9:v1.3.0
jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ecbuild_debug( " NetCDF_FEATURES: [${NetCDF_FEATURES}]" )
find_package( eckit 1.18 COMPONENTS LZ4 REQUIRED )
ecbuild_debug( " eckit_FEATURES : [${eckit_FEATURES}]" )

find_package( atlas 0.29 REQUIRED )
find_package( atlas 0.38.1 REQUIRED )
ecbuild_debug( " atlas_FEATURES: [${atlas_FEATURES}]" )

find_package( atlas-orca REQUIRED )
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.3.0
2 changes: 1 addition & 1 deletion ci/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ecbuild -S "${HERE}"
make -j "${NPROC}"

env OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \
ATLAS_TRACE=1 ATLAS_DEBUG=1 \
OOPS_TRACE=1 OOPS_DEBUG=1 \
LD_LIBRARY_PATH="${HERE}/lib:${LD_LIBRARY_PATH}" \
ATLAS_DATA_PATH="${HERE}/atlas-data" \
ctest -j "${NPROC}" -V --output-on-failure --test-dir "./orca-jedi"
Expand Down
9 changes: 5 additions & 4 deletions src/orca-jedi/geometry/Geometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ Geometry::Geometry(const eckit::Configuration & config,
grid_ = construct_grid_from_name(params_.gridName.value());

int64_t halo = params_.sourceMeshHalo.value();
if ( ( (params_.partitioner.value() == "serial") || (comm.size() == 1) )
std::string partitioner_name = params_.partitioner.value();
if ( ( (partitioner_name == "serial") || (comm.size() == 1) )
&& (halo > 0) ) {
halo = 0;
oops::Log::info() << "Warning: forcing halo = 0"
partitioner_name = "serial";
oops::Log::info() << "Warning: forcing halo = 0 and serial partitioner"
<< " as settings imply all processors have all data" << std::endl;
}
auto meshgen_config = grid_.meshgenerator()
Expand All @@ -99,8 +101,7 @@ Geometry::Geometry(const eckit::Configuration & config,
atlas::MeshGenerator meshgen(meshgen_config);
log_status();
auto partitioner_config = grid_.partitioner();
partitioner_config.set("type",
params_.partitioner.value());
partitioner_config.set("type", partitioner_name);
partitioner_ = atlas::grid::Partitioner(partitioner_config);
log_status();
mesh_ = meshgen.generate(grid_, partitioner_);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ecbuild_add_test( TARGET test_orcamodel_hofx_ssh_parallel_checkerboard
ARGS testinput/hofx_nc_ssh_checkerboard.yaml
COMMAND orcamodel_hofx.x )

# Disabled until halos are available from atlas-orca
# Requires atlas-orca halos > 0 change (https://github.com/ecmwf/atlas-orca/pull/20)
#ecbuild_add_test( TARGET test_orcamodel_hofx_ssh_parallel_eorca025
# OMP 1
# MPI 2
Expand Down
2 changes: 0 additions & 2 deletions src/tests/orca-jedi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include_directories( ${PROJECT_SOURCE_DIR}/src )

#target_link_libraries( meara_test_nemo_feedback NetCDF::NetCDF_CXX )

ecbuild_add_test( TARGET test_orcajedi_nemo_io_field_reader.x
SOURCES test_nemo_io_field_reader.cc
LIBS orcamodel )
Expand Down
6 changes: 3 additions & 3 deletions src/tests/orca-jedi/test_interpolator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ CASE("test interpolator") {
oops::Variable{"sea_surface_foundation_temperature"}}};
settings_map["ORCA2_T"].surf_values = std::vector<double>{
1, missing_value, 0,
18.4888916016, missing_value, 18.1592999503};
18.4888877869, missing_value, 18.1592998505};

settings_map["ORCA2_T"].vol_vars = oops::Variables{
{oops::Variable{"sea_water_potential_temperature"}}};
settings_map["ORCA2_T"].vol_values = std::vector<double>{
18.4888916016, missing_value, 18.1592999503,
17.9419364929, missing_value, 17.75000288,
18.4888877869, missing_value, 18.1592998505,
18 , missing_value, 17.7500019073,
missing_value, missing_value, missing_value};
}

Expand Down
10 changes: 5 additions & 5 deletions src/tests/testoutput/test_hofx3d_nc_potm.ref
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Test : State:
Test : Model state valid at time: 2021-06-30T00:00:00Z
Test : 3 variables: sea_water_potential_temperature, depthBelowWaterSurface, sea_water_potential_temperature_background_error
Test : State:
Test : Model state valid at time: 2021-06-30T00:00:00Z
Test : 3 variables: sea_water_potential_temperature, sea_water_potential_temperature_background_error, depth
Test : atlas field norms:
Test : sea_water_potential_temperature: 9.73262e-02
Test : sea_water_potential_temperature_background_error: 3.54309e-04
Test : depthBelowWaterSurface: 2.05581e-01
Test : depth: 2.05581e-01

Test : H(x):
Test : H(x):
Test : Sea Temperature nobs= 6 Min=1.80417e+01, Max=1.81944e+01, RMS=1.81181e+01

Test : End H(x)
10 changes: 5 additions & 5 deletions src/tests/testoutput/test_hofx3d_nc_prof_2vars.ref
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Test : State:
Test : Model state valid at time: 2021-06-30T00:00:00Z
Test : 5 variables: sea_water_potential_temperature, sea_water_potential_temperature_background_error, depthBelowWaterSurface, salinity, salinity_background_error
Test : State:
Test : Model state valid at time: 2021-06-30T00:00:00Z
Test : 5 variables: sea_water_potential_temperature, sea_water_potential_temperature_background_error, depth, salinity, salinity_background_error
Test : atlas field norms:
Test : sea_water_potential_temperature: 9.73262e-02
Test : sea_water_potential_temperature_background_error: 3.54309e-04
Test : depthBelowWaterSurface: 2.05581e-01
Test : depth: 2.05581e-01
Test : salinity: 1.89413e-01
Test : salinity_background_error: 3.54309e-04

Test : H(x):
Test : H(x):
Test : ARGO profiles nobs= 12 Min=1.81028e+01, Max=3.52000e+01, RMS=2.79784e+01

Test : End H(x)
9 changes: 4 additions & 5 deletions src/tests/testoutput/test_hofx3d_nc_sst.ref
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
Test : State:
Test : State:
Test : Model state valid at time: 2021-06-30T00:00:00Z
Test : 2 variables: sea_surface_temperature, sea_surface_temperature_background_error
Test : atlas field norms:
Test : sea_surface_temperature: 1.37607e-01
Test : sea_surface_temperature_background_error: 6.13682e-04

Test : H(x):
Test : Sea Surface Temperature nobs= 7 Min=17.6445, Max=18.4389, RMS=18.0723

Test : End H(x)
Test : H(x):

Test : Sea Surface Temperature nobs= 7 Min=1.76445e+01, Max=1.84389e+01, RMS=1.80723e+01

Test : End H(x)
8 changes: 4 additions & 4 deletions src/tests/testoutput/test_hofx_nc_ice.ref
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Test : Initial state:
Test : Initial state:
Test : Model state valid at time: 2021-06-28T23:00:00Z
Test : 2 variables: ice_area_fraction, ice_area_fraction_background_error
Test : atlas field norms:
Test : ice_area_fraction: 0.00000e+00
Test : ice_area_fraction_background_error: 3.06841e-03

Test : Final state:
Test : Final state:
Test : Model state valid at time: 2021-06-30T23:00:00Z
Test : 2 variables: ice_area_fraction, ice_area_fraction_background_error
Test : atlas field norms:
Test : ice_area_fraction: 3.16981e-03
Test : ice_area_fraction_background_error: 3.06841e-03

Test : H(x):
Test : Sea Ice nobs= 7 Min=0.00000e+00, Max=5.41667e-01, RMS=2.04731e-01'
Test : H(x):
Test : Sea Ice nobs= 7 Min=0.00000e+00, Max=5.41667e-01, RMS=2.04731e-01

Test : End H(x)
7 changes: 4 additions & 3 deletions src/tests/testoutput/test_hofx_nc_sst.ref
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
Test : Initial state:
Test : Initial state:
Test : Model state valid at time: 2021-06-28T23:00:00Z
Test : 2 variables: sea_surface_temperature, sea_surface_temperature_background_error
Test : atlas field norms:
Test : sea_surface_temperature: 1.37673e-01
Test : sea_surface_temperature_background_error: 6.13682e-04

Test : Final state:
Test : Final state:
Test : Model state valid at time: 2021-06-30T23:00:00Z
Test : 2 variables: sea_surface_temperature, sea_surface_temperature_background_error
Test : atlas field norms:
Test : sea_surface_temperature: 1.37683e-01
Test : sea_surface_temperature_background_error: 6.13682e-04

Test : H(x):
Test : H(x):

Test : Sea Surface Temperature nobs= 7 Min=1.76544e+01, Max=1.84389e+01, RMS=1.80765e+01

Test : End H(x)
4 changes: 2 additions & 2 deletions src/tests/testoutput/test_ostia_seaice_obs_hofx3d.ref
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Test : State:
Test : State:
Test : Model state valid at time: 2021-06-30T00:00:00Z
Test : 2 variables: ice_area_fraction, ice_area_fraction_background_error
Test : atlas field norms:
Test : ice_area_fraction: 3.20183e-03
Test : ice_area_fraction_background_error: 3.06841e-03

Test : H(x):
Test : H(x):
Test : Sea Ice nobs= 4 Min=0, Max=0, RMS=0

Test : End H(x)

0 comments on commit 02e0994

Please sign in to comment.