Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docs/iris/src/userguide/interpolation_and_regridding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ This cube has a "hybrid-height" vertical coordinate system, meaning that the ver
coordinate is unevenly spaced in altitude:

>>> print(column.coord('altitude').points)
[ 418.69836 434.5705 456.7928 485.3665 520.2933 561.5752
609.2145 663.2141 723.57697 790.30664 863.4072 942.8823
1028.737 1120.9764 1219.6051 ]
[418.6983642578125 434.57049560546875 456.79278564453125 485.3664855957031
520.2932739257812 561.5751953125 609.2144775390625 663.214111328125
723.5769653320312 790.306640625 863.4072265625 942.88232421875
1028.737060546875 1120.9764404296875 1219.6051025390625]

We could regularise the vertical coordinate by defining 10 equally spaced altitude
sample points between 400 and 1250 and interpolating our vertical coordinate onto
Expand Down Expand Up @@ -177,8 +178,9 @@ For example, to mask values that lie beyond the range of the original data:
>>> scheme = iris.analysis.Linear(extrapolation_mode='mask')
>>> new_column = column.interpolate(sample_points, scheme)
>>> print(new_column.coord('altitude').points)
[ nan 494.44452 588.8889 683.33325 777.77783 872.2222
966.66675 1061.1111 1155.5554 nan]
[nan 494.44451904296875 588.888916015625 683.333251953125 777.77783203125
872.2222290039062 966.666748046875 1061.111083984375 1155.555419921875
nan]


.. _caching_an_interpolator:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x2acdccca" dtype="int64" shape="(3, 4, 5, 6)"/>
<data checksum="0x2acdccca" dtype="int64" mask_checksum="no-masked-elements" shape="(3, 4, 5, 6)"/>
</cube>
<cube dtype="int64" standard_name="air_temperature" units="K" var_name="air_temperature_0">
<attributes>
Expand Down Expand Up @@ -126,6 +126,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x2acdccca" dtype="int64" shape="(3, 4, 5, 6)"/>
<data checksum="0x2acdccca" dtype="int64" mask_checksum="no-masked-elements" shape="(3, 4, 5, 6)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/int64_data_netcdf3.cml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
</attributes>
<coords/>
<cellMethods/>
<data checksum="0xecbb4b55" dtype="int32" shape="(2, 2)"/>
<data checksum="0xecbb4b55" dtype="int32" mask_checksum="no-masked-elements" shape="(2, 2)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_deferred_index_0.cml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x33af4275" dtype="float64" shape="(161, 320)"/>
<data checksum="0x33af4275" dtype="float64" mask_checksum="no-masked-elements" shape="(161, 320)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_deferred_index_1.cml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x3b59eb3a" dtype="float64" shape="(320,)"/>
<data checksum="0x3b59eb3a" dtype="float64" mask_checksum="no-masked-elements" shape="(320,)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_deferred_mix_0.cml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x33af4275" dtype="float64" shape="(161, 320)"/>
<data checksum="0x33af4275" dtype="float64" mask_checksum="no-masked-elements" shape="(161, 320)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_deferred_mix_1.cml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x63b2309e" dtype="float64" shape="(2, 2)"/>
<data checksum="0x63b2309e" dtype="float64" mask_checksum="no-masked-elements" shape="(2, 2)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_deferred_slice_0.cml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x43b7f443" dtype="float64" shape="(20, 161, 320)"/>
<data checksum="0x43b7f443" dtype="float64" mask_checksum="no-masked-elements" shape="(20, 161, 320)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_deferred_slice_1.cml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x3b37762d" dtype="float64" shape="(10, 161, 320)"/>
<data checksum="0x3b37762d" dtype="float64" mask_checksum="no-masked-elements" shape="(10, 161, 320)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_deferred_slice_2.cml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x3360dea9" dtype="float64" shape="(5, 161, 320)"/>
<data checksum="0x3360dea9" dtype="float64" mask_checksum="no-masked-elements" shape="(5, 161, 320)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_deferred_tuple_0.cml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0xc0efa99c" dtype="float64" shape="(6, 161, 320)"/>
<data checksum="0xc0efa99c" dtype="float64" mask_checksum="no-masked-elements" shape="(6, 161, 320)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_deferred_tuple_1.cml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x5ce104b6" dtype="float64" shape="(4, 161, 320)"/>
<data checksum="0x5ce104b6" dtype="float64" mask_checksum="no-masked-elements" shape="(4, 161, 320)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_deferred_tuple_2.cml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0xf40ada45" dtype="float64" shape="(2, 161, 320)"/>
<data checksum="0xf40ada45" dtype="float64" mask_checksum="no-masked-elements" shape="(2, 161, 320)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_global_xyt_hires.cml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@
<coord interval="6 minutes" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xab9e4b38" dtype="float32" shape="(31, 160, 320)"/>
<data checksum="0xab9e4b38" dtype="float32" mask_checksum="no-masked-elements" shape="(31, 160, 320)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_global_xyt_total.cml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0xb5b2139a" dtype="float64" shape="(31, 161, 320)"/>
<data checksum="0xb5b2139a" dtype="float64" mask_checksum="no-masked-elements" shape="(31, 161, 320)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_global_xyzt_gems.cml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x65252ed2" dtype="float64" shape="(1, 60, 181, 360)"/>
<data checksum="0x65252ed2" dtype="float64" mask_checksum="no-masked-elements" shape="(1, 60, 181, 360)"/>
</cube>
<cube dtype="float64" long_name="Logarithm of surface pressure" units="no_unit" var_name="lnsp">
<attributes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x65252ed2" dtype="float64" shape="(1, 60, 181, 360)"/>
<data checksum="0x65252ed2" dtype="float64" mask_checksum="no-masked-elements" shape="(1, 60, 181, 360)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_laea.cml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0xf8a2bc63" dtype="float32" shape="(15, 15)"/>
<data checksum="0xf8a2bc63" dtype="float32" mask_checksum="no-masked-elements" shape="(15, 15)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_merc.cml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x4fd67588" dtype="float32" shape="(192, 192)"/>
<data checksum="0x4fd67588" dtype="float32" mask_checksum="no-masked-elements" shape="(192, 192)"/>
</cube>
</cubes>
4 changes: 2 additions & 2 deletions lib/iris/tests/results/netcdf/netcdf_monotonic.cml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0xd4e7a32f" dtype="int32" shape="(3, 3, 3)"/>
<data checksum="0xd4e7a32f" dtype="int32" mask_checksum="no-masked-elements" shape="(3, 3, 3)"/>
</cube>
<cube dtype="int32" standard_name="eastward_wind" units="m s-1" var_name="wind2">
<attributes>
Expand All @@ -34,7 +34,7 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0xd4e7a32f" dtype="int32" shape="(3, 3, 3)"/>
<data checksum="0xd4e7a32f" dtype="int32" mask_checksum="no-masked-elements" shape="(3, 3, 3)"/>
</cube>
<cube dtype="int32" standard_name="eastward_wind" units="m s-1" var_name="wind3">
<attributes>
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_rotated_xy_land.cml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x8b7ca96d" dtype="float32" shape="(95, 85)"/>
<data checksum="0x8b7ca96d" dtype="float32" mask_checksum="no-masked-elements" shape="(95, 85)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
<coord name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xafe5d01c" dtype="float32" shape="(4, 190, 174)"/>
<data checksum="0xafe5d01c" dtype="float32" mask_checksum="no-masked-elements" shape="(4, 190, 174)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0x9554cc14" dtype="float32" shape="(6, 10, 83, 83)"/>
<data checksum="0x9554cc14" dtype="float32" mask_checksum="no-masked-elements" shape="(6, 10, 83, 83)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
<coord name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xafe5d01c" dtype="float32" shape="(4, 190, 174)"/>
<data checksum="0xafe5d01c" dtype="float32" mask_checksum="no-masked-elements" shape="(4, 190, 174)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_units_0.cml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0xff4e3e81" dtype="int32" shape="(5,)"/>
<data checksum="0xff4e3e81" dtype="int32" mask_checksum="no-masked-elements" shape="(5,)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_units_1.cml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0xdbf2bfc2" dtype="int32" shape="(5,)"/>
<data checksum="0xdbf2bfc2" dtype="int32" mask_checksum="no-masked-elements" shape="(5,)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/uint32_data_netcdf3.cml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
</attributes>
<coords/>
<cellMethods/>
<data checksum="0xecbb4b55" dtype="int32" shape="(2, 2)"/>
<data checksum="0xecbb4b55" dtype="int32" mask_checksum="no-masked-elements" shape="(2, 2)"/>
</cube>
</cubes>
2 changes: 1 addition & 1 deletion lib/iris/tests/results/system/supported_filetype_.nc.cml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0xeba0a191" dtype="float32" shape="(60, 60)"/>
<data checksum="0xeba0a191" dtype="float32" mask_checksum="no-masked-elements" shape="(60, 60)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
<coord interval="6 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xcb5be595" dtype="float32" shape="(73, 96)"/>
<data checksum="0xcb5be595" dtype="float32" mask_checksum="no-masked-elements" shape="(73, 96)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
<coord interval="6 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xcb5be595" dtype="float32" shape="(73, 96)"/>
<data checksum="0xcb5be595" dtype="float32" mask_checksum="no-masked-elements" shape="(73, 96)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
</coord>
</coords>
<cellMethods/>
<data checksum="0xde505c47" dtype="float32" shape="(73, 96)"/>
<data checksum="0xde505c47" dtype="float32" mask_checksum="no-masked-elements" shape="(73, 96)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
<coord interval="4 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xafcd52d4" dtype="float32" shape="(3, 73, 96)"/>
<data checksum="0xafcd52d4" dtype="float32" mask_checksum="no-masked-elements" shape="(3, 73, 96)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
<coord interval="24 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0x6475db6b" dtype="float32" shape="(20, 16)"/>
<data checksum="0x6475db6b" dtype="float32" mask_checksum="no-masked-elements" shape="(20, 16)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@
<coord interval="1 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xc92d9fa6" dtype="float32" shape="(38, 145, 192)"/>
<data checksum="0xc92d9fa6" dtype="float32" mask_checksum="no-masked-elements" shape="(38, 145, 192)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
<coord name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xff272869" dtype="float32" shape="(240, 3)"/>
<data checksum="0xff272869" dtype="float32" mask_checksum="no-masked-elements" shape="(240, 3)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
<coord name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0x9c335005" dtype="float32" shape="(2, 15, 73)"/>
<data checksum="0x9c335005" dtype="float32" mask_checksum="no-masked-elements" shape="(2, 15, 73)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
<coord name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0x8d2a3247" dtype="float32" shape="(2, 15, 73, 96)"/>
<data checksum="0x8d2a3247" dtype="float32" mask_checksum="no-masked-elements" shape="(2, 15, 73, 96)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@
<coord interval="1 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0x8ab46e19" dtype="float32" shape="(14, 73, 96)"/>
<data checksum="0x8ab46e19" dtype="float32" mask_checksum="no-masked-elements" shape="(14, 73, 96)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
<coord interval="1 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0x8b5afb47" dtype="float32" shape="(4, 13, 10)"/>
<data checksum="0x8b5afb47" dtype="float32" mask_checksum="no-masked-elements" shape="(4, 13, 10)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<coord name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0x46976132" dtype="float32" shape="(15, 4)"/>
<data checksum="0x46976132" dtype="float32" mask_checksum="no-masked-elements" shape="(15, 4)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
<coord name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xd22414b0" dtype="float32" shape="(4, 1)"/>
<data checksum="0xd22414b0" dtype="float32" mask_checksum="no-masked-elements" shape="(4, 1)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
<coord interval="1 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0x82b10a0a" dtype="float32" shape="(360, 73, 96)"/>
<data checksum="0x82b10a0a" dtype="float32" mask_checksum="no-masked-elements" shape="(360, 73, 96)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
<coord interval="1 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xd9f6eff7" dtype="float32" shape="(360, 73, 96)"/>
<data checksum="0xd9f6eff7" dtype="float32" mask_checksum="no-masked-elements" shape="(360, 73, 96)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
<coord interval="1 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0x3bd37f19" dtype="float32" shape="(360, 73, 96)"/>
<data checksum="0x3bd37f19" dtype="float32" mask_checksum="no-masked-elements" shape="(360, 73, 96)"/>
</cube>
</cubes>
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
<coord interval="4 hour" name="time"/>
</cellMethod>
</cellMethods>
<data checksum="0xae6c0acd" dtype="float32" shape="(15, 73)"/>
<data checksum="0xae6c0acd" dtype="float32" mask_checksum="no-masked-elements" shape="(15, 73)"/>
</cube>
</cubes>
Loading