Skip to content

Migrating from the old to the new cookbook

Andrew Kiss edited this page Jul 29, 2019 · 8 revisions

The cookbook in analysis3-19.04 and later is not compatible with previous versions. This page lists some of the changes needed to migrate old notebooks to the new cookbook.

If you don't want to change your notebooks, you'll need to use the old cookbook, which is currently only available via the analysis3-19.01 kernel. However this will not be available forever, so you should consider switching to the new cookbook.

The cookbook in analysis3-19.04 has some problems, so analysis3-19.07 or later is recommended.

To use the new cookbook in your jupyter notebook,

  1. Switch to the analysis3-19.07 kernel (or later).
  2. Add session = cc.database.create_session() somewhere near the beginning of the notebook (before any other cc.* commands).
  3. Replace cc.get_nc_variable with cc.querying.getvar, add session as the third argument, insert ncfile= before the .nc filename argument (or remove the .nc filename argument, though this could potentially cause problems), and also remove any op, use_bag or use_cache arguments.
Clone this wiki locally