DISPATCH
demo.py
1 # -*- coding: utf-8 -*-
2 """
3 Created on Sun Jul 29 20:00:32 2018
4 
5 @author: Aake
6 """
7 
8 # Pythn 2/3 compatibility
9 from __future__ import print_function
10 
11 import os
12 import numpy as np
13 
14 import dispatch
15 
16 def demo(iout=1,run='',data='data'):
17  snapfile=os.path.join(data,run,'snapshots.dat')
18  assert os.path.isfile(snapfile), 'the file '+snapfile+' must exist'
19  #
20  s=dispatch.snapshot(iout,run,data)
21  print('s.time:',s.time)
22 
23 if __name__ == '__main__':
24  demo()