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

Convolution failing on sample data #96

Open
manueldeljesus opened this issue Mar 8, 2017 · 11 comments
Open

Convolution failing on sample data #96

manueldeljesus opened this issue Mar 8, 2017 · 11 comments

Comments

@manueldeljesus
Copy link

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.

@jhamman
Copy link
Member

jhamman commented Mar 9, 2017

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

@manueldeljesus
Copy link
Author

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.

@corinat
Copy link

corinat commented Jun 14, 2017

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?

@manueldeljesus
Copy link
Author

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.

@corinat
Copy link

corinat commented Jun 14, 2017

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

@manueldeljesus
Copy link
Author

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

@corinat
Copy link

corinat commented Jun 14, 2017

Thank you, Manuel :)

@frezersa
Copy link
Contributor

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

@jhamman
Copy link
Member

jhamman commented Jan 24, 2018

@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.

@frezersa
Copy link
Contributor

frezersa commented Feb 5, 2018

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

@yixinmao
Copy link

@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!

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

5 participants