#!/usr/bin/env python # coding: utf-8 #
# Patrick BROCKMANN - LSCE (Climate and Environment Sciences Laboratory)
#

#
# Updated: 2019/11/13 # #### Load the ferret extension # In[1]: get_ipython().run_line_magic('load_ext', 'ferretmagic') # #### Explore usage of %ferret_run line magic # In[2]: for i in [100,500,1000]: get_ipython().run_line_magic('ferret_run', "-s 300,300 'set text/font=arial ; plot/thick=2 sin(i[i=1:%(i)s]*0.1)' % locals()") # #### Another example # In[3]: get_ipython().run_cell_magic('ferret', '', 'use levitus_climatology\n') # In[4]: for i in range(1,3): get_ipython().run_line_magic('ferret_run', "-q -s 400,300 'set text/font=arial ; fill salt[k=%(i)s] ; go land' % locals()")