ES-DOC / esdoc-cdf2cim

Maps NetCDF files to CIM documents
Other
1 stars 7 forks source link

scanner isn't accepting "no parent" as "parent_time_units" #5

Closed ceblanton closed 5 years ago

ceblanton commented 6 years ago

We (GFDL) are trying to test-publish some output for an experiment that has no parent. According to the CV, "no parent" is usually an acceptable answer for these cases. However the CDF scanner is throwing exceptions; e.g.

Traceback (most recent call last):
...
  File "/home/c2b/.local/lib/python2.7/site-packages/cdf2cim/parser.py", line 85, in parse
    _parse_cmip6_properties(cim2_properties, global_attributes, time_coords)
  File "/home/c2b/.local/lib/python2.7/site-packages/cdf2cim/parser.py", line 182, in _parse_cmip6_properties
    x = cf.Data([branch_time_in_parent], units=parent_time_units).dtarray[0]
  File "/home/c2b/.local/lib/python2.7/site-packages/cf/data/data.py", line 6106, in dtarray
    "Can't create date-time array from units {!r}".format(self.Units))
ValueError: Can't create date-time array from units <CF Units: no parent>
iaplasg commented 5 years ago

the same of exceptions, Is there a solution now?

davidhassell commented 5 years ago

This has been fixed in version 0.3.0, sorry for not closing this ticket sooner!