home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 180503054

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
180503054 MDU6SXNzdWUxODA1MDMwNTQ= 1025 Extract value for given time latitude and longitude 12929592 closed 0     5 2016-10-02T09:04:32Z 2016-10-03T09:07:31Z 2016-10-03T09:07:31Z NONE      

I would like to loop through a list of dates, latitudes and longitudes and extract the maximum daily temperature from an hourly dataset of netcdf files. This appears more difficult than I thought it would be because I cannot seem to use the given latitude and longitude (even though I know the latitude and longitude matching the grid point).

ds = xray.open_mfdataset('/DATA/WRF///*Temp.nc') ds_variable=ds['Temp'] dailymax=ds_variable.resample('D', dim='time', how='max')

MaxTempattime=dailymax.sel(time='2015-02-01') MaxTempatpoint=MaxTempattime.isel(latitude=-39.1495, longitude=140.848) #this is where the problem occurs

print MaxTempatpoint.values

I see 'slice' can take a given latitude and longitude but I can't set a range for each of the thousands of points I need. Should I be using some type of index for latitude and longitude? Any feedback on the best approach for extracting a value at a given time, latitude and longitude will be greatly appreciated.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1025/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

  • 0 rows from issues_id in issues_labels
  • 5 rows from issue in issue_comments
Powered by Datasette · Queries took 0.626ms · About: xarray-datasette