@@ -157,6 +157,10 @@ class RegridTest(unittest.TestCase):
157
157
dst = dst_src [0 ]
158
158
src = dst_src [1 ]
159
159
160
+ filename_xyz = os .path .join (
161
+ os .path .dirname (os .path .abspath (__file__ )), "regrid_xyz.nc"
162
+ )
163
+
160
164
@unittest .skipUnless (esmpy_imported , "Requires esmpy/ESMF package." )
161
165
def test_Field_regrid_2d_field (self ):
162
166
"""2-d regridding with Field destination grid."""
@@ -735,6 +739,17 @@ def test_Field_regridc_1d_field(self):
735
739
with self .assertRaises (ValueError ):
736
740
src .regridc (dst , method = method , axes = axes )
737
741
742
+ @unittest .skipUnless (esmpy_imported , "Requires esmpy/ESMF package." )
743
+ def test_Field_regridc_1d_coordinates_z (self ):
744
+ """1-d Z Cartesian regridding with coordinates destination grid."""
745
+ src = cf .read (self .filename_xyz )[0 ]
746
+ dst = cf .DimensionCoordinate (
747
+ data = cf .Data ([800 , 705 , 632 , 510 , 320.0 ], "hPa" )
748
+ )
749
+ d = src .regridc ([dst ], method = "linear" , axes = "Z" , z = "Z" , ln_z = True )
750
+ z = d .dimension_coordinate ("Z" )
751
+ self .assertTrue (z .data .equals (dst .data ))
752
+
738
753
@unittest .skipUnless (esmpy_imported , "Requires esmpy/ESMF package." )
739
754
def test_Field_regrid_chunks (self ):
740
755
"""Regridding of chunked axes"""
0 commit comments