diff --git a/xios_examples/packing_scale_offset/axis_check.xml b/xios_examples/packing_scale_offset/axis_check.xml
index b815db5..ec25ae2 100644
--- a/xios_examples/packing_scale_offset/axis_check.xml
+++ b/xios_examples/packing_scale_offset/axis_check.xml
@@ -2,23 +2,17 @@
-
-
-
-
-
-
-
-
+
+
-
+
diff --git a/xios_examples/packing_scale_offset/main.xml b/xios_examples/packing_scale_offset/main.xml
index d211fc2..f2db0e6 100644
--- a/xios_examples/packing_scale_offset/main.xml
+++ b/xios_examples/packing_scale_offset/main.xml
@@ -3,8 +3,8 @@
-
+
@@ -24,7 +24,7 @@
-
+
diff --git a/xios_examples/packing_scale_offset/pack.F90 b/xios_examples/packing_scale_offset/pack.F90
index 8221388..de42616 100644
--- a/xios_examples/packing_scale_offset/pack.F90
+++ b/xios_examples/packing_scale_offset/pack.F90
@@ -28,6 +28,8 @@ subroutine initialise()
integer :: mpi_error
integer :: lenx
integer :: leny
+ double precision, dimension (:), allocatable :: latvals, lonvals
+ double precision, dimension (:,:), allocatable :: latb, lonb
! Arbitrary datetime setup, required for XIOS but unused
origin = xios_date(2022, 2, 2, 12, 0, 0)
@@ -54,14 +56,23 @@ subroutine initialise()
call xios_get_axis_attr('x', n_glo=lenx)
call xios_get_axis_attr('y', n_glo=leny)
- ! initialize the main context for interacting with the data.
+ allocate ( lonvals(lenx) )
+ allocate ( latvals(leny) )
+ allocate ( lonb(2, lenx) )
+ allocate ( latb(2, leny) )
+
+ call xios_get_axis_attr('x', value=lonvals)
+ call xios_get_axis_attr('y', value=latvals)
+
+ ! ! initialize the main context for interacting with the data.
call xios_context_initialize('main', comm)
call xios_set_time_origin(origin)
call xios_set_start_date(start)
call xios_set_timestep(tstep)
- call xios_set_domain_attr("original_domain", ni=lenx, nj=leny, ibegin=0, jbegin=0)
+ call xios_set_domain_attr("original_domain", ni_glo=lenx, nj_glo=leny, ni=lenx, nj=leny, ibegin=0, jbegin=0)
+ call xios_set_domain_attr("original_domain", lonvalue_1d=lonvals, latvalue_1d=latvals)
call xios_close_context_definition()
@@ -76,7 +87,7 @@ subroutine finalise()
call xios_context_finalize()
call xios_set_current_context('main')
call xios_context_finalize()
- call MPI_Comm_free(comm, mpi_error)
+ ! call MPI_Comm_free(comm, mpi_error)
call xios_finalize()
call MPI_Finalize(mpi_error)
@@ -93,6 +104,7 @@ subroutine simulate()
! Allocatable arrays, size is taken from input file
double precision, dimension (:,:), allocatable :: inodata
+ print *, "simulate"
call xios_get_domain_attr('original_domain', ni_glo=lenx)
call xios_get_domain_attr('original_domain', nj_glo=leny)
diff --git a/xios_examples/packing_scale_offset/domain_input_simple_linear.cdl b/xios_examples/packing_scale_offset/pack_data_thirds.cdl
similarity index 100%
rename from xios_examples/packing_scale_offset/domain_input_simple_linear.cdl
rename to xios_examples/packing_scale_offset/pack_data_thirds.cdl
diff --git a/xios_examples/packing_scale_offset/pack_data_thirds_missing.cdl b/xios_examples/packing_scale_offset/pack_data_thirds_missing.cdl
new file mode 100644
index 0000000..2edc2bd
--- /dev/null
+++ b/xios_examples/packing_scale_offset/pack_data_thirds_missing.cdl
@@ -0,0 +1,31 @@
+netcdf domain_input {
+dimensions:
+ x = 5 ;
+ y = 5 ;
+variables:
+ float x(x) ;
+ x:long_name = "original x coordinate" ;
+ x:units = "1";
+ float y(y) ;
+ y:long_name = "original y coordinate" ;
+ y:units = "1";
+ double original_data(y,x) ;
+ original_data:long_name = "input data values" ;
+ original_data:units = "1";
+
+// global attributes:
+ :title = "Input data for XIOS Domain resampling; data is a sum of the x & y coordinates each multiplied by 1/3; x/3 + y/3 ." ;
+
+data:
+
+ x = 0, 2, 4, 6, 8 ;
+
+ y = 0, 2, 4, 6, 8 ;
+
+ original_data = 0, 0.6666666666666666, 1.3333333333333333, 2, 2.6666666666666665,
+ 0.6666666666666666, 1.3333333333333333, 2, 2.6666666666666665, 3.3333333333333335,
+ 1.3333333333333333, 2, 2.6666666666666665, 3.3333333333333335, 4,
+ 2, 2.6666666666666665, 3.3333333333333335, 4, 4.666666666666667,
+ 2.6666666666666665, 3.3333333333333335, 4, 4.666666666666667, _ ;
+
+}
diff --git a/xios_examples/packing_scale_offset/test_packing_cases.py b/xios_examples/packing_scale_offset/test_packing_cases.py
index 2b7fa79..0b50bd8 100644
--- a/xios_examples/packing_scale_offset/test_packing_cases.py
+++ b/xios_examples/packing_scale_offset/test_packing_cases.py
@@ -75,12 +75,7 @@ def test_pack(self):
# unique name for the test
tname = 'test_{}'.format(os.path.splitext(os.path.basename(f))[0])
# add the test as an attribute (function) to the test class
- if os.environ.get('MVER', '').startswith('XIOS3/trunk'):
- # these tests are hitting exceptions with XIOS3
- # but not XIOS2, so skip for XIOS3 runner
- setattr(TestPackDomain, tname,
- unittest.skip(TestPackDomain.make_a_pack_test(f)))
- elif tname in known_failures:
+ if tname in known_failures:
# set decorator @unittest.expectedFailure
setattr(TestPackDomain, tname,
unittest.expectedFailure(TestPackDomain.make_a_pack_test(f)))