id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 1319964729,I_kwDOAMm_X85OrRA5,6840,better warning message for xarray/core/dataset.py:2060: SerializationWarning,17162724,open,0,,,0,2022-07-27T18:26:55Z,2024-01-25T18:02:57Z,,CONTRIBUTOR,,,,"### Is your feature request related to a problem? I was trying to store a zarr fstore and I got: ``` /opt/userenvs/ray.bell/autofront/lib/python3.9/site-packages/xarray/core/dataset.py:2060: SerializationWarning: saving variable None with floating point data as an integer dtype without any _FillValue to use for NaNs return to_zarr( # type: ignore ``` ~~What I was seeing was a time coord which had encoding 'dtype': dtype('int64'). Storing the time this way lost the HH:MM on my datetime array.~~ I think I am seeing 'units': 'days since 2022-MM-DD 00:00:00' whereas it should be `hours` for my data. ### Describe the solution you'd like The message captures the variable/coord name instead of **None** It could offer a solution such as ""to store floating point data you could possibly use `encoding={variable/coord: {""dtype"": float, ""_Fillvalue"": np.nan}`"" ### Describe alternatives you've considered _No response_ ### Additional context I'll try to come back and write a MCVE WIP: you can get the warning message by doing: ``` ds = xr.tutorial.open_dataset(""air_temperature"") ds[""time""].encoding # {'units': 'hours since 1800-01-01', 'calendar': 'standard', 'dtype': dtype('float32')} ds.isel(time=0).to_zarr(""tmp0.zarr"", mode=""w"") ``` /Users/ray/miniconda3/envs/main/lib/python3.9/site-packages/xarray/core/dataset.py:2060: SerializationWarning: saving variable None with floating point data as an integer dtype without any _FillValue to use for NaNs return to_zarr( # type: ignore My guess if one of lat, lon, time, air is raising that message Can't find the associated code in the repo that raises this. 2060 is to_zarr AFICT (https://github.com/pydata/xarray/blob/main/xarray/core/dataset.py#L2066)","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6840/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 815825360,MDU6SXNzdWU4MTU4MjUzNjA=,4952,Feature request: dropna() along multiple dimensions,17162724,open,0,,,3,2021-02-24T20:30:39Z,2023-08-16T18:09:32Z,,CONTRIBUTOR,,,," **Is your feature request related to a problem? Please describe.** In the docs (http://xarray.pydata.org/en/stable/generated/xarray.Dataset.dropna.html) it says Dropping along multiple dimensions simultaneously is not yet supported. But I couldn't find a GitHub Issue open it. Apologies if there is one **Describe the solution you'd like** `da.dropna(['lat', 'lon], how=""all"")` produces the same as `da.dropna('lat', how=""all"").dropna('lon', how=""all"")`","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4952/reactions"", ""total_count"": 4, ""+1"": 4, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 1223527885,I_kwDOAMm_X85I7Y3N,6567,"cftime_range missing freq (""W"") - Invalid frequency string provided",17162724,open,0,,,0,2022-05-03T01:08:01Z,2022-05-03T01:51:59Z,,CONTRIBUTOR,,,,"### Is your feature request related to a problem? I tend to use xr.cftime_range as a drop in for pandas.date_range. My only reason here is I may able to shave a line and not import pandas. In doing `xr.cftime_range(""2020-01-01"", periods=1, freq=""W"")` I get ``` AttributeError Traceback (most recent call last) /opt/userenvs/ray.bell/main/lib/python3.9/site-packages/xarray/coding/cftime_offsets.py in to_offset(freq) 729 try: --> 730 freq_data = re.match(_PATTERN, freq).groupdict() 731 except AttributeError: AttributeError: 'NoneType' object has no attribute 'groupdict' During handling of the above exception, another exception occurred: ValueError Traceback (most recent call last) /tmp/ipykernel_549/3579801314.py in ----> 1 xr.cftime_range(""2020-01-01"", periods=1, freq=""W"") /opt/userenvs/ray.bell/main/lib/python3.9/site-packages/xarray/coding/cftime_offsets.py in cftime_range(start, end, periods, freq, normalize, name, closed, calendar) 1041 dates = _generate_linear_range(start, end, periods) 1042 else: -> 1043 offset = to_offset(freq) 1044 dates = np.array(list(_generate_range(start, end, periods, offset))) 1045 /opt/userenvs/ray.bell/main/lib/python3.9/site-packages/xarray/coding/cftime_offsets.py in to_offset(freq) 730 freq_data = re.match(_PATTERN, freq).groupdict() 731 except AttributeError: --> 732 raise ValueError(""Invalid frequency string provided"") 733 734 freq = freq_data[""freq""] ValueError: Invalid frequency string provided ``` In pandas I get ``` >>> pd.date_range(""2020-01-01"", periods=1, freq=""W"") DatetimeIndex(['2020-01-05'], dtype='datetime64[ns]', freq='W-SUN') ``` ### Describe the solution you'd like _No response_ ### Describe alternatives you've considered Closing this issue as outside of scope ### Additional context _No response_","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6567/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 1094753761,I_kwDOAMm_X85BQJ3h,6143,"[FEATURE]: allow ""now"" as input to cftime_range",17162724,open,0,,,2,2022-01-05T21:21:42Z,2022-01-07T23:23:02Z,,CONTRIBUTOR,,,,"### Is your feature request related to a problem? For better or worse, I use `xr.cftime_range` interchangably with `pd.date_range`, mostly it is saves my importing pandas. Pandas allows a string named ""now"" to be parsed in `pd.date_range` ``` pd.date_range(""2000-01-01"", ""now"", freq=""H"") ``` It would be nice if `xr.cftime_range` could do the same (see additional context for Traceback). ### Describe the solution you'd like Something like assert `pd.date_range(""2000-01-01"", ""now"", freq=""H"")` == `xr.cftime_range(""2000-01-01"", ""now"", freq=""H"")` ### Describe alternatives you've considered Close as not within the scope of `xr.cftime_range` ### Additional context `xr.cftime_range(""2000-01-01"", ""now"", freq=""H"")` ```python-traceback ValueError Traceback (most recent call last) /tmp/ipykernel_15451/3415490845.py in ----> 1 xr.cftime_range(""2000-01-01"", ""now"", freq=""H"") /opt/userenvs/ray.bell/main/lib/python3.9/site-packages/xarray/coding/cftime_offsets.py in cftime_range(start, end, periods, freq, normalize, name, closed, calendar) 982 start = _maybe_normalize_date(start, normalize) 983 if end is not None: --> 984 end = to_cftime_datetime(end, calendar) 985 end = _maybe_normalize_date(end, normalize) 986 /opt/userenvs/ray.bell/main/lib/python3.9/site-packages/xarray/coding/cftime_offsets.py in to_cftime_datetime(date_str_or_date, calendar) 697 ""a calendar type must be provided"" 698 ) --> 699 date, _ = _parse_iso8601_with_reso(get_date_type(calendar), date_str_or_date) 700 return date 701 elif isinstance(date_str_or_date, cftime.datetime): /opt/userenvs/ray.bell/main/lib/python3.9/site-packages/xarray/coding/cftimeindex.py in _parse_iso8601_with_reso(date_type, timestr) 125 126 default = date_type(1, 1, 1) --> 127 result = parse_iso8601_like(timestr) 128 replace = {} 129 /opt/userenvs/ray.bell/main/lib/python3.9/site-packages/xarray/coding/cftimeindex.py in parse_iso8601_like(datetime_string) 115 if match: 116 return match.groupdict() --> 117 raise ValueError( 118 f""no ISO-8601 or cftime-string-like match for string: {datetime_string}"" 119 ) ValueError: no ISO-8601 or cftime-string-like match for string: now ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6143/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 809630390,MDU6SXNzdWU4MDk2MzAzOTA=,4916,Feature request: add opendap/netcdf authorization to backend_kwargs in open_[mf]dataset,17162724,open,0,,,1,2021-02-16T20:38:16Z,2021-06-18T15:43:48Z,,CONTRIBUTOR,,,,"This is a paraphrase of a SO Q: https://stackoverflow.com/questions/66178846/read-in-authorized-opendap-url-using-xarray **Is your feature request related to a problem? Please describe.** I would like to use xarray to read data stored at UCAR's Research Data Archive. To access data you have to create an account with a username and password. **Describe the solution you'd like** ``` url = """"https://rda.ucar.edu/thredds/dodsC/files/g/ds084.1/2020/20200101/gfs.0p25.2020010100.f000.grib2"" ds = xr.open_dataset(url, backend_kwargs={""auth"": (""username"", ""password"")}) ``` **Describe alternatives you've considered** You can read this file by create dot files in your home directory (https://stackoverflow.com/a/66179413/6046019) **Additional context** The idea of ""auth"" comes from siphon (https://unidata.github.io/siphon/latest/examples/Basic_Usage.html#sphx-glr-examples-basic-usage-py). ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4916/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 593029940,MDU6SXNzdWU1OTMwMjk5NDA=,3929,Feature request xarray.Dataset.from_dask_dataframe,17162724,open,0,,,7,2020-04-03T02:18:35Z,2021-05-19T03:52:00Z,,CONTRIBUTOR,,,,The method [`xarray.Dataset.to_dask_dataframe`](http://xarray.pydata.org/en/stable/generated/xarray.Dataset.to_dask_dataframe.html) exists and would like to make a feature request for the opposite `xarray.Dataset.from_dask_dataframe`. The conversation started over at `dask` but it was suggested by @shoyer to implement here first https://github.com/dask/dask/issues/6058,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3929/reactions"", ""total_count"": 5, ""+1"": 5, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 858115471,MDU6SXNzdWU4NTgxMTU0NzE=,5160,DOC: add dropdown for User Guide -> Reading and Writing Files,17162724,open,0,,,2,2021-04-14T17:39:17Z,2021-04-19T02:44:58Z,,CONTRIBUTOR,,,,"The docs current looks likes below. There are a lot of useful sections in Reading and Writing Files (http://xarray.pydata.org/en/latest/user-guide/io.html). Not sure if it's possible to add a drop down arrow (a third level) to see the sections from the table of contents on the left ![out](https://user-images.githubusercontent.com/17162724/114754578-bb340a00-9d26-11eb-8266-f381bd98ea4f.png) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5160/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 830515225,MDU6SXNzdWU4MzA1MTUyMjU=,5029,ENH: allow dimension to be collapsable in the html_repr,17162724,open,0,,,0,2021-03-12T21:45:55Z,2021-04-19T02:40:44Z,,CONTRIBUTOR,,,,https://github.com/pydata/xarray/discussions/5004,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5029/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 709648652,MDU6SXNzdWU3MDk2NDg2NTI=,4466,convert n-dim array to pandas dataframe,17162724,open,0,,,3,2020-09-27T02:08:55Z,2020-09-27T19:48:42Z,,CONTRIBUTOR,,,,"I just noticed that doing ``` da = xr.DataArray(np.random.rand(10, 10, 10), dims=('a', 'b', 'c')) da.to_pandas() ``` gives ``` --------------------------------------------------------------------------- KeyError Traceback (most recent call last) ~/local/bin/anaconda3/envs/test_env/lib/python3.8/site-packages/xarray/core/dataarray.py in to_pandas(self) 2397 try: -> 2398 constructor = constructors[self.ndim] 2399 except KeyError: KeyError: 3 During handling of the above exception, another exception occurred: ValueError Traceback (most recent call last) in ----> 1 da.to_pandas() ~/local/bin/anaconda3/envs/test_env/lib/python3.8/site-packages/xarray/core/dataarray.py in to_pandas(self) 2398 constructor = constructors[self.ndim] 2399 except KeyError: -> 2400 raise ValueError( 2401 ""cannot convert arrays with %s dimensions into "" 2402 ""pandas objects"" % self.ndim ValueError: cannot convert arrays with 3 dimensions into pandas objects ``` It is worth raising a suggestion (see below)? Or could you even do `da.to_dataset(name='da').to_dataframe()` under the hood. I feel the output would be what the user expects but I imagine that is not always true ``` da.to_dataset(name='da').to_dataframe() ``` ![Screenshot from 2020-09-26 22-08-23](https://user-images.githubusercontent.com/17162724/94354011-dc603200-0044-11eb-8bcb-05e3cc1b12e0.png) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4466/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue