Code Monkey home page Code Monkey logo

iris-mesh-tutorial's Introduction

iris-mesh-tutorial

Tutorials for LFRic (unstructured) data handling, using Iris and related tools.

The content is all written as interactive Jupyter notebooks, which combine presenter information and student exercises.

Get a suitable Python environment to run the notebooks

For guaranteed operation with tested package versions, create a environment from the provided "lockfile", as follows :
$ conda create --name meshtut_safelocked_env --file tutorial_conda_env_resolved.lock

Start the tutorial

Run Jupyter lab, in the chosen Python environment.
NOTE: always start it in the /notebooks directory.

E.G.

$ conda activate meshtut_safelocked_env
$ cd iris-mesh-tutorial/notebooks
$ jupyter lab
    [I 2023-01-12 15:39:10.730 ServerApp] jupyter_server_terminals | extension was successfully linked.
    [I 2023-01-12 15:39:10.737 ServerApp] jupyterlab | extension was successfully linked.
 . . .
    [I 2023-01-12 15:39:11.114 ServerApp] Serving notebooks from local directory: /net/home/h05/itpp/git/iris-mesh-tutorial
    [I 2023-01-12 15:39:11.114 ServerApp] Jupyter Server 2.0.6 is running at:
    [I 2023-01-12 15:39:11.114 ServerApp] http://localhost:8888/lab?token=c4ece2e59cd8c81779de0f394c421e22f258f50466cc027e
    [I 2023-01-12 15:39:11.114 ServerApp]  or http://127.0.0.1:8888/lab?token=c4ece2e59cd8c81779de0f394c421e22f258f50466cc027e
    [I 2023-01-12 15:39:11.114 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
    [C 2023-01-12 15:39:11.734 ServerApp] 
        
        To access the server, open this file in a browser:
            file:///net/home/h05/itpp/.local/share/jupyter/runtime/jpserver-90840-open.html
        Or copy and paste one of these URLs:
            http://localhost:8888/lab?token=c4ece2e59cd8c81779de0f394c421e22f258f50466cc027e
         or http://127.0.0.1:8888/lab?token=c4ece2e59cd8c81779de0f394c421e22f258f50466cc027e

A window should then appear in your browser.
Failing that, visit one of the urls displayed in the terminal output.

Get Started

Open the notebook Mesh_Tutorial_Intro.ipynb.

Developer notes: to build the lockfile

The lockfile tutorial_conda_env_resolved.lock is produced from an actual resolved environment.

To build a working env with all-latest packages, do the following :

Step 1: build a fresh env from the spec

  • The env spec is in the file tutorial_conda_env.yml
  • use a conda env with "mamba" in it (since conda is likely to take ages and/or run out of memory)
  • resolve the env
    $ conda activate mamba-env
    $ mamba env create -n mesh-tutorial --file tutorial_conda_env.yml
  • test that this actually works, by running all the notebooks

Step 2: make a new version of the lockfile

  • use a conda env with 'ssstack' in it (https://github.com/MetOffice/ssstack)
  • snapshot the new env content, and replace web-proxy urls to convert it to a "shareable" lockfile
    $ conda activate ssstack-env
    $ conda list -n mesh-tutorial --explicit >temp_condalist_explicit.txt
    $ ssstack shareable temp_condalist_explicit.txt >tutorial_conda_env_resolved.lock
    $ rm temp_condalist_explicit.txt

Step 3: upload changes in a PR

iris-mesh-tutorial's People

Contributors

pp-mo avatar stephenworsley avatar bjlittle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.