Disagg_by_src

255 views
Skip to first unread message

Tatiana Goded

unread,
Oct 20, 2020, 7:11:26 PM10/20/20
to OpenQuake Users

Hi,

I am trying the latest engine now and I've seen we can disaggrehgate by source, which is very useful for us.

However, I have tried it and I do not get any disaggregation by source, simply a list of poes by intensity measures.

The way I have done it is by using the following commands:

calculation_mode = disaggregation
disagg_by_src = true

Is there anything else I need to do to have the poes distributed per source name? I understand from other groups that they won't be per magnitude or distance, but just having them per source name will be really useful for us.

Thank you very much and best regards,

Tatiana

Tatiana Goded

unread,
Oct 20, 2020, 8:43:39 PM10/20/20
to OpenQuake Users
Hi again,

Just to add that I seem to only get mean hazard curves as an output. And also that I am using MMI as intensity levels and an intensity prediction equation (instead of a GMPE), in case that is helpful. I assume that the disagg_by_src can be done for any given GMPE/IPE and intensity measures, but it would be good if someone can confirm that for me.

Kind regards,

Tatiana

Michele Simionato

unread,
Oct 21, 2020, 11:18:49 AM10/21/20
to OpenQuake Users
On Wednesday, October 21, 2020 at 2:43:39 AM UTC+2 Tatiana Goded wrote:
Hi again,

Just to add that I seem to only get mean hazard curves as an output. And also that I am using MMI as intensity levels and an intensity prediction equation (instead of a GMPE), in case that is helpful. I assume that the disagg_by_src can be done for any given GMPE/IPE and intensity measures, but it would be good if someone can confirm that for me.


You get only mean hazard curves because you have not specified individual_curves=true.
disagg_by_src works for MMI too. 

Here is how to extract the disagg_by_src information from the datastore:

$ oq extract disagg_by_src <calc_id>

This will generate an .npz file file that then can be read with numpy. 

In [1]: import numpy                                                                        

In [2]: npz = numpy.load('./disagg_by_src_XXX.npz')                                          

In [3]: npz['array']   
array([(b'src1', 5.51267622e-05), (b'src2', 2.81138709e-05)],
      dtype=[('src_id', 'S16'), ('poe', '<f8')])

HTH,

            Michele

Jian Ma

unread,
Oct 21, 2020, 11:28:01 AM10/21/20
to openqua...@googlegroups.com
Hi   Michele,
Do you know what problem with my result?

I have sent the input file for your email.

Thanks!
Jian 
Jian MA
Ph.D Candidate
Academy of Disaster Reduction and Emergency Management, Ministry of Emergency Management & Ministry of Education
Beijing Normal University
(86)188-1157-3353


Michele Simionato <mic...@openquake.org> 于2020年10月21日周三 上午11:18写道:
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/openquake-users/62002869-49dc-4a86-9063-a5c4d35a1241n%40googlegroups.com.

Tatiana Goded

unread,
Oct 22, 2020, 4:50:44 PM10/22/20
to OpenQuake Users
Thank you, Michele. That was really useful and it worked. However, I only got one npz file, even though I asked for a disaggregation for several intensity levels. Shouldn't I have got one file per intensity level? How can I do that?

Also, is there an intention to include magnitude and distance to the source in teh disaggregatiin some time in the future? That would be really helpful for us to have too.

Thank you very much and kind regards,

Tatiana

Michele Simionato

unread,
Oct 23, 2020, 2:36:38 AM10/23/20
to OpenQuake Users
On Thursday, October 22, 2020 at 10:50:44 PM UTC+2 Tatiana Goded wrote:
Thank you, Michele. That was really useful and it worked. However, I only got one npz file, even though I asked for a disaggregation for several intensity levels. Shouldn't I have got one file per intensity level? How can I do that?

My bad, I forgot to mention the general form of the extract command.
If you want the contribution for the first site, first IMT, first realization, first level the command to use is:

$ oq extract "disagg_by_src?site_id=0&imt_id=0&rlz_id=0&lvl_id=0" <calc_id>
(oq extract "disagg_by_src <calc_id> is a shortcut for that).

If you want the first site, first IMT, first realization and second level:

$ oq extract "disagg_by_src?site_id=0&imt_id=0&rlz_id=0&lvl_id=1" <calc_id>

etc. In this way one can extract a lot of small npz files. The plan is to give a better interface in the future, right now there is only the bare functionality, as you see.


Also, is there an intention to include magnitude and distance to the source in teh disaggregatiin some time in the future? That would be really helpful for us to have too.

We have MagDist disaggregation, but without the source information. There is no plan to add that at the moment.
HTH,
              Michele
 

Tatiana Goded

unread,
Oct 26, 2020, 7:02:53 PM10/26/20
to OpenQuake Users
Thank you, Michele. That is really helpful for us.

Kind regards,

Tatiana
Reply all
Reply to author
Forward
0 new messages