SPECFEM / specfem3d_globe

SPECFEM3D_GLOBE simulates global and regional (continental-scale) seismic wave propagation.
GNU General Public License v3.0
90 stars 95 forks source link

How to get vtk files of vp, vs and rho in global scale? #825

Closed zhanglei911 closed 10 months ago

zhanglei911 commented 10 months ago

Dear guys,

I can get vp.bin, vs.bin, *rho.bin files in the DATABASES_MPI directory, but how should I present the vp, vs and rho of the meshes in ParaView? Thanks in advance!

Lei Zhang

homnath commented 10 months ago

Hi Lei,

You can use "xcombine_vol_data_vtu". Attached is the sample Python code. You can change file_head = 'div'

to for example, file_head='vp'

But make sure all directories and files are in proper place.

Best, Hom Nath


Hom Nath Gharti, PhD Assistant Professor | Digital Earth Scientist https://www.digitalearthscience.com/ Department of Geological Sciences and Geological Engineering Miller Hall 314, 36 Union St Queen’s University Kingston, ON K7L 3N6, Canada https://digitalearthscience.com/

Queen’s University is situated on traditional Anishinaabe and Haudenosaunee Territory.https://www.queensu.ca/encyclopedia/t/traditional-territories


From: Lei Zhang @.> Sent: Tuesday, September 19, 2023 9:21 AM To: SPECFEM/specfem3d_globe @.> Cc: Subscribed @.***> Subject: [SPECFEM/specfem3d_globe] How to get vtk files of vp, vs and rho in global scale? (Issue #825)

Dear guys,

I can get vp.bin, vs.bin, *rho.bin files in the DATABASES_MPI directory, but how should I present the vp, vs and rho of the meshes in ParaView? Thanks in advance!

Lei Zhang

— Reply to this email directly, view it on GitHubhttps://github.com/SPECFEM/specfem3d_globe/issues/825, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABMCQ4WOZFCN5FC3DAJPJ6LX3GL7FANCNFSM6AAAAAA46IY5GY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

zhanglei911 commented 10 months ago

Hi Lei, You can use "xcombine_vol_data_vtu". Attached is the sample Python code. You can change file_head = 'div' to for example, file_head='vp' But make sure all directories and files are in proper place. Best, Hom Nath --------------------------------------- Hom Nath Gharti, PhD Assistant Professor | Digital Earth Scientist https://www.digitalearthscience.com/ Department of Geological Sciences and Geological Engineering Miller Hall 314, 36 Union St Queen’s University Kingston, ON K7L 3N6, Canada https://digitalearthscience.com/ Queen’s University is situated on traditional Anishinaabe and Haudenosaunee Territory.https://www.queensu.ca/encyclopedia/t/traditional-territories ____ From: Lei Zhang @.> Sent: Tuesday, September 19, 2023 9:21 AM To: SPECFEM/specfem3d_globe @.> Cc: Subscribed @.> Subject: [SPECFEM/specfem3d_globe] How to get vtk files of vp, vs and rho in global scale? (Issue #825) Dear guys, I can get vp.bin, vs.bin, rho.bin files in the DATABASES_MPI directory, but how should I present the vp, vs and rho of the meshes in ParaView? Thanks in advance! Lei Zhang — Reply to this email directly, view it on GitHub<#825>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABMCQ4WOZFCN5FC3DAJPJ6LX3GL7FANCNFSM6AAAAAA46IY5GY. You are receiving this because you are subscribed to this thread.Message ID: **@.***>

zhanglei911 commented 10 months ago

Dear Hom,

Thank you very much! Sorry that I can not find the attached python code you provided because I can not log in my primary e-mail since I have graduated. Could you please send it to zhangl@mail.iggcas.ac.cn? Many thanks!

Lei

homnath commented 10 months ago

Oh, just noticed we cannot attach .py file. I zipped it and sent it to you.

Best, Hom Nath


Hom Nath Gharti, PhD Assistant Professor | Digital Earth Scientist https://www.digitalearthscience.com/ Department of Geological Sciences and Geological Engineering Miller Hall 314, 36 Union St Queen’s University Kingston, ON K7L 3N6, Canada https://digitalearthscience.com/

Queen’s University is situated on traditional Anishinaabe and Haudenosaunee Territory.https://www.queensu.ca/encyclopedia/t/traditional-territories


From: Lei Zhang @.> Sent: Tuesday, September 19, 2023 1:11 PM To: SPECFEM/specfem3d_globe @.> Cc: Hom Nath Gharti @.>; Comment @.> Subject: Re: [SPECFEM/specfem3d_globe] How to get vtk files of vp, vs and rho in global scale? (Issue #825)

Dear Hom,

Thank you very much! Sorry that I can not find the attached python code you provided because I can not log in my primary e-mail since I have graduated. Could you please send it to @.**@.>? Many thanks!

Lei

— Reply to this email directly, view it on GitHubhttps://github.com/SPECFEM/specfem3d_globe/issues/825#issuecomment-1726109818, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABMCQ4XPNPVUDQQ74W5NT2LX3HG3VANCNFSM6AAAAAA46IY5GY. You are receiving this because you commented.Message ID: @.***>

homnath commented 10 months ago

Hi Lei,

For the single snapshot, you can simply use the command like this: ./bin/xcombine_vol_data_vtu first_processor_id last_processor_id filename_without_dot_bin input_directory output_directory resolution_id

where resolution_id is 0 for low and 1 for high resolution.

For example: ./bin/xcombine_vol_data_vtu 0 100 velocity_Z_it000400 ./OUTPUT_FILES/DATABASES_MPI ./OUTPUT_FILES 0


Hom Nath Gharti, PhD Assistant Professor | Digital Earth Scientist https://www.digitalearthscience.com/ Department of Geological Sciences and Geological Engineering Miller Hall 314, 36 Union St Queen’s University Kingston, ON K7L 3N6, Canada https://digitalearthscience.com/

Queen’s University is situated on traditional Anishinaabe and Haudenosaunee Territory.https://www.queensu.ca/encyclopedia/t/traditional-territories


From: Lei Zhang @.> Sent: Wednesday, September 20, 2023 7:32 AM To: SPECFEM/specfem3d_globe @.> Cc: Hom Nath Gharti @.>; Comment @.> Subject: Re: [SPECFEM/specfem3d_globe] How to get vtk files of vp, vs and rho in global scale? (Issue #825)

Dear Hom,

Thanks a lot! It works perfectly for movie generation, which makes snapshots at given time steps. However, here I need Vp, Vs stuff, which is not related to the time steps but constant parameters. How should I modify the code for my situation. Thanks in advace.

Best,

Lei

— Reply to this email directly, view it on GitHubhttps://github.com/SPECFEM/specfem3d_globe/issues/825#issuecomment-1727543403, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABMCQ4QWY4RJ4IFGUANG37DX3LH3JANCNFSM6AAAAAA46IY5GY. You are receiving this because you commented.Message ID: @.***>

zhanglei911 commented 10 months ago

Dear Hom,

Thank you very much! It works!

Best,

Lei