home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 731743161

This data as json

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/4598#issuecomment-731743161 https://api.github.com/repos/pydata/xarray/issues/4598 731743161 MDEyOklzc3VlQ29tbWVudDczMTc0MzE2MQ== 6628425 2020-11-22T12:49:53Z 2020-11-22T12:49:53Z MEMBER

I see, yeah, timezones with cftime are tricky. Why are you using cftime_range to populate the time variable though in this case? Why not pandas.date_range?

The problematic variable in this dataset is "tau". If we drop that variable the dates are automatically decoded to pandas-compatible times (perhaps that's not an option for you though): ``` In [1]: import xarray as xr

In [2]: xr.open_dataset('https://tds.hycom.org/thredds/dodsC/GLBy0.08/latest', drop_variables=["tau"]) Out[2]: <xarray.Dataset> Dimensions: (depth: 40, lat: 4251, lon: 4500, time: 101) Coordinates: * lat (lat) float64 -80.0 -79.96 -79.92 ... 89.92 89.96 90.0 * lon (lon) float64 0.0 0.07996 0.16 0.24 ... 359.8 359.8 359.9 * depth (depth) float64 0.0 2.0 4.0 6.0 ... 3e+03 4e+03 5e+03 * time (time) datetime64[ns] 2020-11-16T12:00:00 ... 2020-11-29 time_run (time) datetime64[ns] ... Data variables: time_offset (time) datetime64[ns] ... surf_el (time, lat, lon) float32 ... water_u (time, depth, lat, lon) float32 ... water_u_bottom (time, lat, lon) float32 ... water_v (time, depth, lat, lon) float32 ... water_v_bottom (time, lat, lon) float32 ... water_temp (time, depth, lat, lon) float32 ... water_temp_bottom (time, lat, lon) float32 ... salinity (time, depth, lat, lon) float32 ... salinity_bottom (time, lat, lon) float32 ... Attributes: classification_level: UNCLASSIFIED distribution_statement: Approved for public release. Distribution unli... downgrade_date: not applicable classification_authority: not applicable institution: Fleet Numerical Meteorology and Oceanography C... source: HYCOM archive file history: archv2ncdf2d ;\nFMRC Best Dataset comment: p-grid field_type: instantaneous Conventions: CF-1.4, NAVO_netcdf_v1.1 _CoordSysBuilder: ucar.nc2.dataset.conv.CF1Convention cdm_data_type: GRID featureType: GRID location: Proto fmrc:GLBy0.08_930_FMRC ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  748229907
Powered by Datasette · Queries took 1.528ms · About: xarray-datasette