NetCDF ".variables"

Post here any question you encounter when running the scripts of the yambo-py suite. Post here problem strictly to the python interface as problem coming from the yambo runs should go in the appropriate subforum.

Moderators: amolina, miranda.henrique

NetCDF ".variables"

Postby sponce » Tue Sep 19, 2017 9:47 am

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
Samuel Poncé
Department of Materials, University of Oxford
sponce
 
Posts: 12
Joined: Tue Oct 04, 2011 9:52 am

Re: NetCDF ".variables"

Postby miranda.henrique » Tue Sep 19, 2017 4:53 pm

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
Henrique Pereira Coutada Miranda
Institute of Condensed Matter and Nanosciences
http://henriquemiranda.github.io/
UNIVERSITÉ CATHOLIQUE DE LOUVAIN
miranda.henrique
 
Posts: 16
Joined: Thu Jul 23, 2015 2:34 pm


Return to Yambo-py

Who is online

Users browsing this forum: No registered users and 1 guest