Skip to content

slicing expression exceeds the number of dimensions of the variable #1

@jamaldabbeek

Description

@jamaldabbeek

Hi, I am trying to extract the daily precipitation, at a single location

import eobs
import datetime
latitude = 23.031
longitude = 35.257
eobs = eobs.Eobs('D:/work/Resiliance_WB/data/Precipitation/E-OBS/precipitation/rr_ens_mean_0.1deg_reg_v24.0e.nc')
t = eobs[datetime.datetime(2001, 1,1), latitude, longitude]

This returns:
_Traceback (most recent call last):

_File "D:\work\Resiliance_WB\data\vs30\scripts\extract_data.py", line 16, in
t = eobs[datetime.datetime(2001, 1,1,0), latitude, longitude]

File "D:\work\Resiliance_WB\data\Precipitation\E-OBS\eobs.py", line 140, in getitem
return self.variable[date_idx, lat_idx, lon_idx]

File "netCDF4_netCDF4.pyx", line 4384, in netCDF4._netCDF4.Variable.getitem

File "C:\Users\jamal\Anaconda2\envs\OQ_EVV\lib\site-packages\netCDF4\utils.py", line 344, in _StartCountStride
raise ValueError("slicing expression exceeds the number of dimensions of the variable")

ValueError: slicing expression exceeds the number of dimensions of the variable__

I am not sure if I am doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions