Last modified 12 months ago Last modified on 2019-03-01 14:19:49

Python topics

Collecting info on Python as used to process and work with data in the Sediment transport group.

Our group uses Annaconda, and jupyter notebooks. Most instructions assume you've started your session from an annaconda command window, and have various environments installed in the default place.

Here's some general info about data types and sizes in python, and Matlab as they pertain to netCDF. Default typing in both is to double; usually this is more precision than we need, so knowing how to explicitly declare float or short variables makes smaller files.

Unidata's Python training modules

Because Unidata users tend to want to do the same things we do, their training is pretty well targeted to our needs. It gives info on datetime, how to access data in OPeNDAP, and use xarray- all stuff we need to know.

  • the html version training is here
  • the shiny, glamourous, tech-savy way to do it is to access the Unidata JupyterHub Server. This launches a virtual machine from which you can access many different notebooks without cloning to your local machine. There are examples in the notebook-gallery, and tutorials in the online training section. Note- when you open a notebook (ipynb) it defaults to plain python3 kernel, so when you try to import packages, it won't find some. Go to the "kernel" tab, select "change kernel", then select the appropriate one for your notebook (names indicate the one for online training, and one for notebook gallery examples).

Marinna's notes on python, pointers to Jupyter Notebooks (all in work)