Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with convert period function when nanosecond in timestamp #57

Open
paolap opened this issue Jan 17, 2019 · 2 comments
Open

issue with convert period function when nanosecond in timestamp #57

paolap opened this issue Jan 17, 2019 · 2 comments

Comments

@paolap
Copy link
Member

paolap commented Jan 17, 2019

File "/home/581/pxp581/.local/lib/python3.6/site-packages/clef/code.py", line 255, in convert_periods
freq=freq[frequency]))
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-18.04/lib/python3.6/site-packages/pandas/core/indexes/datetimes.py", line 2749, in date_range
closed=closed, **kwargs)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-18.04/lib/python3.6/site-packages/pandas/core/indexes/datetimes.py", line 381, in new
ambiguous=ambiguous)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-18.04/lib/python3.6/site-packages/pandas/core/indexes/datetimes.py", line 476, in _generate
start = Timestamp(start)
File "pandas/_libs/tslibs/timestamps.pyx", line 635, in pandas._libs.tslibs.timestamps.Timestamp.new
File "pandas/_libs/tslibs/conversion.pyx", line 275, in pandas._libs.tslibs.conversion.convert_to_tsobject
File "pandas/_libs/tslibs/conversion.pyx", line 484, in pandas._libs.tslibs.conversion.convert_str_to_tsobject
File "pandas/_libs/tslibs/conversion.pyx", line 453, in pandas._libs.tslibs.conversion.convert_str_to_tsobject
File "pandas/_libs/tslibs/np_datetime.pyx", line 121, in pandas._libs.tslibs.np_datetime.check_dts_bounds
pandas._libs.tslibs.np_datetime.OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 2270-01-01 00:00:00

File causing this is one of MIROC5, rcp26, Amon

@paolap
Copy link
Member Author

paolap commented Jan 17, 2019

This should be fixed now, it was caused by something we didn't need anymore, not pushed yet

@paolap
Copy link
Member Author

paolap commented Jan 18, 2019

Other new error probably from piControl file:

Traceback (most recent call last):
File "../ua6decom/ua6_decom.py", line 131, in
result = code.search(s,project='cmip5',**ua6)
File "/home/581/pxp581/.local/lib/python3.6/site-packages/clef/code.py", line 165, in search
return local_query(session, project, **args)
File "/home/581/pxp581/.local/lib/python3.6/site-packages/clef/code.py", line 215, in local_query
gdict['time_complete'] = time_axis(gdict['periods'],gdict['fdate'],gdict['tdate'])
File "/home/581/pxp581/.local/lib/python3.6/site-packages/clef/code.py", line 272, in time_axis
t = datetime.strptime(sp[i][1],'%Y%m%d') + timedelta(days=1)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-18.07/lib/python3.6/_strptime.py", line 565, in _strptime_datetime
tt, fraction = _strptime(data_string, format)
File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-18.07/lib/python3.6/_strptime.py", line 362, in _strptime
(data_string, format))
ValueError: time data '512' does not match format '%Y%m%d'

I'm adding a try: except: to the time_axis evaluation as a temporary patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant