File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/py_eddy_tracker/appli Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,9 @@ def subset_network():
114114 help = "Remove short dead end, first is for minimal obs number and second for minimal segment time to keep" ,
115115 )
116116 parser .add_argument (
117- "--remove_trash" , action = "store_true" , help = "Remove trash (network id == 0)" ,
117+ "--remove_trash" ,
118+ action = "store_true" ,
119+ help = "Remove trash (network id == 0)" ,
118120 )
119121 parser .add_argument (
120122 "-p" ,
@@ -124,8 +126,18 @@ def subset_network():
124126 help = "Start day and end day, if it's a negative value we will add to day min and add to day max,"
125127 "if 0 it is not used" ,
126128 )
129+ parser .add_argument (
130+ "-i" ,
131+ "--ids" ,
132+ nargs = '*' ,
133+ type = int ,
134+ help = "network ids to extract" ,
135+ )
136+
127137 args = parser .parse_args ()
128138 n = NetworkObservations .load_file (args .input , raw_data = True )
139+ if args .ids :
140+ n = n .networks (args .ids )
129141 if args .length is not None :
130142 n = n .longer_than (* args .length )
131143 if args .remove_dead_end is not None :
You can’t perform that action at this time.
0 commit comments