Skip to content

OverflowError: date value out of range in num2date  #659

@lyashevska

Description

@lyashevska

Hi,

I am trying to convert this object using num2date. However I get OverflowError: date value out of range
What could possibly cause this behaviour and how it can be fixed. Thanks.

<type 'netCDF4._netCDF4.Variable'>
float64 time(time)
units: days since 1800-01-01 00:00:0.0
long_name: Time
actual_range: [-657073. -656739.]
delta_t: 0000-01-00 00:00:00
avg_period: 0030-00-00 00:00:00
prev_avg_period: 0000-00-07 00:00:00
ltm_range: [ 58804. 69730.]
standard_name: time
axis: T
unlimited dimensions: time
current shape = (12,)
filling off

times = f.variables['time']

times[:]
array([-657073., -657042., -657014., -656983., -656953., -656922.,
-656892., -656861., -656830., -656800., -656769., -656739.])

times.units
u'days since 1800-01-01 00:00:0.0'

netCDF4.version
'1.2.7'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions