Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Tutorial 4 - Geophysics (Seismology): Add JN #8

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

yvonnefroehlich
Copy link
Member

@yvonnefroehlich yvonnefroehlich commented Nov 9, 2024

This PR adds the Jupyter notebook for Tutorial 4 - Geophysics (Seismology).

Feel free to fill the subsections with suggestions for code and docs🙂.

Preview:

Fixes: #6

@yvonnefroehlich yvonnefroehlich changed the title WIP: Add JN for tutorial 4 Geophysics (Seismology) WIP: Tutorial 4 - Geophysics (Seismology): Add JN Nov 9, 2024
@jhtong33
Copy link
Collaborator

Hi @yvonnefroehlich
do we use grdproject or project ?
Since grdproject is specified for a region rather than individual point-to-point.

see also: https://www.pygmt.org/v0.13.0/gallery/images/cross_section.html#sphx-glr-gallery-images-cross-section-py

@yvonnefroehlich
Copy link
Member Author

Hi @yvonnefroehlich do we use grdproject or project ? Since grdproject is specified for a region rather than individual point-to-point.

see also: https://www.pygmt.org/v0.13.0/gallery/images/cross_section.html#sphx-glr-gallery-images-cross-section-py

Yep, I am sorry, I mean project I mistyped this 🙁.

Copy link
Member Author

@yvonnefroehlich yvonnefroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, @jhtong33 , for getting started here 👍!

I made a few updates:

  • I prefer to use the Scientific colour maps by F. Crameri, i.e., for topography, "oleron".
  • I reduced the resolution of the image showing within the Jupyter notebook to keep the file size smaller.
  • I figured out that list input is supported for the center and endpoint parameters of project.
  • Fix typo grdproject to project.
  • So minor code style improvements.
  • I think we should be consistent and use either single (') or double (") quotation marks; I prefer double quotation marks.

@jhtong33
Copy link
Collaborator

Thanks a lot, @jhtong33 , for getting started here 👍!

I made a few updates:

  • I prefer to use the Scientific colour maps by F. Crameri, i.e., for topography, "oleron".
  • I reduced the resolution of the image showing within the Jupyter notebook to keep the file size smaller.
  • I figured out that list input is supported for the center and endpoint parameters of project.
  • Fix typo grdproject to project.
  • So minor code style improvements.
  • I think we should be consistent and use either single (') or double (") quotation marks; I prefer double quotation marks.

Great! Thanks for your updates.
I used a remote dataset to convert data into a .txt file, which I then provided as input materials for pygmt.xyz2grd.

@jhtong33
Copy link
Collaborator

Hi @yvonnefroehlich
I have one idea that plotting beachballs for magnitude >6 events to make the tutorial more comprehensive.
However, If time make it challenging to cover all details within a 45-minute session, it would be great to focus on one significant event as an example.

see also: https://www.isc.ac.uk/cgi-bin/web-db-run?request=COMPREHENSIVE&out_format=CATCSV&searchshape=RECT&bot_lat=-40&top_lat=0&left_lon=-90&right_lon=-60&ctr_lat=&ctr_lon=&radius=&max_dist_units=deg&srn=&grn=&start_year=2022&start_month=1&start_day=01&start_time=00%3A00%3A00&end_year=2023&end_month=1&end_day=01&end_time=00%3A00%3A00&min_dep=&max_dep=&min_mag=6&max_mag=&req_mag_type=MW&req_mag_agcy=&include_links=on

@yvonnefroehlich
Copy link
Member Author

Hi @yvonnefroehlich I have one idea that plotting beachballs for magnitude >6 events to make the tutorial more comprehensive. However, If time make it challenging to cover all details within a 45-minute session, it would be great to focus on one significant event as an example.

see also: https://www.isc.ac.uk/cgi-bin/web-db-run?request=COMPREHENSIVE&out_format=CATCSV&searchshape=RECT&bot_lat=-40&top_lat=0&left_lon=-90&right_lon=-60&ctr_lat=&ctr_lon=&radius=&max_dist_units=deg&srn=&grn=&start_year=2022&start_month=1&start_day=01&start_time=00%3A00%3A00&end_year=2023&end_month=1&end_day=01&end_time=00%3A00%3A00&min_dep=&max_dep=&min_mag=6&max_mag=&req_mag_type=MW&req_mag_agcy=&include_links=on

Regarding plotting the seismicity as color- and size-coded circles: Actually, is more or less the same as I do already in part "1.3 Create a geographical map of the earthquakes" of tutorial 2 (please see https://github.com/GenericMappingTools/agu24workshop/blob/add-jn-pd-gpd/book/tut2_spec_pd_gpd.ipynb). Reading data in to a pandas.Dataframe and plotting it with color- and size-coding. Maybe we just provide the data and they should try to write the code on their own as an additional task?

Some updates from my side

  • Code for plotting one single earthquake as beachball
  • More documentation
  • Links to the PyGMT documentation for the used functions and methods
  • Usage of SC by F. Crameri
  • Reduced resolution for all images shown within the JN to keep the file small

@jhtong33
Copy link
Collaborator

Regarding plotting the seismicity as color- and size-coded circles: Actually, is more or less the same as I do already in part "1.3 Create a geographical map of the earthquakes" of tutorial 2 (please see https://github.com/GenericMappingTools/agu24workshop/blob/add-jn-pd-gpd/book/tut2_spec_pd_gpd.ipynb). Reading data in to a pandas.Dataframe and plotting it with color- and size-coding. Maybe we just provide the data and they should try to write the code on their own as an additional task?

Oh! Great! I agree that they can write the code on their own. Perhaps we can write more details or provide the example figure with them. How do you think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tutorial 4 - Geophysics (Seismology): Ideas and basic concept
2 participants