Christopher Bull bio photo

Christopher Bull

Aspiring Oceanographer at the British Antarctic Survey. Big data python enthusiast. Outdoor adventurer.

Email Twitter Github

Update 10.10.2016. MkMov 0.4 now supports a bunch of other outputs, see usage for details.

MkMov is a Python package that creates a movie from a netCDF file with a single line, interface is command line (no python knowledge needed)!

I reguarly find myself making movies for sanity checks on model runs, other times I’ll want a movie for a talk or perhaps to look at how some diagnostic plot varies over time. Suffice to say a few people have asked me how I create movies from netCDF files, such questions spurred the development of…

MkMov, a python package for making movies. In can be used in two ways:

  1. from a netCDF file
  2. from a list of png files (use –stitch option)

Examples tell a thousand words, here’s a movie (AVISO global allsat madt, output is daily and variable is adt)

Created with a single line command, namely

python mkmov.py 2d adt --lmask -214748 --cmap Set3 -o /srv/ccrc/data42/z3457920/mkmovmovies4/AVISOdt_global_allsat_madt_Set3.mov /srv/ccrc/data42/z3457920/RawData/AVISO/RawData/dt_global_allsat_madt/ftp.aviso.altimetry.fr/global/delayed-time/grids/madt/all-sat-merged/h/*/*.nc &>  /srv/ccrc/data42/z3457920/mkmovmovies4/15.log &

More examples with their respective run commands here. Official docs are here. Contributions are most welcome.

You might be wondering what this tool offers over something like ncview and a screen grabber program.

Pros:

  1. bash scriptable
  2. customisable output (e.g. –clev, –cmap etc)
  3. can take multiple files as input
  4. can wrap ffmpeg to stitch together any png files

Cons:

  1. slow in comparison to ncview
  2. need to install dependencies
In category: python