New GMPE

104 views
Skip to first unread message

Ya-Ting Lee

unread,
Aug 9, 2017, 1:28:49 AM8/9/17
to OpenQuake Users
Hello, 
I want to use a new equation to calculate the strong ground motion PSHA.
The equation which I want to use is Lee et al.,2015 
I put the new equation Lee2015 in this two place
/usr/lib/python2.7/dist-packages/openquake/hazardlib/tests/gsim
/usr/lib/python2.7/dist-packages/openquake/hazardlib/gsim

how to make it become lee2015.pyc file?
I also got wrong message.:
failed to open file"/usrlib/python2.7/dist-packagee/openquake/hazardlib/gsim/lee_2015.py/":perssion denied.

Could you give me some suggestion?
thank you very much!

yating
20170727_163812.jpg
lee_2015.py
job_Taiwan_site.ini
gmpe_logic_tree_dur_170727.xml
source_model_logic_tree.xml
tai_site_model_kuo.xml

Daniele Viganò

unread,
Aug 9, 2017, 7:39:48 AM8/9/17
to openqua...@googlegroups.com

Dear Yating,

you are trying to change a system file, you don't have permission for it. You must use 'sudo' (i.e. sudo gedit /usrlib/python2.7/dist-packagee/openquake/hazardlib/gsim/lee_2015.py) to be able to open/edit those files.

Anyway, this approach is not the best one if are willing to develop/change OQ code. You should instead install the OpenQuake Engine using the installation procedure for developers; you can find it here: https://github.com/gem/oq-engine/blob/master/doc/installing/development.md

Cheers,
Daniele

--
You received this message because you are subscribed to the Google Groups "OpenQuake Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openquake-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
DANIELE VIGANÒ | System Administrator | Skype dennyv85 | +39 0382 5169882
GLOBAL EARTHQUAKE MODEL | working together to assess risk

Ya-Ting Lee

unread,
Aug 16, 2017, 4:15:13 AM8/16/17
to OpenQuake Users
Dear Daniele, 

thank you for your kindly reply.

I put the new gmpe in "/usr/lib/python2.7/dist-packagee/openquake/hazardlib/gsim/lee_2015.py"
however after I did python lee_2015.py and I got 

/usr/lib/python2.7/dist-packagee/openquake/__init__.py:1:
" User Warning: Module dap was already imported from None, but /usr/lib/python2.7/dist-packages is being added to sys.path"

and I cannot get lee_2015.pyc

could you give me any suggestion to solve the problem.

thank you very much.

Yating


Daniele Viganò於 2017年8月9日星期三 UTC+8下午7時39分48秒寫道:

Daniele Viganò

unread,
Aug 21, 2017, 8:53:44 AM8/21/17
to openqua...@googlegroups.com

Dear Yating,

as stated in my previous reply, system installation (and files located under /usr) are not meant to be changed by the user; any change may break the entire OpenQuake installation. If you are willing to change the OpenQuake code you should install it via https://github.com/gem/oq-engine/blob/master/doc/installing/development.md

Cheers,
Daniele

Reply all
Reply to author
Forward
0 new messages