Hi EQRM users,

 

This will be the first in a series of emails over the next few days detailing some changes to EQRM since my previous mail to this list.

 

This feature is the ability to save and process disaggregated hazard information.

 

If the eqrm_param save_motion is True, EQRM will place in the output_dir two new directories

 

<site_tag>_motion

<site_tag>_sites

 

These contain numpy binary arrays that are used by 2 new postprocessing functions. The motion directory contains the disaggregated motion arrays, bedrock and soil (if use_amplification is True), and the sites directory contains site lat and lon arrays.

 

The 2 postprocessing functions are:

 

events_shaking_a_site

generate_motion_csv

 

Inside the demo/postprocessing directory you’ll see some scripts that show the usage of these.

 

Each function requires an output directory containing the following directories and files (all of these are produced in output_dir when save_motion is True)

 

<site_tag>_event_set

<site_tag>_motion

<site_tag>_sites

eqrm_flags.py

 

If you are running a script to use these functions after a simulation, the simplest way is to place the python file in the same directory as the setdata file and set the output directory and site tag parameters to be the same as in the setdata file.

 

events_shaking_a_site

 

Parameters:

output_dir

site_tag

site_lat = latitude of site

site_lon = longitude of site (function will pick the closest site by distance if no match found)

atten_period = attenuation period of the disaggregated motion

is_bedrock = if True output bedrock data, False output soil data

 

e.g. from the demo file

 

from eqrm_code.postprocessing import events_shaking_a_site

 

params = {

'output_dir': './output',

'site_tag': 'newc',

'site_lat': -30,

'site_lon': 150,

'atten_period': 1.0,

'is_bedrock': True

}

 

output_filename = events_shaking_a_site(params['output_dir'],

                                        params['site_tag'],

                                        params['site_lat'],

                                        params['site_lon'],

                                        params['atten_period'],

                                        params['is_bedrock'])

 

For the data in ./output/ this will produce

 

./output/newc_bedrock_SA_events_ap1.0_lat-32.7984_lon151.6475.csv

 

generate_motion_csv

 

Creates the old motion files that were generated previously when save_motion is True. It is no longer the case that these files get generated automatically but you can still generate them using this function.

 

Parameters:

output_dir

site_tag

is_bedrock

 

e.g. from the demo file

 

params = {

'output_dir': './output',

'site_tag': 'newc',

'is_bedrock': True

}

 

output_filenames = generate_motion_csv(params['output_dir'],

                                       params['site_tag'],

                                       params['is_bedrock'])

 

For the data in ./output/ this will produce

 

./output/newc_bedrock_SA_motion_0_spawn_0_gmm_0_rm_0.txt

./output/newc_bedrock_SA_motion_1_spawn_0_gmm_0_rm_0.txt

./output/newc_bedrock_SA_motion_0_spawn_0_gmm_0_rm_1.txt

./output/newc_bedrock_SA_motion_1_spawn_0_gmm_0_rm_1.txt

./output/newc_bedrock_SA_motion_0_spawn_0_gmm_0_rm_2.txt

./output/newc_bedrock_SA_motion_1_spawn_0_gmm_0_rm_2.txt

 

Please check out the functionality and I would appreciate the feedback.

 

Cheers,

Ben

 

 

Ben Cooper
Software Developer  |  Earth Monitoring and Hazards

Minerals and Natural Hazards Division  |  GEOSCIENCE AUSTRALIA

____________________________________________________________

Phone:  +61 2 6249 9247    Fax:  +61 2 6249 9999

Email:  Ben.Cooper@ga.gov.au    Web:  www.ga.gov.au

Cnr Jerrabomberra Avenue and Hindmarsh Drive Symonston ACT

GPO Box 378 Canberra ACT 2601 Australia

Applying geoscience to Australia’s most important challenges

 

Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks.
-------------------------------------------------------------------------------------------------------------------------