ESMG / pyroms

Python tools for the Regional Ocean Modeling System (ROMS)
Other
138 stars 88 forks source link

Away with netcdftime! #20

Open hadfieldnz opened 4 years ago

hadfieldnz commented 4 years ago

In pyroms/pyroms/cf.py on the python3 branch, cftime is imported, with a fallback to netcdftime:

try:
    import cftime
except:
    import netcdftime

This is OK, but later in class time, netcdftime.utime is invoked, which will fail if cftime was successfully imported.

Given that cftime replaced netcdftime in March 2018 and is now available everywhere, I suggest dropping references to netcdftime.

I will prepare a pull request.

kshedstrom commented 4 years ago

Thank you! I will look into your PR once I'm back in the office next week.