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
0
votes
2 answers

Turn a cube into a list of data points and lists of x, y and z

This is a bit of a long shot, but I thought I'd ask here before writing this myself. I have a 3D cube of data with lon, lat and height coordinates. I want 4 1D vectors of the data at all points, the lon, lat, height and data. This is so that I can…
0
votes
1 answer

Python Iris plot average NetCDF data

I am trying to plot the outputs of some NetCDF files as well as the average of all of them. I have successfully plotted the the NetCDF files themselves, as follows (where CCCmaYR_mean, CLMcomYR_mean, DMIYR_mean, KNMIYR_mean, MPIYR_mean, SMHIYR_mean,…
ErikaAWT
  • 67
  • 2
  • 14
0
votes
1 answer

plt.fill_between not working in python

I am using the following code in python (iris, numpy and matplotlib) (where CCCma, CRU and UDel are all cubes predefined): #We want to plot the mean for the whole region so we need a mean of all the lats and lons CCCma_mean =…
ErikaAWT
  • 67
  • 2
  • 14
0
votes
3 answers

Python Matplotlib Difference between two NetCDF datasets

I am trying to map the difference between climate simulation data and observed data over a set geographical area. To create the map of just the climate simulation I am using this code import matplotlib.pyplot as plt import iris import iris.plot as…
ErikaAWT
  • 67
  • 2
  • 14
0
votes
1 answer

Python Iris Set X Axis limit and ticks

I am creating line graphs with either the year or month along the x axis. Here is the simplified code for the monthly line graph: import matplotlib.pyplot as plt import iris import iris.coord_categorisation as iriscc import iris.plot as…
ErikaAWT
  • 67
  • 2
  • 14
0
votes
2 answers

Python iris NetCDF time gone awry

Something seems to have gone wrong between yesterday and today. I’m wondering if you might be able to help? This is all running Python using iris. Basically when I ran my code yesterday I got the first graph here, but today I get the second: If…
ErikaAWT
  • 67
  • 2
  • 14
0
votes
1 answer

Regridding? CRU Observed data and CORDEX data in Python Iris

I am trying to compare simulated climate model data from CORDEX to Observed data from CRU 4.00. I am doing this in Python running iris. I have managed to get all of my climate models to run, but the observed data won't. I suspect this is because the…
ErikaAWT
  • 67
  • 2
  • 14
0
votes
3 answers

Limit Time in Dataset

I am using Iris and Matplotlib to compare two sets of data visually (maps, line graphs, etc.). Both datasets contain time, latitude, longitude and temperature data. However the two datasets have different time series (one if from 1901-2007 and one…
ErikaAWT
  • 67
  • 2
  • 14
0
votes
1 answer

Uncaught Exeption iin /iris/ws (also [Errno 101] Network unreachable)

I started to install MOPIDY on a "Centos 7"-Virtual Machine. Everything works fine, I also installed a Web client named "Iris". I can connect to Spotify, but the "Pusher" (i think "iris"!?) connects and disconnects again and again and again. I…
0
votes
2 answers

How to make a cube with horiztonal grid of 1 cube and vertical grid of another

I need to generate a cube that has the horizontal grid of one cube and the vertical grid of another (to make a cube for pressure on rho levels from a temperature cube and a u wind cube). The documentation is lacking context and I can't find anything…
0
votes
1 answer

Clip a defined region in IRIS cube using a shapefile

I handle iris cubes containing meteorological data (lon, lat, precipitation, temperature,...) and I am interested in calculating statistics in defined areas (for example a country). This post explains how to crop the cube with a box (min lon, min…
Zoran
  • 309
  • 4
  • 9
0
votes
1 answer

Iris for Anaconda, fails to read .grib

I've just downloaded Iris and am trying to view the contents of a .grib file. I have tried a very simple bit of code below but get a selection of errors. Can anyone see what might be causing the problems? Thanks import…
squar_o
  • 557
  • 2
  • 11
  • 36
0
votes
1 answer

Cannot save to grib2 file using python iris module

I'm using the python iris module to read in some netCDF data and output specific fields in grib format for further downstream processing. However I generate the following error …
-1
votes
1 answer

Trying to create a masked timeslice but returns AttributeError: 'numpy.ndarray' object has no attribute 'dim_coords' whent trying to do an iris plot

I am trying to create a contour plot showing annual dissolved iron concentrations for the years to 1860-1900 and am trying to exclude all values above a certain amount (0.000012) because these relate to a specific region which is throwing my data…
1 2 3 4
5