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/3863#issuecomment-600084031,https://api.github.com/repos/pydata/xarray/issues/3863,600084031,MDEyOklzc3VlQ29tbWVudDYwMDA4NDAzMQ==,6213168,2020-03-17T13:53:50Z,2020-03-17T13:53:50Z,MEMBER,"This has nothing to do with to_netcdf or slicing. Your upstream data is broken for the variable ``specific_humidity_ml``. When you invoke to_netcdf(), the remote resources actually holding the variable(s) are requested for the first time, and the server is responding 404. Just load the variable into memory: ```python >>> fnx.specific_humidity_ml.compute() RuntimeError: NetCDF: file not found ``` Please reopen if you have reason to believe the issue is in the xarray pydap driver and not in the source data. P.S. all your lines invoking to_netcdf could be replaced with a single command: ```python fnx[ [ ""forecast_reference_time"", ""p0"", ""ap"", ""b"", ""projection_lambert"", ""ozone_profile_c"", ""specific_humidity_ml"", ] ].isel(time = slice(0,48)).to_netcdf('meps_out.nc', 'w', format = 'NETCDF4') ```","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,583001763