home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 921062321

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/5786#issuecomment-921062321 https://api.github.com/repos/pydata/xarray/issues/5786 921062321 IC_kwDOAMm_X8425kux 89942016 2021-09-16T16:43:52Z 2021-09-16T16:43:52Z NONE

@max-sixty after digging through the data sets using ncdump and h5dump we confirmed that the data does look good. In doing so, I created a small sample data set and program that I believe narrows down where the problem lies. I've attached the file used for testing (it's zipped, Github doesn't support .nc4 files), but here is the code snippet: ```python import xarray as xr

data = xr.open_dataset('test_slice.nc4') print(data) print(data.indexes['lat']) ```

And here is the output: <xarray.Dataset> Dimensions: (lat: 11, lon: 1, time: 1) Coordinates: * time (time) datetime64[ns] 2018-01-30T09:00:00 * lat (lat) float32 10.43 10.44 10.45 10.46 ... 10.51 10.52 10.53 * lon (lon) float32 -68.0 Data variables: analysed_sst (time, lat, lon) float32 ... Attributes: (12/47) Conventions: CF-1.5 title: Daily MUR SST, Final product summary: A merged, multi-sensor L4 Foundation SST anal... references: http://podaac.jpl.nasa.gov/Multi-scale_Ultra-... institution: Jet Propulsion Laboratory history: created at nominal 4-day latency; replaced nr... ... ... project: NASA Making Earth Science Data Records for Us... publisher_name: GHRSST Project Office publisher_url: http://www.ghrsst.org publisher_email: ghrsst-po@nceo.ac.uk processing_level: L4 cdm_data_type: grid Float64Index([10.430000305175781, 10.4399995803833, 10.449999809265137, 10.460000038146973, 10.470000267028809, 10.479999542236328, 10.489999771118164, 10.5, 10.510000228881836, 10.520000457763672, 10.529999732971191], dtype='float64', name='lat')

From the data source, the latitudes are of type float32, but when they are accessed via data.indexes['lat'] they are now float64. We believe this conversion may be why the values are changing. If possible, could you point me the right direction for addressing this? I don't know if there is someone knowledgeable about this, if there's a way I can handle it in my program, or if another Issue ticket is the best route.

Thank you!

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