Questions tagged [python-iris]

Iris seeks to provide a powerful, easy to use, and community-driven Python library for analysing and visualising meteorological and oceanographic data sets. NOTE: This is not the tag to use if your question relates to the common Iris dataset (often relating to machine learning). This tag is for the tool found at https://github.com/scitools/iris

With Iris you can:

  • Use a single API to work on your data, irrespective of its original format.
  • Read and write (CF-)netCDF, GRIB, and PP files.
  • Easily produce graphs and maps via integration with matplotlib and cartopy.

Visit https://scitools-iris.readthedocs.io/en/latest/ for the latest documentation.

74 questions
1
vote
1 answer

Merging iris when cube.var_name differs

I’ve run into a problem with merging cubes. I have a cube list that I would like to merge into a smaller set of cubes. However, when I try and merge iris gives me the following error message: Traceback (most recent call last): File…
Neill Bowler
  • 145
  • 1
  • 10
1
vote
1 answer

interpolate cube data to a given (list of) point(s)

Given a cube with lat/lon coordinates surface altitude [m] / (m) (latitude: 21600; longitude: 43200) Dimension coordinates: latitude x - longitude -…
andreas-h
  • 10,679
  • 18
  • 60
  • 78
0
votes
0 answers

How can I create a boxplot using iqplot with a list of cubes in python-iris?

I got a list of cubes and I would like to build Boxplot using python-iris. I loaded all files and I try using matplotlib... hadgem2 = iris.load_cube(CLIMDIR + '/prec_EN-22_HadGEM2-ES_aml_ts_init:2040-end:2100.nc') plt.plot(hadgem2) plt.show() error…
0
votes
0 answers

Why is Iris merging coordinates from different pressure domain profiles?

I am loading in air temperature on pressure levels (STASH code 30294) from some UM output and Iris appears to be incorrectly interpreting the data. This variable is being written to a file with two different domain profiles; (1) 19 pressure levels…
jonnyhtw
  • 61
  • 8
0
votes
0 answers

How to solve dead kernel on Jupyter?

I am trying to import Cube from iris.cube: from iris.cube import Cube but I keep receiving the message The kernel appears to have died. It will restart automatically. The same happens when I try to use geopandas: REG_data =…
0
votes
1 answer

How to apply custom calculation between two IRIS cubes (GRIB files)? Considering also using xarray

I am trying to do some calculation between two iris cubes (GRIB files), here it is what I'm trying to achieve: First cube: ERA5-Land dataset, downloaded from official site via cdsapi API routine, cropped to custom Lat and Lon, in this example, I…
capocchione
  • 81
  • 1
  • 1
  • 6
0
votes
0 answers

Calculate a value at specific latitude and longitude via interpolation of iris cube (GRIB)

I am quite new to using iris so I apologize for the newbie question. I'm trying to interpolate GRIB temperature data at a certain point with known latitude and longitude. For example, I've downloaded a GRIB file for air temperature over 2 days,…
capocchione
  • 81
  • 1
  • 1
  • 6
0
votes
0 answers

pip install scitools-iris error in subprocess (getting requirements to build wheel)

When I was trying to install scitools-iris, I received an error saying "Getting requirements to build wheel did not run successfully." I followed the installation directions in…
kyle
  • 1
  • 1
0
votes
1 answer

Control vmin and vmax in Iris 'animate'?

Does anyone know how (if?) I can control the vmin and vmax of an Iris quickplot pcolormesh animation using iris.experimental.animate.animate? wind = iris.load_cube('/my/pp/file') cube_iter = wind.slices(('longitude', 'latitude')) ani =…
jonnyhtw
  • 61
  • 8
0
votes
0 answers

CMIP ocean model data not loading properly into python iris?

I am trying to understand why the following CMIP ocean model data file does not appear to load properly into iris. My understanding is that the variables for latitude and longitude should be mapped to grid_latitude and grid_longitude, but this is…
Brendan
  • 31
  • 3
0
votes
1 answer

Group_by in iris using mean calculation

Is there a similar function at iris to cf_xarray resample using mean? dataset.cf.resample(T="Y").mean()
BorjaEst
  • 390
  • 2
  • 11
0
votes
1 answer

Can you download SciTools Iris package on google colab?

I am trying to download the SciTools Iris package in Google Colab. I first use pip install, like so: !pip install scitools-iris And then import iris with: import iris however, this returns the error message: ERROR:root:An unexpected error occurred…
USer555
  • 81
  • 7
0
votes
1 answer

How to insert line function (x=) onto iris data cube graph without changing axis scale?

I have attempted to plot a line on my dataset at hr=2, however it changes my x axis scale by about 35 years for some reason. The dataset has 420 datapoints across 6 hours, hence the number in the middle two lines. fig=…
0
votes
2 answers

How to only plot data on the hour from a 6 hour dataset cube (iris)?

So far my code to plot a a graph is like so: iplt.plot(pressure_no1, color='black') plt.xlabel('Time / hour of day') plt.ylabel('Atmospheric pressure / kPa') iplt.show() it is a 6 hour cube (although is 2dimensional) data set, with 420 data points.…
0
votes
1 answer

Converting Xarray DataArray to Iris Cube

I have a netCDF file which I have loaded as an Xarray DataArray: data = xr.open_dataset('radar_data.nc') I want to pull out the 'CZ' variable (radar reflectivity) and convert this to an Iris cube: Z = data['CZ'] Z_ir = Z.to_iris() However, when…
hm8
  • 1,381
  • 3
  • 21
  • 41