File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -135,10 +135,10 @@ def dimfilter(grid, **kwargs):
135
135
with Session () as lib :
136
136
file_context = lib .virtualfile_from_data (check_kind = None , data = grid )
137
137
with file_context as infile :
138
- if "G" not in kwargs : # if outgrid is unset, output to tempfile
139
- kwargs . update ({ "G" : tmpfile .name })
140
- outgrid = kwargs [ "G" ]
141
- arg_str = " " . join ([ infile , build_arg_string (kwargs )] )
142
- lib . call_module ( module = "dimfilter" , args = arg_str )
138
+ if ( outgrid := kwargs . get ( "G" )) is None :
139
+ kwargs [ "G" ] = outgrid = tmpfile .name # output to tmpfile
140
+ lib . call_module (
141
+ module = "dimfilter" , args = build_arg_string (kwargs , infile = infile )
142
+ )
143
143
144
144
return load_dataarray (outgrid ) if outgrid == tmpfile .name else None
You can’t perform that action at this time.
0 commit comments