issues: 441222339
This data as json
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
441222339 | MDU6SXNzdWU0NDEyMjIzMzk= | 2946 | std interprets continents as zero not nan | 10809480 | closed | 0 | 5 | 2019-05-07T13:06:32Z | 2023-12-02T02:46:37Z | 2023-12-02T02:46:36Z | NONE | hi there, i couldnt find anything related yet. My issue is that I have to calculated a large dataset of time series data of world wide datasets. I always have this weird bug, that the std calculations interprets nan differently as mean caluculations. Here is my typical code: ```python import xarray as xr import glob import numpy as np data = xr.open_mfdataset([r"C:\Users\atraumue\Desktop\test\dt_global_allsat_phy_l4_20170101_20180115.nc",r"C:\Users\atraumue\Desktop\test\dt_global_allsat_phy_l4_20170102_20180115.nc"], parallel=True, concat_dim="time") data = data.drop("lon_bnds") data = data.drop("lat_bnds") data = data.drop("ugosa") data = data.drop("ugos") data = data.drop("sla") data = data.drop("vgos") data = data.drop("vgosa") data = data.drop("err") data = data.drop("ssh") data = data.drop("nv") adt = data.drop("velocity") adt.mean(dim="time", skipna=True).to_netcdf(r"C:\Users\atraumue\Desktop\calcsadt_mean_2004_2018_month5.nc") adt.std(dim="time", skipna=True,ddof=1).astype(np.float64).to_netcdf(r"C:\Users\atraumue\Desktop\calcsadt_std_2004_2018_month5.nc") data.close() adt.close() ``` Dropbox to files: https://www.dropbox.com/sh/yuf114u143mj2l3/AABuQfC5wu4nrWDH4GsGgFyJa?dl=0 I dont know why this occures, for mean calulcations there is no problem with the continents. As a dirty work around i just overlay them. Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2946/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
not_planned | 13221727 | issue |