ClimateLaboratoryBook icon indicating copy to clipboard operation
ClimateLaboratoryBook copied to clipboard

climlab does not run well in Binder

Open brian-rose opened this issue 5 years ago • 3 comments

The Binder links work fine, except for a fatal flaw. If we try to

import climlab

the Binder kernel hangs forever.

So the Binder links are effectively useless since we import climlab in almost every notebook.

brian-rose avatar Jan 23 '20 22:01 brian-rose

Ok so that's not actually true. The import takes a long time (minutes), and throws a warning

Cannot import and initialize compiled Fortran extension, CAM3 module will not be functional.

brian-rose avatar Jan 23 '20 22:01 brian-rose

and then the kernel sometimes dies mysteriously.

brian-rose avatar Jan 23 '20 22:01 brian-rose

Update: with the release of climlab v0.7.11, things are better. In that release, downloading and caching of required data files is handled by pooch and that seems to resolve some of the failures on Binder.

It would be better to include the critical data files directly in the Docker image that is used on Binder. Performance would increase. The problem now is that every new kernel that is launched on Binder has to do the same download and cache.

There are also issues with accessing CESM output data files through http://thredds.atmos.albany.edu:8080

brian-rose avatar May 04 '21 15:05 brian-rose

Climlab works well on the Project Pythia binderhub that we are currently pointing to. So I will finally close this issue.

brian-rose avatar Jan 15 '24 21:01 brian-rose

I don't know if you ever resolved this:

There are also issues with accessing CESM output data files through http://thredds.atmos.albany.edu:8080

I was having trouble pulling data via url using xarray and then I happened across a strong sensitivity to the ordering of imports. This worked for me:

import cftime
import fsspec

import pandas as pd 
from netCDF4 import Dataset
import xarray as xr
import h5py

jordanplanders avatar Feb 21 '24 05:02 jordanplanders