FLEXPART Testing Environment CTBTO WO8
 All Classes Namespaces Files Functions Variables Pages
test1.py
Go to the documentation of this file.
1 import FlexpartExecutable as Fexec
2 
3 #src_distro = '/u1/uaf/morton/ctbto/flexpart_distros/FLEXPART_GFS_1p0_2015-03-02'
4 
5 src_distro = '/tmp/fpsrc'
6 destdir = '/tmp/xx'
7 makefile = 'makefile.gfs_gfortran'
8 exec_name = 'FLEXPART_GFS_GFORTRAN'
9 
10 good_init = False
11 try:
12  exec_obj = Fexec.FlexpartExecutable(srcdir=src_distro, destdir=destdir,
13  makefile=makefile,
14  executable_name=exec_name)
15  good_init = True
16 except Exception as e:
17  print 'Bad instantiation: ' + str(e)
18  pass
19 
20 if good_init:
21  print 'Executable exists: ' + str(exec_obj.executable_exists())
22 
23  success = exec_obj.compile_it()
24 
25  print 'Compile success: ' + str(success)
26  print 'Executable exists: ' + str(exec_obj.executable_exists())