sel: read selected range

ds = xr.open_dataset(fn) # fn is netcdf file name, containing monthly zg (geopotential height)

z500prj=ds['zg'].sel(plev=50000, \

time=slice('1955-01-01','2005-12-31'), \

lon=slice(120, 280), lat=slice(20, 70))

以下のように,3次元データのうち任意領域だけのを読み込むことができる.与えられた範囲の内側にあるデータ点が読みだされる.

You can read selected rage as follows.

ds = xr.open_dataset(fn) # fn is netcdf file name, containing monthly zg (geopotential height)

z500prj=ds['zg'].sel(plev=50000, \

time=slice('1955-01-01','2005-12-31'), \z

lon=slice(120, 280), lat=slice(20, 70))