html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/4236#issuecomment-661852012,https://api.github.com/repos/pydata/xarray/issues/4236,661852012,MDEyOklzc3VlQ29tbWVudDY2MTg1MjAxMg==,35968931,2020-07-21T13:11:00Z,2020-07-21T13:11:00Z,MEMBER,"> I think the actual solution to my problem is to forget about preprocessing. I'm glad you've found an alternative way to solve your problem! > Still, it's a side-step around the arg passing issue. So, please tell me if you disagree, but I see it like this: the only time that you would need to be able to pass arguments in to `preprocess` is if you need to perform an operation within preprocess (i.e. not simply before or after `open_mfdataset`) that requires a different argument for each file, but when that argument cannot be derived from each file individually. If you need to pass in global arguments to preprocess, you can use `functools.partial` to define the `preprocess` function as having those arguments already set, and if you need only knowledge about the file being currently opened, then that's the use case preprocess is intended for. I can see that there might be other cases where you can't do either of the above, but how often do they actually occur?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,659142789 https://github.com/pydata/xarray/issues/4236#issuecomment-660077641,https://api.github.com/repos/pydata/xarray/issues/4236,660077641,MDEyOklzc3VlQ29tbWVudDY2MDA3NzY0MQ==,35968931,2020-07-17T12:22:59Z,2020-07-17T12:22:59Z,MEMBER,Before I think about this further - could your problem be solved using `functools.partial`?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,659142789