[CIG-SEISMO] gmsh2specfem3d.py error

Tamirat Bekele jimma.tamirat at aau.edu.et
Sun Apr 30 07:45:44 PDT 2017


Dear All,

I am new to Specfem3d and working hard to be proficient. Since CUBIT is a
commercial package, I prefer to use Gmsh to create mesh. After creating
mesh I tried to convert that mesh to Specfem format using gmsh2specfem3d.py
script provided with Specfem3d package. I have encountered series of
problem, the one which I couldn't be able to solve is the following:

Traceback (most recent call last):
 File "gmsh2specfem3d.py", line 395, in <module>
   OuvreGmsh('',Fic);
 File "gmsh2specfem3d.py", line 103, in OuvreGmsh
   NbPhysNames = int(string.split(lignes[PosPhys+1])[0])
UnboundLocalError: local variable 'PosPhys' referenced before assignment

After googling I declared PosPhys as global variable in 'OuvreGmsh'
function and it worked, but the following error happend:

Traceback (most recent call last):
 File "gmsh2specfem3d.py", line 394, in <module>
   OuvreGmsh('',Fic);
 File "gmsh2specfem3d.py", line 102, in OuvreGmsh
   NbPhysNames = int(string.split(lignes[PosPhys+1])[0])
ValueError: invalid literal for int() with base 10: '2.2'


Please could you kindly help me on that. Thanks!

With regards,
Tamirat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/cig-seismo/attachments/20170430/6d329e09/attachment.html>


More information about the CIG-SEISMO mailing list