@@ -5,7 +5,7 @@ Track eddy with Identification file produce with EddyIdentification
5
5
"""
6
6
from py_eddy_tracker import EddyParser
7
7
from py_eddy_tracker .tracking import Correspondances
8
- from os .path import exists
8
+ from os .path import exists , dirname
9
9
from os import mkdir
10
10
import logging
11
11
from numpy import unique
@@ -22,23 +22,21 @@ def usage():
22
22
nargs = '+' ,
23
23
help = 'File of correspondances to reload link '
24
24
'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' )
28
26
return parser .parse_args ()
29
27
30
28
31
29
if __name__ == '__main__' :
32
30
CONFIG = usage ()
33
31
34
32
# 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 ) )
37
35
38
36
START_TIME = dt .datetime .now ()
39
37
CORRESPONDANCES = Correspondances .load (CONFIG .nc_file [0 ])
40
38
logging .info ('Start merging' )
41
39
for i in CONFIG .nc_file [1 :]:
42
40
CORRESPONDANCES .merge_correspondance (Correspondances .load (i ))
43
41
44
- CORRESPONDANCES .save ('%s/toto.nc' % CONFIG .path_out )
42
+ CORRESPONDANCES .save (CONFIG .path_out )
0 commit comments