Skip to content

The introduction.ipynb tutorial fails when attempting make the first contour plot. #7

@noaaroland

Description

@noaaroland

This is likely a bug for cf-plot or possibly cf-python, but since I cannot tell and it manifests itself in this tutorial I'm putting the issue here. If you want me to do something else, please let me know.

# Make a contour plot of the data
cfp.con(t_500)

Fails. The kernel dies.

This bit of code illustrates the problem directly:

import cf
import cfplot as cfp
f1 = cf.read('ncas_data/data1.nc')
temp = f1.select('air_temperature')[0]
print(temp)
t_500 = temp.subspace(pressure=500)
print(t_500)
cfp.gopen(file='airt.png')
cfp.con(t_500)
cfp.gclose()
(cf) [rhs@sour cf-tools-training]$ python airt.py
Field: air_temperature (ncvar%T)
--------------------------------
Data            : air_temperature(time(1), pressure(23), latitude(160), longitude(320)) K
Dimension coords: time(1) = [1964-01-21 00:00:00]
                : pressure(23) = [1000.0, ..., 1.0] mbar
                : latitude(160) = [89.14151763916016, ..., -89.14151763916016] degrees_north
                : longitude(320) = [0.0, ..., 358.875] degrees_east
Field: air_temperature (ncvar%T)
--------------------------------
Data            : air_temperature(time(1), pressure(1), latitude(160), longitude(320)) K
Dimension coords: time(1) = [1964-01-21 00:00:00]
                : pressure(1) = [500.0] mbar
                : latitude(160) = [89.14151763916016, ..., -89.14151763916016] degrees_north
                : longitude(320) = [0.0, ..., 358.875] degrees_east
Segmentation fault (core dumped)

The environment listing is attached.

env.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions