RVIC icon indicating copy to clipboard operation
RVIC copied to clipboard

Convolution failing on sample data

Open manueldeljesus opened this issue 7 years ago • 11 comments

RVIC convolution is failing on the sample dataset. The error seems to occur while writing a restart file, in particular in lines 425, 441, 459 and 475 of rvic/core/variables.py. The look like the next ones:

for key, val in iteritems(share.timemgr_rst_curr_tod):
    if val:
        setattr(timemgr_rst_curr_tod, key, val)

The error that shows up is the one below

ERROR:write>> setattr(timemgr_rst_step_sec, key, val)
ERROR:write>>   File "netCDF4/_netCDF4.pyx", line 3679, in netCDF4._netCDF4.Variable.__setattr__ (netCDF4/_netCDF4.c:38607)
ERROR:write>> ValueError
ERROR:write>> :
ERROR:write>> could not convert string to float: '0, 86400'

Specifically it occurs while writing valid_range. If I comment the lines above, the program finishes without any error. I am pretty sure that those lines are there for a reason, however, I do not know how to solve the issue.

I have installed RVIC through anaconda in OS X Sierra, although I was getting this very same error on Ubuntu. I installed the cdo libraries from Homebrew because Anaconda's version did not seem to be working.

manueldeljesus avatar Mar 08 '17 11:03 manueldeljesus

can you put your convolution configuration file somewhere we can see it?

jhamman avatar Mar 09 '17 04:03 jhamman

Yes, of course. I took the sample one and modified the paths. I attach it to this message.

rvic.convolution.rasm.cfg.txt

Your help is much appreciated.

manueldeljesus avatar Mar 09 '17 07:03 manueldeljesus

I am having the same problem and I installed it using python 2.7 and python 3.5. The message error is slitly different but it crashes at the same line. Is there a way to solve this error?

corinat avatar Jun 14 '17 08:06 corinat

I edited the source code to remove the parts that were failing. It creates the file without problem but some of the metadata do not appear. I use it as a temporary workaround while the problem is properly solved.

manueldeljesus avatar Jun 14 '17 09:06 manueldeljesus

May I ask where did you do the editing? Is this file rvic/core/variables.py?

corinat avatar Jun 14 '17 09:06 corinat

Yes. The lines on the file are referenced in the original message. I just commented those lines and everything worked.

manueldeljesus avatar Jun 14 '17 10:06 manueldeljesus

Thank you, Manuel :)

corinat avatar Jun 14 '17 10:06 corinat

Hello folks, Is there any workaround for this problem? I am having an exact same problem for sample dataset (Gunnison). Thanks

frezersa avatar Jan 20 '18 04:01 frezersa

@frezersa , @manueldeljesus, @corinat -- If anyone is open to opening a pull request with a fix to this, that would very welcome. In the short term, I don't have any time to help debug this or work on RVIC.

jhamman avatar Jan 24 '18 16:01 jhamman

I fix this error by changing "valid_range" to "range" in ~/rvic/core/share.py between line 277 to 298

frezersa avatar Feb 05 '18 14:02 frezersa

@frezersa I had the same issue and your solution works. I'm wondering what's the reason that this change fixed the problem? Seems to me that it's merely a name change. Thanks!

yixinmao avatar Apr 11 '18 19:04 yixinmao