Page 1 of 1

NetCDF ".variables"

Posted: Tue Sep 19, 2017 9:47 am
by sponce
Dear Yambopy developers,

First of all, great job with the yambopy software. Its easy to install and to use !
This is just a small bugreport.

I was trying to use yambopy to plot the head of the static dielectric function with q.

The python script yambopy does not seem to work with python 2.7 for me.

However, I was able to make it work by adding ".variables" to all calls to netcdf database in the module "yambopy/dbs/em1sdb.py"
This is actually the way I learned how to call netcdf database. Does it work without it in python 3 or something?

For example replacing:

Code: Select all

self.alat = database['LATTICE_PARAMETER'][:]
by

Code: Select all

self.alat = database.variables['LATTICE_PARAMETER'][:]
make it works.

Hope this helps,
Best,
Samuel

Re: NetCDF ".variables"

Posted: Tue Sep 19, 2017 4:53 pm
by miranda.henrique
Hi Samuel,

Thank you very much for the positive feedback and for pointing out this bug.
I think this issue is related to some change in the netCDF4 python library.
The latest commit should fix the issue.

Let me know in case it does not work still!

Cheers,
Henrique