home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 484243348

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
484243348 MDU6SXNzdWU0ODQyNDMzNDg= 3246 Transform variables into coordinates and associate them with another variable 54045683 closed 0     2 2019-08-22T22:21:19Z 2021-07-31T13:27:52Z 2021-07-31T13:27:52Z NONE      

I have a latent heat flux dataset in netcdf from CYGNSS / NASA. However, it only has one dimension ("sample"): ```python <xarray.Dataset> Dimensions: (sample: 1497904) Coordinates: * sample (sample) int32 0 1 2 3 4 ... 1497900 1497901 1497902 1497903 Data variables: lat (sample) float32 ... lon (sample) float32 ... lhf (sample) float32 ...

``` I need to turn the 'lat' (latitude) and 'lon' (longitude) variables into coordinates and associate them with the 'lhf' (latent heat flux) variable to have two spatial dimensions and plot a lhf map with matplotlib.

The "sample" coordinate is like a "time" coordinate, ranging from 1 to 1497903.

The final result should look something like this: python <xarray.Dataset> Dimensions: (lat: xxx, lon: xxx, sample: 1497904) Coordinates: * sample (sample) int32 0 1 2 3 4 ... 1497900 1497901 1497902 1497903 * lat (lat) float32 -39.9 -39.7 -39.5 -39.3 ... 39.3 39.5 39.7 39.9 * lon (lon) float32 0.1 0.3 0.5 0.7 0.9 ... 359.3 359.5 359.7 359.9 Data variables: lhf (sample, lat, lon) float32 ... Can anyone help me? Thank you!

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3246/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 0.544ms · About: xarray-datasette