Selecting DataArrays¶
See also
CF conventions on
A powerful feature of cf_xarray is the ability select DataArrays using special “CF names” like the “latitude”, or “longitude” coordinate names, “X” or “Y” axes names, oreven using the standard_name attribute if present.
To demonstrate this, let’s load a few datasets
from cf_xarray.datasets import airds, anc, multiple, popds as pop
By axis and coordinate name¶
Lets select the "X" axis on airds.
# identical to airds["lon"]
airds.cf["X"]
<xarray.DataArray 'lon' (lon: 50)> Size: 200B
200.0 202.5 205.0 207.5 210.0 212.5 ... 310.0 312.5 315.0 317.5 320.0 322.5
Coordinates:
* lon (lon) float32 200B 200.0 202.5 205.0 207.5 ... 317.5 320.0 322.5
Attributes:
standard_name: longitude
long_name: Longitude
units: degrees_east
axis: X- lon: 50
- 200.0 202.5 205.0 207.5 210.0 212.5 ... 312.5 315.0 317.5 320.0 322.5
array([200. , 202.5, 205. , 207.5, 210. , 212.5, 215. , 217.5, 220. , 222.5, 225. , 227.5, 230. , 232.5, 235. , 237.5, 240. , 242.5, 245. , 247.5, 250. , 252.5, 255. , 257.5, 260. , 262.5, 265. , 267.5, 270. , 272.5, 275. , 277.5, 280. , 282.5, 285. , 287.5, 290. , 292.5, 295. , 297.5, 300. , 302.5, 305. , 307.5, 310. , 312.5, 315. , 317.5, 320. , 322.5], dtype=float32) - lon(lon)float32200.0 202.5 205.0 ... 320.0 322.5
- standard_name :
- longitude
- long_name :
- Longitude
- units :
- degrees_east
- axis :
- X
array([200. , 202.5, 205. , 207.5, 210. , 212.5, 215. , 217.5, 220. , 222.5, 225. , 227.5, 230. , 232.5, 235. , 237.5, 240. , 242.5, 245. , 247.5, 250. , 252.5, 255. , 257.5, 260. , 262.5, 265. , 267.5, 270. , 272.5, 275. , 277.5, 280. , 282.5, 285. , 287.5, 290. , 292.5, 295. , 297.5, 300. , 302.5, 305. , 307.5, 310. , 312.5, 315. , 317.5, 320. , 322.5], dtype=float32)
- lonPandasIndex
PandasIndex(Index([200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5], dtype='float32', name='lon'))
- standard_name :
- longitude
- long_name :
- Longitude
- units :
- degrees_east
- axis :
- X
This works because airds.lon.attrs contains axis: "X"
airds.cf
Coordinates:
CF Axes: * X: ['lon']
* Y: ['lat']
* T: ['time']
Z: n/a
CF Coordinates: * longitude: ['lon']
* latitude: ['lat']
* time: ['time']
vertical: n/a
Cell Measures: area: ['cell_area']
volume: n/a
Standard Names: * latitude: ['lat']
* longitude: ['lon']
* time: ['time']
Bounds: n/a
Grid Mappings: n/a
Data Variables:
Cell Measures: area, volume: n/a
Standard Names: air_temperature: ['air']
Bounds: n/a
Grid Mappings: n/a
By standard name¶
The variable airds.air has standard_name: "air_temperature", so we can use that to pull it out:
airds.cf["air_temperature"]
<xarray.DataArray 'air' (time: 4, lat: 25, lon: 50)> Size: 40kB
[5000 values with dtype=float64]
Coordinates:
* lat (lat) float32 100B 75.0 72.5 70.0 67.5 ... 22.5 20.0 17.5 15.0
* lon (lon) float32 200B 200.0 202.5 205.0 207.5 ... 317.5 320.0 322.5
* time (time) datetime64[ns] 32B 2013-01-01 ... 2013-01-01T18:00:00
cell_area (lat, lon) float32 5kB 2.989e+09 2.989e+09 ... 1.116e+10
Attributes: (12/13)
long_name: 4xDaily Air temperature at sigma level 995
units: degK
precision: 2
GRIB_id: 11
GRIB_name: TMP
var_desc: Air temperature
... ...
level_desc: Surface
statistic: Individual Obs
parent_stat: Other
actual_range: [185.16 322.1 ]
cell_measures: area: cell_area
standard_name: air_temperature- time: 4
- lat: 25
- lon: 50
- ...
[5000 values with dtype=float64]
- lat(lat)float3275.0 72.5 70.0 ... 20.0 17.5 15.0
- standard_name :
- latitude
- long_name :
- Latitude
- units :
- degrees_north
- axis :
- Y
array([75. , 72.5, 70. , 67.5, 65. , 62.5, 60. , 57.5, 55. , 52.5, 50. , 47.5, 45. , 42.5, 40. , 37.5, 35. , 32.5, 30. , 27.5, 25. , 22.5, 20. , 17.5, 15. ], dtype=float32) - lon(lon)float32200.0 202.5 205.0 ... 320.0 322.5
- standard_name :
- longitude
- long_name :
- Longitude
- units :
- degrees_east
- axis :
- X
array([200. , 202.5, 205. , 207.5, 210. , 212.5, 215. , 217.5, 220. , 222.5, 225. , 227.5, 230. , 232.5, 235. , 237.5, 240. , 242.5, 245. , 247.5, 250. , 252.5, 255. , 257.5, 260. , 262.5, 265. , 267.5, 270. , 272.5, 275. , 277.5, 280. , 282.5, 285. , 287.5, 290. , 292.5, 295. , 297.5, 300. , 302.5, 305. , 307.5, 310. , 312.5, 315. , 317.5, 320. , 322.5], dtype=float32) - time(time)datetime64[ns]2013-01-01 ... 2013-01-01T18:00:00
- standard_name :
- time
- long_name :
- Time
array(['2013-01-01T00:00:00.000000000', '2013-01-01T06:00:00.000000000', '2013-01-01T12:00:00.000000000', '2013-01-01T18:00:00.000000000'], dtype='datetime64[ns]') - cell_area(lat, lon)float322.989e+09 2.989e+09 ... 1.116e+10
array([[2.9893588e+09, 2.9893588e+09, 2.9893588e+09, ..., 2.9893588e+09, 2.9893588e+09, 2.9893588e+09], [3.4731523e+09, 3.4731523e+09, 3.4731523e+09, ..., 3.4731523e+09, 3.4731523e+09, 3.4731523e+09], [3.9503316e+09, 3.9503316e+09, 3.9503316e+09, ..., 3.9503316e+09, 3.9503316e+09, 3.9503316e+09], ..., [1.0853450e+10, 1.0853450e+10, 1.0853450e+10, ..., 1.0853450e+10, 1.0853450e+10, 1.0853450e+10], [1.1015431e+10, 1.1015431e+10, 1.1015431e+10, ..., 1.1015431e+10, 1.1015431e+10, 1.1015431e+10], [1.1156443e+10, 1.1156443e+10, 1.1156443e+10, ..., 1.1156443e+10, 1.1156443e+10, 1.1156443e+10]], shape=(25, 50), dtype=float32)
- latPandasIndex
PandasIndex(Index([75.0, 72.5, 70.0, 67.5, 65.0, 62.5, 60.0, 57.5, 55.0, 52.5, 50.0, 47.5, 45.0, 42.5, 40.0, 37.5, 35.0, 32.5, 30.0, 27.5, 25.0, 22.5, 20.0, 17.5, 15.0], dtype='float32', name='lat')) - lonPandasIndex
PandasIndex(Index([200.0, 202.5, 205.0, 207.5, 210.0, 212.5, 215.0, 217.5, 220.0, 222.5, 225.0, 227.5, 230.0, 232.5, 235.0, 237.5, 240.0, 242.5, 245.0, 247.5, 250.0, 252.5, 255.0, 257.5, 260.0, 262.5, 265.0, 267.5, 270.0, 272.5, 275.0, 277.5, 280.0, 282.5, 285.0, 287.5, 290.0, 292.5, 295.0, 297.5, 300.0, 302.5, 305.0, 307.5, 310.0, 312.5, 315.0, 317.5, 320.0, 322.5], dtype='float32', name='lon')) - timePandasIndex
PandasIndex(DatetimeIndex(['2013-01-01 00:00:00', '2013-01-01 06:00:00', '2013-01-01 12:00:00', '2013-01-01 18:00:00'], dtype='datetime64[ns]', name='time', freq=None))
- long_name :
- 4xDaily Air temperature at sigma level 995
- units :
- degK
- precision :
- 2
- GRIB_id :
- 11
- GRIB_name :
- TMP
- var_desc :
- Air temperature
- dataset :
- NMC Reanalysis
- level_desc :
- Surface
- statistic :
- Individual Obs
- parent_stat :
- Other
- actual_range :
- [185.16 322.1 ]
- cell_measures :
- area: cell_area
- standard_name :
- air_temperature
By cf_role¶
cf_xarray supports identifying variables by the cf_role attribute.
ds = xr.Dataset(
{"temp": ("x", np.arange(10))},
coords={"cast": ("x", np.arange(10), {"cf_role": "profile_id"})}
)
ds.cf["profile_id"]
<xarray.DataArray 'cast' (x: 10)> Size: 80B
0 1 2 3 4 5 6 7 8 9
Dimensions without coordinates: x
Attributes:
cf_role: profile_id- x: 10
- 0 1 2 3 4 5 6 7 8 9
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
- cf_role :
- profile_id
Associated variables¶
.cf[key] will return a DataArray or Dataset containing all variables associated with the key including ancillary variables and bounds variables (if possible).
In the following, note that the “ancillary variables” q_error_limit and q_detection_limit were also returned
anc.cf["specific_humidity"]
<xarray.DataArray 'q' (x: 10, y: 20)> Size: 2kB
0.7361 0.6374 0.8464 1.533 -0.2556 0.5764 ... -2.824 -1.418 -0.2821 1.604 0.1383
Coordinates:
q_error_limit (x, y) float64 2kB -0.8306 -0.3188 ... -2.035 0.0024
q_detection_limit float64 8B 0.001
Dimensions without coordinates: x, y
Attributes:
standard_name: specific_humidity
units: g/g
ancillary_variables: q_error_limit q_detection_limit- x: 10
- y: 20
- 0.7361 0.6374 0.8464 1.533 -0.2556 ... -1.418 -0.2821 1.604 0.1383
array([[ 0.73610528, 0.63737071, 0.84641107, 1.53300152, -0.25561578, 0.57636996, -0.47051297, -0.33117847, 0.65485509, 0.36852205, 1.16601509, 0.99735071, -0.03033101, 0.70846915, 0.59536632, 0.31514384, 0.81911537, 0.39271411, 0.59626059, 0.97863325], [-0.34935077, -0.30165439, -2.39238434, -1.6807893 , -1.76728232, -0.02804372, -0.69925048, -0.41237253, 1.52767951, -0.72062773, 0.76915691, 0.38106486, -1.54026208, 0.65040284, 0.67290202, 1.97507492, 2.20448839, 1.55822939, -0.12790659, -0.61244317], [-0.54689445, -1.58479132, 0.81842078, 0.20301213, -0.77212517, 0.59511366, 1.62190927, 2.37664413, -0.20000042, -0.2135838 , 0.18756707, -0.79417623, 0.07167949, -0.2934353 , 0.51017174, 0.53509413, 2.18850485, 0.0416375 , 1.54786209, -1.76449512], [ 0.19676959, -0.67194893, -0.92021633, -0.2870958 , 0.7315763 , -1.68733543, -0.10459033, -1.12500798, -1.0585675 , -1.58605521, -0.30144647, 1.42945679, 0.16661809, -0.94959293, 0.55431307, -1.06121658, -0.07493255, 0.49171601, -0.87497375, 1.79695407], [ 1.68593321, 0.35976776, -0.351401 , -0.01588779, -1.36549473, 0.02171234, -1.16496759, 0.16829372, 0.17066379, 2.39873675, 0.61955194, 1.21499661, -0.81556584, 2.10944609, 0.38923831, 0.74762497, 0.65472471, -0.30822147, -0.14781221, -0.97081931], [-0.69441962, 0.93351875, 0.89639303, 0.557809 , 0.62427905, 1.17921964, -0.06801696, 1.17337123, 0.12293917, -1.03509228, -1.52976373, 1.30799332, 0.47049289, 1.22145037, 0.68584102, -0.74948103, 1.31521455, 1.31387513, -0.17614965, 1.12912726], [ 0.03730582, -1.40516535, 1.61472981, 0.37259038, -0.38031537, 1.22273904, -0.21158305, 0.44931828, 0.15585059, -0.50510406, -1.26679811, 1.84333503, 0.87411666, -0.82336033, 0.41476521, 0.57474713, -2.05393107, 0.02292056, -1.02969104, 1.33992998], [-2.59875073, -1.44719892, -0.31298764, -0.56763395, 0.53492553, -0.19986869, 0.36204416, 1.42387665, -2.15329496, 0.48774511, -0.41767529, -0.58554723, 0.07683265, -0.25017961, 0.98491471, -0.20661072, 1.44099398, 0.18576778, -1.08081152, -0.52143056], [-0.95206333, -0.97264326, -0.13991739, 1.43217812, 0.07620964, 0.31947231, 1.01899795, -0.7904283 , 0.26553979, -1.21494551, 0.45599998, -1.01581015, -0.26156469, -0.94500305, 0.67922096, -0.79681334, 0.44936549, -1.44711868, -0.08562546, -2.33969225], [-0.48793608, -1.09478273, -0.27794996, -2.35387094, 0.1778421 , 0.11825055, 1.36151767, 0.82954545, 2.68061118, -0.11940378, 1.55477153, -0.28100501, 0.79427123, 1.26670327, 0.22782341, -2.82430778, -1.41822472, -0.2820825 , 1.60420678, 0.13831998]]) - q_error_limit(x, y)float64-0.8306 -0.3188 ... -2.035 0.0024
- standard_name :
- specific_humidity standard_error
- units :
- g/g
array([[-8.30637079e-01, -3.18849203e-01, -1.53710112e-01, -9.14317418e-01, 7.24039500e-01, -2.40708437e+00, 8.85086794e-01, 3.25698088e-01, -4.42299529e-01, -1.06587618e+00, -2.59597158e-01, 2.70547529e-01, 1.20088870e+00, 1.04981674e+00, 1.09671382e+00, -1.08090012e+00, 1.31307032e-01, -8.42556945e-01, -5.54782395e-01, 1.81304297e+00], [ 8.32020839e-01, -1.04219512e+00, 6.44359339e-01, 2.20759563e-01, 5.96763421e-01, -9.64312931e-01, 4.85975020e-01, -4.66354230e-01, -1.26998704e+00, -1.16797418e+00, -4.61104138e-01, 1.08726950e+00, 3.70876110e-01, 8.22147850e-01, -1.04899430e+00, -1.00303490e+00, -4.00585017e-01, 6.35865226e-01, 1.05437122e+00, 3.40272272e-01], [-1.81945255e+00, 4.78083862e-01, -5.69232638e-01, -1.05983729e+00, 1.19257181e+00, -7.95043487e-01, -1.50718616e-01, 5.47606931e-01, 1.00892614e+00, -1.53157540e+00, 2.45954953e-01, -1.74825982e+00, -2.07124054e+00, 9.04807360e-01, 8.01833375e-01, 8.06069941e-01, -1.13541776e+00, 6.16837262e-03, ... 5.64329658e-01, 1.00629852e+00, -1.08422570e+00, 8.66188326e-01, 8.11313836e-01, 4.93535978e-01, 8.85364125e-01, -1.72758129e+00, -5.10982053e-01, -5.14440471e-01, 6.72413245e-01, -1.21857874e+00, 1.34224452e+00, 1.21161659e+00, -1.70506413e+00, 1.46977190e-01, -1.23822890e+00], [-2.32898087e-03, 4.01570973e-01, -9.00192719e-01, 9.22548934e-01, -3.37916940e-01, 8.91095223e-02, -6.48154456e-01, -2.30204003e+00, 2.75313177e-01, -1.55039858e+00, -1.85271838e+00, -1.53572835e+00, 1.41428424e+00, 4.49823821e-01, -1.04384334e+00, 3.64226942e-02, 9.50167902e-01, 5.01089110e-01, -5.44869878e-01, -1.16581047e-01], [-1.40718144e-01, -9.05727000e-01, -1.13225380e+00, 3.40949977e-01, -2.54313938e-01, 9.03287820e-01, 3.39194615e-01, 3.55941130e-01, -2.66191717e+00, 1.77061567e-02, -1.85692459e+00, 9.25219697e-01, -6.76561028e-01, -1.69618734e-01, 2.29931569e-01, 1.37203357e+00, -4.91615824e-02, -1.73735858e-01, -2.03497602e+00, 2.40019996e-03]]) - q_detection_limit()float640.001
- standard_name :
- specific_humidity detection_minimum
- units :
- g/g
array(0.001)
- standard_name :
- specific_humidity
- units :
- g/g
- ancillary_variables :
- q_error_limit q_detection_limit
even though they are “data variables” and not “coordinate variables” in the original Dataset.
anc
<xarray.Dataset> Size: 3kB
Dimensions: (x: 10, y: 20)
Dimensions without coordinates: x, y
Data variables:
q (x, y) float64 2kB 0.7361 0.6374 0.8464 ... 1.604 0.1383
q_error_limit (x, y) float64 2kB -0.8306 -0.3188 ... -2.035 0.0024
q_detection_limit float64 8B 0.001- x: 10
- y: 20
- q(x, y)float640.7361 0.6374 ... 1.604 0.1383
- standard_name :
- specific_humidity
- units :
- g/g
- ancillary_variables :
- q_error_limit q_detection_limit
array([[ 0.73610528, 0.63737071, 0.84641107, 1.53300152, -0.25561578, 0.57636996, -0.47051297, -0.33117847, 0.65485509, 0.36852205, 1.16601509, 0.99735071, -0.03033101, 0.70846915, 0.59536632, 0.31514384, 0.81911537, 0.39271411, 0.59626059, 0.97863325], [-0.34935077, -0.30165439, -2.39238434, -1.6807893 , -1.76728232, -0.02804372, -0.69925048, -0.41237253, 1.52767951, -0.72062773, 0.76915691, 0.38106486, -1.54026208, 0.65040284, 0.67290202, 1.97507492, 2.20448839, 1.55822939, -0.12790659, -0.61244317], [-0.54689445, -1.58479132, 0.81842078, 0.20301213, -0.77212517, 0.59511366, 1.62190927, 2.37664413, -0.20000042, -0.2135838 , 0.18756707, -0.79417623, 0.07167949, -0.2934353 , 0.51017174, 0.53509413, 2.18850485, 0.0416375 , 1.54786209, -1.76449512], [ 0.19676959, -0.67194893, -0.92021633, -0.2870958 , 0.7315763 , -1.68733543, -0.10459033, -1.12500798, -1.0585675 , -1.58605521, -0.30144647, 1.42945679, 0.16661809, -0.94959293, 0.55431307, -1.06121658, -0.07493255, 0.49171601, -0.87497375, 1.79695407], [ 1.68593321, 0.35976776, -0.351401 , -0.01588779, -1.36549473, 0.02171234, -1.16496759, 0.16829372, 0.17066379, 2.39873675, 0.61955194, 1.21499661, -0.81556584, 2.10944609, 0.38923831, 0.74762497, 0.65472471, -0.30822147, -0.14781221, -0.97081931], [-0.69441962, 0.93351875, 0.89639303, 0.557809 , 0.62427905, 1.17921964, -0.06801696, 1.17337123, 0.12293917, -1.03509228, -1.52976373, 1.30799332, 0.47049289, 1.22145037, 0.68584102, -0.74948103, 1.31521455, 1.31387513, -0.17614965, 1.12912726], [ 0.03730582, -1.40516535, 1.61472981, 0.37259038, -0.38031537, 1.22273904, -0.21158305, 0.44931828, 0.15585059, -0.50510406, -1.26679811, 1.84333503, 0.87411666, -0.82336033, 0.41476521, 0.57474713, -2.05393107, 0.02292056, -1.02969104, 1.33992998], [-2.59875073, -1.44719892, -0.31298764, -0.56763395, 0.53492553, -0.19986869, 0.36204416, 1.42387665, -2.15329496, 0.48774511, -0.41767529, -0.58554723, 0.07683265, -0.25017961, 0.98491471, -0.20661072, 1.44099398, 0.18576778, -1.08081152, -0.52143056], [-0.95206333, -0.97264326, -0.13991739, 1.43217812, 0.07620964, 0.31947231, 1.01899795, -0.7904283 , 0.26553979, -1.21494551, 0.45599998, -1.01581015, -0.26156469, -0.94500305, 0.67922096, -0.79681334, 0.44936549, -1.44711868, -0.08562546, -2.33969225], [-0.48793608, -1.09478273, -0.27794996, -2.35387094, 0.1778421 , 0.11825055, 1.36151767, 0.82954545, 2.68061118, -0.11940378, 1.55477153, -0.28100501, 0.79427123, 1.26670327, 0.22782341, -2.82430778, -1.41822472, -0.2820825 , 1.60420678, 0.13831998]]) - q_error_limit(x, y)float64-0.8306 -0.3188 ... -2.035 0.0024
- standard_name :
- specific_humidity standard_error
- units :
- g/g
array([[-8.30637079e-01, -3.18849203e-01, -1.53710112e-01, -9.14317418e-01, 7.24039500e-01, -2.40708437e+00, 8.85086794e-01, 3.25698088e-01, -4.42299529e-01, -1.06587618e+00, -2.59597158e-01, 2.70547529e-01, 1.20088870e+00, 1.04981674e+00, 1.09671382e+00, -1.08090012e+00, 1.31307032e-01, -8.42556945e-01, -5.54782395e-01, 1.81304297e+00], [ 8.32020839e-01, -1.04219512e+00, 6.44359339e-01, 2.20759563e-01, 5.96763421e-01, -9.64312931e-01, 4.85975020e-01, -4.66354230e-01, -1.26998704e+00, -1.16797418e+00, -4.61104138e-01, 1.08726950e+00, 3.70876110e-01, 8.22147850e-01, -1.04899430e+00, -1.00303490e+00, -4.00585017e-01, 6.35865226e-01, 1.05437122e+00, 3.40272272e-01], [-1.81945255e+00, 4.78083862e-01, -5.69232638e-01, -1.05983729e+00, 1.19257181e+00, -7.95043487e-01, -1.50718616e-01, 5.47606931e-01, 1.00892614e+00, -1.53157540e+00, 2.45954953e-01, -1.74825982e+00, -2.07124054e+00, 9.04807360e-01, 8.01833375e-01, 8.06069941e-01, -1.13541776e+00, 6.16837262e-03, ... 5.64329658e-01, 1.00629852e+00, -1.08422570e+00, 8.66188326e-01, 8.11313836e-01, 4.93535978e-01, 8.85364125e-01, -1.72758129e+00, -5.10982053e-01, -5.14440471e-01, 6.72413245e-01, -1.21857874e+00, 1.34224452e+00, 1.21161659e+00, -1.70506413e+00, 1.46977190e-01, -1.23822890e+00], [-2.32898087e-03, 4.01570973e-01, -9.00192719e-01, 9.22548934e-01, -3.37916940e-01, 8.91095223e-02, -6.48154456e-01, -2.30204003e+00, 2.75313177e-01, -1.55039858e+00, -1.85271838e+00, -1.53572835e+00, 1.41428424e+00, 4.49823821e-01, -1.04384334e+00, 3.64226942e-02, 9.50167902e-01, 5.01089110e-01, -5.44869878e-01, -1.16581047e-01], [-1.40718144e-01, -9.05727000e-01, -1.13225380e+00, 3.40949977e-01, -2.54313938e-01, 9.03287820e-01, 3.39194615e-01, 3.55941130e-01, -2.66191717e+00, 1.77061567e-02, -1.85692459e+00, 9.25219697e-01, -6.76561028e-01, -1.69618734e-01, 2.29931569e-01, 1.37203357e+00, -4.91615824e-02, -1.73735858e-01, -2.03497602e+00, 2.40019996e-03]]) - q_detection_limit()float640.001
- standard_name :
- specific_humidity detection_minimum
- units :
- g/g
array(0.001)
Selecting multiple variables¶
Sometimes a Dataset may contain multiple X or multiple longitude variables. In that case a simple .cf["X"] will raise an error. Instead follow Xarray convention and pass a list .cf[["X"]] to receive a Dataset with all available "X" variables
multiple.cf[["X"]]
<xarray.Dataset> Size: 320B
Dimensions: (x2: 10, x1: 30)
Coordinates:
* x2 (x2) int64 80B 0 1 2 3 4 5 6 7 8 9
* x1 (x1) int64 240B 0 1 2 3 4 5 6 7 8 9 ... 21 22 23 24 25 26 27 28 29
Data variables:
*empty*- x2: 10
- x1: 30
- x2(x2)int640 1 2 3 4 5 6 7 8 9
- axis :
- X
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
- x1(x1)int640 1 2 3 4 5 6 ... 24 25 26 27 28 29
- axis :
- X
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29])
- x1PandasIndex
PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], dtype='int64', name='x1')) - x2PandasIndex
PandasIndex(Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype='int64', name='x2'))
pop.cf[["longitude"]]
<xarray.Dataset> Size: 10kB
Dimensions: (nlat: 20, nlon: 30)
Coordinates:
TLONG (nlat, nlon) float64 5kB 1.0 1.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 1.0
ULONG (nlat, nlon) float64 5kB 0.5 0.5 0.5 0.5 0.5 ... 0.5 0.5 0.5 0.5
* nlon (nlon) int64 240B 0 1 2 3 4 5 6 7 8 ... 21 22 23 24 25 26 27 28 29
* nlat (nlat) int64 160B 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Data variables:
*empty*- nlat: 20
- nlon: 30
- TLONG(nlat, nlon)float641.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 1.0
- units :
- degrees_east
array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]) - ULONG(nlat, nlon)float640.5 0.5 0.5 0.5 ... 0.5 0.5 0.5 0.5
- units :
- degrees_east
array([[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.5, 0.5,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array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19])
- nlonPandasIndex
PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], dtype='int64', name='nlon')) - nlatPandasIndex
PandasIndex(Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], dtype='int64', name='nlat'))
Mixing names¶
cf_xarray aims to be as friendly as possible, so it is possible to mix “CF names” and normal variable names. Here we select UVEL and TEMP by using the standard_name of TEMP (which is sea_water_potential_temperature)
pop.cf[["sea_water_potential_temperature", "UVEL"]]
<xarray.Dataset> Size: 29kB
Dimensions: (nlat: 20, nlon: 30)
Coordinates:
TLONG (nlat, nlon) float64 5kB 1.0 1.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 1.0
TLAT (nlat, nlon) float64 5kB 2.0 2.0 2.0 2.0 2.0 ... 2.0 2.0 2.0 2.0
ULONG (nlat, nlon) float64 5kB 0.5 0.5 0.5 0.5 0.5 ... 0.5 0.5 0.5 0.5
ULAT (nlat, nlon) float64 5kB 2.5 2.5 2.5 2.5 2.5 ... 2.5 2.5 2.5 2.5
* nlon (nlon) int64 240B 0 1 2 3 4 5 6 7 8 ... 21 22 23 24 25 26 27 28 29
* nlat (nlat) int64 160B 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Data variables:
TEMP (nlat, nlon) float64 5kB 15.0 15.0 15.0 15.0 ... 15.0 15.0 15.0
UVEL (nlat, nlon) float64 5kB 15.0 15.0 15.0 15.0 ... 15.0 15.0 15.0- nlat: 20
- nlon: 30
- TLONG(nlat, nlon)float641.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 1.0
- units :
- degrees_east
array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]) - TLAT(nlat, nlon)float642.0 2.0 2.0 2.0 ... 2.0 2.0 2.0 2.0
- units :
- degrees_north
array([[2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.], [2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.]]) - ULONG(nlat, nlon)float640.5 0.5 0.5 0.5 ... 0.5 0.5 0.5 0.5
- units :
- degrees_east
array([[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0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 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5], [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5], [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5], [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5], [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5]]) - nlon(nlon)int640 1 2 3 4 5 6 ... 24 25 26 27 28 29
- axis :
- X
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]) - nlat(nlat)int640 1 2 3 4 5 6 ... 14 15 16 17 18 19
- axis :
- Y
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19])
- TEMP(nlat, nlon)float6415.0 15.0 15.0 ... 15.0 15.0 15.0
- coordinates :
- TLONG TLAT
- standard_name :
- sea_water_potential_temperature
array([[15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., ... 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.]]) - UVEL(nlat, nlon)float6415.0 15.0 15.0 ... 15.0 15.0 15.0
- coordinates :
- ULONG ULAT
- standard_name :
- sea_water_x_velocity
array([[15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., ... 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.], [15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15., 15.]])
- nlonPandasIndex
PandasIndex(Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], dtype='int64', name='nlon')) - nlatPandasIndex
PandasIndex(Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], dtype='int64', name='nlat'))