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

gCAP3D: Add gCAP3D installation #219

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

gCAP3D: Add gCAP3D installation #219

wants to merge 2 commits into from

Conversation

core-man
Copy link
Member

@core-man core-man commented Jul 22, 2021

Description of proposed changes

Preview: https://seismo-learn.org/sitepreview/seismo-learn/software/gcap-install/gcap3d/install/

Addresses #42.

Refer to https://blog.seisman.info/gcap-install/

PRs for new software/tutorials

  • Software metadata is complete
  • The "last updated date" in the metadata page is up-to-date
  • All links work
  • You're listed as the author(s) in the metadata page
  • Anyone who have made significant contributions (e.g., review) to
    the tutorials are listed in the meteda page
  • Add a test to weekly CI jobs

PRs for bugs/improvements

  • You're listed as the proofreader in the metadata page

Comment on lines +47 to +48
SUBS = fft.o Complex.o radiats.o grid3d.o futterman.o sacio.o trap.o \
nrutil.o jacobi.o eigsrt.o
Copy link
Member Author

@core-man core-man Jul 22, 2021

Choose a reason for hiding this comment

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

README.md in gCAP3D says Sept. 17, 2019 LZ remove the dependence on Numerical Recipes.

I find it works if I don't download NR, so I will remove this line in the makefile.

Copy link
Member

Choose a reason for hiding this comment

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

田冬冬好像说过3d不需要nr

@github-actions
Copy link
Contributor

This comment was written by the Continuous Documentation bot!

@core-man
Copy link
Member Author

core-man commented Jul 22, 2021

gCAP3D has some dependent packages, e.g., fk, SAC, GMT4, pssac, and so on. I think they could be classified by three to more:

  • Green Functions: fk or other codes to calculte synthetics
  • SAC lib: SAC
  • Plotting: GMT4 and pssac are used to plot waveforms and results. I think we could use GMT6 to rewrite those scripts instead.
  • Anything else? TauP?

@core-man core-man mentioned this pull request Jul 22, 2021
5 tasks
@wangliang1989
Copy link
Member

gCAP3D has some dependent packages, e.g., fk, SAC, GMT4, pssac, and so on. I think they could be classified by three to more:

  • Green Functions: fk or other codes to calculte synthetics
  • SAC lib: SAC
  • Plotting: GMT4 and pssac are used to plot waveforms and results. I think we could use GMT6 to rewrite those scripts instead.
  • Anything else? TauP?

我没用过3d,但是算格林函数的肯定不是fk,fk是1d,不是3d。我建议最终能给用户的是gmt6的画图

Copy link
Member

@wangliang1989 wangliang1989 left a comment

Choose a reason for hiding this comment

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

这个我需要挨着做一遍才能确定是否正确,我论文在下周内就完成了,因为7月31号是deadline

@core-man
Copy link
Member Author

我没用过 3d,但是算格林函数的肯定不是fk,fk是1d,不是3d。我建议最终能给用户的是gmt6的画图

fk 负责 1D,3D 方法负责 3D.

@wangliang1989
Copy link
Member

我写的那个ohmycap能不能移动到你这个网站来,我觉得自己一个人维护很累@core-man

@wangliang1989
Copy link
Member

我写的那个ohmycap能不能移动到你这个网站来,我觉得自己一个人维护很累@core-man

或者有了3d,就不需要1d

我不知道为什么最近很多人来问我cap

@core-man
Copy link
Member Author

core-man commented Jul 22, 2021

我写的那个ohmycap能不能移动到你这个网站来,我觉得自己一个人维护很累@core-man

这个网站不是用来维护和编写软件,而是软件的教程。我看了一下你的 ohmycap,大部分是教程和实例,如果你愿意把教程和实例等一点点迁移过来,一块维护自然更有利于教程的延续性。

不过可能不需要所有的都照搬过来,这里的软件尽量以直接从官方版本下载的源码开始。如果涉及到大量的源码修改,可能需要考虑是否有必要直接向作者反映,直接修改官方源码。

或者有了3d,就不需要1d

根据我的理解,二者的区别只是计算的格林函数是不是1D还是3D的。朱老师的 gCAP3D 只是给了 3D 的接口吧,其他步骤都是一样的。

@wangliang1989
Copy link
Member

我写的那个ohmycap能不能移动到你这个网站来,我觉得自己一个人维护很累@core-man

这个网站不是用来维护和编写软件,而是软件的教程。我看了一下你的 ohmycap,大部分是教程和实例,如果你愿意把教程和实例等一点点迁移过来,一块维护自然更有利于教程的延续性。

不过可能不需要所有的都照搬过来,这里的软件尽量以直接从官方版本下载的源码开始。如果涉及到大量的源码修改,可能需要考虑是否有必要直接向作者反映,直接修改官方源码。

或者有了3d,就不需要1d

根据我的理解,二者的区别只是计算的格林函数是不是1D还是3D的。朱老师的 gCAP3D 只是给了 3D 的接口吧,其他步骤都是一样的。

你先做吧,我有空了会来看

SUBS = fft.o Complex.o radiats.o grid3d.o futterman.o sacio.o trap.o \
nrutil.o jacobi.o eigsrt.o

- ``cap3D`` 规则中 ``-lsac -lsacio`` 后加上 ``-lm``
Copy link
Member Author

Choose a reason for hiding this comment

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

SACLIB 后将上 -no-pie 参数,见 https://seismo-learn.org/software/fk/install/

@wangliang1989 wangliang1989 self-requested a review August 11, 2021 13:13
Copy link
Member

@wangliang1989 wangliang1989 left a comment

Choose a reason for hiding this comment

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

gcap3d的正常运行除了依赖sac,还需要fk、gmt4和那个算3d格林函数的软件,后三项完全没有提及

+CAP = cap3D cap_dir mtdcmp radpttn

-SUBS = fft.o Complex.o radiats.o grid3d.o futterman.o sacio.o trap.o
+SUBS = fft.o Complex.o radiats.o grid3d.o futterman.o sacio.o trap.o \
Copy link
Member

Choose a reason for hiding this comment

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

既然不需要NR了,就不要提这个了

- 添加 ``FC=gfortran`` 指定使用 gfortran 编译器
- 给 ``FFLAGS`` 加上 ``-ffixed-line-length-none`` 使得 Fortran 一行可以超过 72 字符
- 添加 ``CC = gcc`` 指定使用 gcc 编译器
- 添加 ``SACHOME = /opt/sac`` 指定 SAC 软件的安装路径,用户需根据自身实际
Copy link
Member

Choose a reason for hiding this comment

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

如果正常安装了sac,应该用环境变量中的SACHOME

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

Successfully merging this pull request may close these issues.

2 participants