@@ -5,7 +5,7 @@ Track eddy with Identification file produce with EddyIdentification
55"""
66from py_eddy_tracker import EddyParser
77from py_eddy_tracker .tracking import Correspondances
8- from os .path import exists
8+ from os .path import exists , dirname
99from os import mkdir
1010import logging
1111from numpy import unique
@@ -22,23 +22,21 @@ def usage():
2222 nargs = '+' ,
2323 help = 'File of correspondances to reload link '
2424 'without tracking computation' )
25- parser .add_argument ('--path_out' ,
26- default = './' ,
27- help = 'Path, where to write file' )
25+ parser .add_argument ('path_out' , help = 'Path, where to write file' )
2826 return parser .parse_args ()
2927
3028
3129if __name__ == '__main__' :
3230 CONFIG = usage ()
3331
3432 # Create output directory
35- if not exists (CONFIG .path_out ):
36- mkdir (CONFIG .path_out )
33+ if not exists (dirname ( CONFIG .path_out ) ):
34+ mkdir (dirname ( CONFIG .path_out ) )
3735
3836 START_TIME = dt .datetime .now ()
3937 CORRESPONDANCES = Correspondances .load (CONFIG .nc_file [0 ])
4038 logging .info ('Start merging' )
4139 for i in CONFIG .nc_file [1 :]:
4240 CORRESPONDANCES .merge_correspondance (Correspondances .load (i ))
4341
44- CORRESPONDANCES .save ('%s/toto.nc' % CONFIG .path_out )
42+ CORRESPONDANCES .save (CONFIG .path_out )
0 commit comments