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

utime no longer a class in cftime #248

Open
RuthG opened this issue May 2, 2023 · 0 comments
Open

utime no longer a class in cftime #248

RuthG opened this issue May 2, 2023 · 0 comments
Labels

Comments

@RuthG
Copy link

RuthG commented May 2, 2023

I'm putting together some new SST input files and found that in recent cftime installations the utime class is not supported.
This seems to be quite an old update, and breaks src/python/extra/scripts/calendar_calc.py in my current environment.
I found I can get the code running with the below, based on cftime's docs & noting its updates say that utime is defunct.
As I'm not clear on what utime originally should have done I thought I'd raise this as an issue rather than immediately changing anything.

If/when I do amend this, I'll try to add some comments to the code as well to make it easier to navigate/see how files interrelate.


def day_number_to_datetime_array(time_in, calendar_type, units_in):

    #cdftime = utime(units_in, calendar = calendar_type)

    date_out = cftime.num2date(time_in, units_in, calendar = calendar_type)

    return date_out
@RuthG RuthG added the bug label May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant