home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1577957904

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
1577957904 I_kwDOAMm_X85eDboQ 7517 Getting information on netcdf file with unlimited dimensions 2853966 open 0     3 2023-02-09T14:08:44Z 2023-04-29T03:40:24Z   NONE      

What is your issue?

When one reads a netCDF file, there is not solution to determine if there is an unlimited dimension, and determine which one.

I really need to be able to handle that. I need to process a variable, and write the result with the exact same informations about dimensions and coordinates, with all attributes and characteristics.

Thanks,

Olivier

``` import xarray as xr, os

print ( '==== Get an example file' ) file = 'tas_Amon_IPSL-CM6A-LR_piControl_r1i1p1f1_gr_185001-234912.nc' h_file = f"https://vesg.ipsl.upmc.fr/thredds/fileServer/cmip6/CMIP/IPSL/IPSL-CM6A-LR/piControl/r1i1p1f1/Amon/tas/gr/v20200326/{file}"

print ( '\n ==== Getting file ') os.system ( f"wget --no-clobber {h_file}")

print ( '\n ==== File header : this file has an unlimited dimension "time"' ) os.system ( f"ncdump -h {file} | head")

dd = xr.open_dataset ( file, decode_times=True, use_cftime=True)

xr.set_options ( display_expand_attrs=True) print ( '\n ==== General information : no information about the unlimited dimension(s)' ) print (dd)

print ( '\n ==== Dimensions : no information about the unlimited dimension(s)') print ( dd.dims )

print ( '\n === Attributes : no information about the unlimited dimension(s)' ) for attr in dd.attrs : print ( f'{attr} : {dd.attrs[attr]}' ) ```

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

Links from other tables

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