tag:blogger.com,1999:blog-83295768117095100382024-03-13T13:51:39.490+09:00EKBO不定期、思いつきメモ。Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comBlogger438125tag:blogger.com,1999:blog-8329576811709510038.post-76369556278741090442023-12-28T19:00:00.004+09:002023-12-28T23:50:56.831+09:00JAGURS on (intel) Mac w/ Homebrew<p> 2023年12月27日現在の macOS Ventura 13.6.3 + Homebrew でのJAGURSのコンパイルについて再整理しておく。</p><p><br /></p><p></p><ul style="text-align: left;"><li>gcc ... gfortran を使うので、gcc と gfortran をbrew で入れて、/usr/local/bin/gcc を使う。</li><ul><li>FC=/usr/local/bin/gfortran</li><li>CC=/usr/local/bin/gcc</li></ul><li>pro ... メインのpro は、9.3.1 なので、おそらく動かない?ので、7.2.1 なproj@7 パッケージを使う。</li><ul><li> PROJ4_DIR=/usr/local/opt/proj@7</li></ul><li>netcdf ... netcdf-fortran パッケージを入れる</li><li>fftw3 ... Homebrew のパッケージ名が fftw に変わってた</li></ul><div>% brew install gcc gfortran proj@7 netcdf-fortran fftw</div><p></p><p><br /></p><p>Makefile.gfortran をベースにして、以下の修正。</p><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">-FC=mpif90</span></p><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">+FC=/usr/local/bin/gfortran</span></p><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;"><br /></span></p><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">-PROJ4_DIR=$(HOME)/local</span></p><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">-CC=gcc</span></p><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">+PROJ4_DIR=/usr/local/opt/proj@7</span></p><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">+CC=/usr/local/bin/gcc-13</span></p><div><span style="font-variant-ligatures: no-common-ligatures;"><br /></span></div><div><span style="font-variant-ligatures: no-common-ligatures;"><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">-FFTW3_INCLUDE_DIR=$(HOME)/local/include</span></p></span></div><div><span style="font-variant-ligatures: no-common-ligatures;"><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">+FFTW3_INCLUDE_DIR=/usr/local/include</span></p></span></div><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><br /></span></div></span></div><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">-NETCDF=$(HOME)/local</span></p></span></div></span></div><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">+NETCDF=/usr/local</span></p></span></div></span></div><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><br /></span></div></span></div></span></div><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">-MPI=ON</span></p></span></div></span></div></span></div><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">+MPI=OFF</span></p></span></div></span></div></span></div></blockquote><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;">
</span></p><div><span style="font-variant-ligatures: no-common-ligatures;">
<div><span style="font-variant-ligatures: no-common-ligatures;">
<div><span style="font-variant-ligatures: no-common-ligatures;">
<p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><br /></p><p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">特殊な手続きは無しでコンパイル出来るようになったな。。。この記事の役割もほぼ終わったな。</p><p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><br /></p><p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">input/ の中でそのままテスト計算(MPI部分はtsun.parから削除) on 1.4GHz dual cores Core i7</p></span></div></span></div></span></div><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><div><span style="font-variant-ligatures: no-common-ligatures;"><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px; text-align: left;"><span style="font-variant-ligatures: no-common-ligatures;">../src/jagurs par=tsun.par 4113.94s user 52.32s system 120% cpu 57:42.04 total</span></p></span></div></span></div></span></div></blockquote><p> </p><p> </p><div><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-variant-ligatures: no-common-ligatures;"><p style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-emoji: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;"><br /></span></p><p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><br /></p></span></span></span></div>Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-60423197797387487402022-02-06T08:03:00.004+09:002023-02-21T07:22:01.740+09:00JAGURS on MacOS Monterey with homebrew<p> iMac 24" (M1)と iMac 27" (Intel) で改めてJAGURSで計算できる環境を作ったのでそのまとめ.</p><p><span style="color: red;">【訂正】2022.4.23</span></p><p><span style="color: red;">homebrew で, proj@7 が入っていることを同僚が教えてくれました.ので,proj-4.9.3は必要なく,Makefileで/opt/homebrew/Cellar/proj@7/7.2.1を/opt/homebrew/lib より前に指定すれば大丈夫なようです.かつ,最新版JAGURS(<a href="https://github.com/jagurs-admin/jagurs/commit/d81e29dc265d8a29173b3f8fab60283a80408c1d" target="_blank">D0516</a>)で,<a href="http://ekbo.blogspot.com/2020/11/jagurs-on-macos-big-sur-with-homebrew.html">2020年に書いた mapproject.c の対応</a>が本流に入ってるので,proj@7で無修正で動くようになりました.</span></p><p>ライブラリとして,netcdf, fftw3, proj4 が必要だけど,proj4は新しいのだと動かないので古いのを持ってくる.netcdfとfftw3は homebrew ので問題なし.</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: left;">% brew install netcdf netcdf-fortran fftw3</p></blockquote><p>proj4は,<a href="https://proj.org/download.html#past-releases" target="_blank">past-release</a> から proj-4.9.3.tar.gz を持ってきました.</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p>% ./configure --prefix=$HOME/local</p><p>% make</p><p>% make install</p></blockquote><p><br /></p><p>JAGURSのコンパイルは,Makefile.gfortran をベースにしました.</p><p>% rm Makefile (Makefile.SC_ICEに向いてるので)</p><p>% cp Makefile.gfortran Makefile</p><p><br /></p><p>MPIはなし,とりあえず /usr/bin/gcc</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier; font-size: x-small;">% rcsdiff -u Makefile</span></p><p><span style="font-family: courier; font-size: x-small;">===================================================================</span></p><p><span style="font-family: courier; font-size: x-small;">RCS file: Makefile,v</span></p><p><span style="font-family: courier; font-size: x-small;">retrieving revision 1.1</span></p><p><span style="font-family: courier; font-size: x-small;">diff -u -r1.1 Makefile</span></p><p><span style="font-family: courier; font-size: x-small;">--- Makefile 2022/02/04 21:52:49 1.1</span></p><p><span style="font-family: courier; font-size: x-small;">+++ Makefile 2022/02/04 22:58:07</span></p><p><span style="font-family: courier; font-size: x-small;">@@ -1,18 +1,18 @@</span></p><p><span style="font-family: courier; font-size: x-small;"> # FC: Specify Fortran90 compiler command.</span></p><p><span style="font-family: courier; font-size: x-small;">-FC=mpif90</span></p><p><span style="font-family: courier; font-size: x-small;">+FC=gfortran</span></p><p><span style="font-family: courier; font-size: x-small;"><br /></span></p><p><span style="font-family: courier; font-size: x-small;"> # Added for displacement.</span></p><p><span style="font-family: courier; font-size: x-small;"> # PRJ4_DIR: Specify PROJ.4 install directory.</span></p><p><span style="font-family: courier; font-size: x-small;"> # CC&CFLAGS: Specify C compiler command and flags.</span></p><p><span style="font-family: courier; font-size: x-small;"> PROJ4_DIR=$(HOME)/local</span></p><p><span style="font-family: courier; font-size: x-small;">-CC=gcc</span></p><p><span style="font-family: courier; font-size: x-small;">+CC=/usr/bin/gcc</span></p><p><span style="font-family: courier; font-size: x-small;"> CFLAGS=-g -I$(PROJ4_DIR)/include</span></p><p><span style="font-family: courier; font-size: x-small;"><br /></span></p><p><span style="font-family: courier; font-size: x-small;"> # BASE: Specify basic compiler options.</span></p><p><span style="font-family: courier; font-size: x-small;"> BASE=-cpp -fconvert=big-endian</span></p><p><span style="font-family: courier; font-size: x-small;"><br /></span></p><p><span style="font-family: courier; font-size: x-small;"> # FFTW3_INCLUDE_DIR: Specify FFTW3 include directory.</span></p><p><span style="font-family: courier; font-size: x-small;">-FFTW3_INCLUDE_DIR=$(HOME)/local/include</span></p><p><span style="font-family: courier; font-size: x-small;">+FFTW3_INCLUDE_DIR=/opt/homebrew/include</span></p><p><span style="font-family: courier; font-size: x-small;"><br /></span></p><p><span style="font-family: courier; font-size: x-small;"> # FFTW3_LIB: Specify linker options to link FFTW3.</span></p><p><span style="font-family: courier; font-size: x-small;"> FFTW3_LIB=-lfftw3</span></p><p><span style="font-family: courier; font-size: x-small;">@@ -21,7 +21,7 @@</span></p><p><span style="font-family: courier; font-size: x-small;"> OPT=-O2 -fopenmp -I$(FFTW3_INCLUDE_DIR)</span></p><p><span style="font-family: courier; font-size: x-small;"><br /></span></p><p><span style="font-family: courier; font-size: x-small;"> # NETCDF: Specify the path to NetCDF library.</span></p><p><span style="font-family: courier; font-size: x-small;">-NETCDF=$(HOME)/local</span></p><p><span style="font-family: courier; font-size: x-small;">+NETCDF=/opt/homebrew</span></p><p><span style="font-family: courier; font-size: x-small;"><br /></span></p><p><span style="font-family: courier; font-size: x-small;"> # LIBS: Specify linker options.</span></p><p><span style="font-family: courier; font-size: x-small;"> LIBS=-L$(NETCDF)/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lsz -L$(PROJ4_DIR)/lib -lproj $(FFTW3_LIB) -lm</span></p><p><span style="font-family: courier; font-size: x-small;">@@ -40,7 +40,7 @@</span></p><p><span style="font-family: courier; font-size: x-small;"><br /></span></p><p><span style="font-family: courier; font-size: x-small;"> # MPI=ON: MPI version is made.</span></p><p><span style="font-family: courier; font-size: x-small;"> # Else, serial version is made.</span></p><p><span style="font-family: courier; font-size: x-small;">-MPI=ON</span></p><p><span style="font-family: courier; font-size: x-small;">+MPI=OFF</span></p><p><span style="font-family: courier; font-size: x-small;"><br /></span></p><p><span style="font-family: courier; font-size: x-small;"> # USE_ALLTOALLV=ON: Use MPI_Alltoallv for inter-nest communications.</span></p><p><span style="font-family: courier; font-size: x-small;"> # Else, MPI_Allreduce is used.</span></p></blockquote><p> </p><p>せっかくなので,inputにあるサンプルをベースにして,ベンチマーク.</p><p>Intel ... 3.6GHz 10コア第10世代Intel Core i9プロセッサ</p><p>M1 ... 4つの高性能コアと4つの高効率コアを搭載した8コアCPU、8コアGPU、16コアNeural Engineを持つApple M1チップ</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p>% cat gridfile.dat</p><p>SD01 SD01 1 bathy.SD01.grd disp.SD01.grd</p><p>SD02 SD01 0 bathy.SD02.grd disp.SD02.grd</p><p>SD03 SD02 0 bathy.SD03.grd disp.SD03.grd</p></blockquote><p><br /></p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p>tsun.par:</p><p>dt=0.5</p><p>tend=21600</p><p>itmap=1200</p></blockquote><p><br /></p><p>こんな感じの設定で,M1はフルに8コアなので,Intelもそれに合わせて OMP_NUM_THREADS=8 に制限して実行した.</p><p>Intel ... All 5187.004 [s](デフォ20coresで 4823.238[s])</p><p>M1 ... All 5174.547 [s]</p><p><br /></p>Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-48112039137164761302020-11-25T16:30:00.010+09:002021-05-31T08:40:36.784+09:00JAGURS on MacOS Big Sur with homebrew<p>自分の環境のパッケージ管理を MacPorts から homebrew に乗り換えたりしたので改めてJAGURS を作り直してみる.ソースコードは,<a href="https://github.com/jagurs-admin/jagurs">github</a> から latest release になってる <a href="https://github.com/jagurs-admin/jagurs/releases/tag/JAGURS-D_V0515a">V0515a</a> を持ってくる.使う環境は以下の通り:</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">MacBook Air (13-inch, 2017)</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">2.2GHz dual core Intel Core i7</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">8GB 1600MHz DDR3 memory</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">Big Sur</span></p></blockquote></blockquote><p>ライブラリのインストール</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: left;"><span style="font-family: courier;">% brew install gmt fftw</span></p></blockquote></blockquote><p> どうやら,proj_api.h が標準include pathに入ってくれなくなった?ようです.ので,</p><p></p><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><p style="text-align: left;"><span style="font-family: courier;">% find /usr/local -name proj_api.h</span></p></blockquote><p>で探して,出てきたディレクトリを </p><p></p><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><p></p><p style="text-align: left;"><b><span style="font-family: courier;">PROJ4_DIR=/usr/local/Cellar/proj@7/7.2.1</span></b></p><p></p></blockquote><p></p><p>のように設定して下さい.以下のMakefileでは設定されていません (汚い).</p><p></p><p><a href="https://quaketm.bosai.go.jp/~naotaka/JAGURS/Makefile.BigSur.Homebrew">Makefile</a>の編集(編集後のファイルをリンク先に置いておきます)</p><p>Makefile@ -> Makefile.SC_ICE されてるので,とりあえず解除してから編集しています.編集箇所は,コンパイラを gcc-10, gfortran-10 にして,ライブラリ関係を /usr/local に設定. -lfftw が必要.MPI= なしに設定.-openmp は -o penmp として機能してしまうので, -fopenmp に修正.</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">% rm Makefile</span></p><p><span style="font-family: courier;">% cp Makefile.SC_ICE Makefile</span></p><p><span style="font-family: courier;">% rcsdiff Makefile</span></p><p><span style="font-family: courier;">===================================================================</span></p><p><span style="font-family: courier;">RCS file: Makefile,v</span></p><p><span style="font-family: courier;">retrieving revision 1.1</span></p><p><span style="font-family: courier;">diff -r1.1 Makefile</span></p><p><span style="font-family: courier;">2c2</span></p><p><span style="font-family: courier;">< FC=ifort</span></p><p><span style="font-family: courier;">---</span></p><p><span style="font-family: courier;">> FC=/usr/local/bin/gfortran-10</span></p><p><span style="font-family: courier;">7,9c7,9</span></p><p><span style="font-family: courier;">< PROJ4_DIR=/home/G10004/t-katou/JAGURS/local</span></p><p><span style="font-family: courier;">< CC=icc</span></p><p><span style="font-family: courier;">< CFLAGS=-g -traceback -I$(PROJ4_DIR)/include</span></p><p><span style="font-family: courier;">---</span></p><p><span style="font-family: courier;">> PROJ4_DIR=/usr/local</span></p><p><span style="font-family: courier;">> CC=/usr/local/bin/gcc-10</span></p><p><span style="font-family: courier;">> CFLAGS=-I$(PROJ4_DIR)/include</span></p><p><span style="font-family: courier;">12c12</span></p><p><span style="font-family: courier;">< BASE=-fpp -assume byterecl</span></p><p><span style="font-family: courier;">---</span></p><p><span style="font-family: courier;">> BASE=-cpp</span></p><p><span style="font-family: courier;">18c18</span></p><p><span style="font-family: courier;">< FFTW3_LIB=-mkl=sequential</span></p><p><span style="font-family: courier;">---</span></p><p><span style="font-family: courier;">> FFTW3_LIB=-lfftw3</span></p><p><span style="font-family: courier;">23c23</span></p><p><span style="font-family: courier;">< OPT=-O2 -openmp -openmp-report2 -I$(FFTW3_INCLUDE_DIR)</span></p><p><span style="font-family: courier;">---</span></p><p><span style="font-family: courier;">> OPT=-O2 -fopenmp</span></p><p><span style="font-family: courier;">27c27</span></p><p><span style="font-family: courier;">< NETCDF=/opt/atlocal/netcdf/4.1.3</span></p><p><span style="font-family: courier;">---</span></p><p><span style="font-family: courier;">> NETCDF=/usr/local</span></p><p><span style="font-family: courier;">31c31</span></p><p><span style="font-family: courier;">< LIBS=-i-dynamic -L$(NETCDF)/lib -lnetcdff -lnetcdf -L/opt/atlocal/supplibs/lib -lhdf5_hl -lhdf5 -lcurl -lsz -L$(PROJ4_DIR)/lib -lproj $(FFTW3_LIB) # for NetCDF4!</span></p><p><span style="font-family: courier;">---</span></p><p><span style="font-family: courier;">> LIBS=-L$(NETCDF)/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lcurl -lsz -lproj $(FFTW3_LIB) # for NetCDF4!</span></p><p><span style="font-family: courier;">47c47</span></p><p><span style="font-family: courier;">< MPI=ON</span></p><p><span style="font-family: courier;">---</span></p><p><span style="font-family: courier;">> MPI=</span></p></blockquote><p><br /></p><p>あと,mapproject.c の修正が必要です.<span style="font-family: courier;">#include <proj_api.h></span><span style="font-family: courier;"> の前に </span><span style="font-family: courier;">#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H</span><span style="font-family: courier;"> を追加します.</span></p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">% rcsdiff -p mapproject.c</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">===================================================================</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">RCS file: mapproject.c,v</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">retrieving revision 1.1</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">diff -p -r1.1 mapproject.c</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">*** mapproject.c 2020/11/25 05:49:41 1.1</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">--- mapproject.c 2020/11/25 05:50:08</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">***************</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">*** 1,6 ****</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">--- 1,7 ----</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;"> #include <stdio.h></span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;"> #include <string.h></span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;"> #include <stdlib.h></span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">+ #define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H</span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;"> #include <proj_api.h></span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;"><br /></span></p></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;"> static projPJ pj_tmerc, pj_latlong;</span></p></blockquote></blockquote><p> </p>Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-15215825198311760692020-07-24T18:39:00.002+09:002022-02-10T13:59:38.590+09:00Postfix on MacOS<div dir="ltr" style="text-align: left;" trbidi="on">
なんか試行錯誤してやっとたどり着いたので記録.自宅などで,private net に隠れた Mac から,プロバイダのSMTPサーバ経由で外にメールを送る設定をする手順.<br />
<br />
まず,relayhost を main.cf に設定する.<br />
relayhost = smtpserver.example.com:port#<br />
<br />
あとは巷にあふれるSMTPの設定."Mac postfix gmail" とかで検索すると情報いっぱいある.<br />
smtp_sasl_auth_enable = yes<br />
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd<br />
smtp_sasl_security_options = noanonymous<br />
smtp_sasl_tls_security_options = noanonymous<br />
smtp_sasl_mechanism_filter = plain<br />
smtp_use_tls = yes<br />
<br />
で,最後にやっと解決できたのは,メールの from アドレスの書き換え.SMTP認証が通っても,from が正しくないと通してくれない.うちの場合は, "Sender address rejected: not owned by user xxx@xxxx.example.com" と言われました.ので,これを強制的に書き換えてあげる必要があって,sender_canonical_maps に変換テーブルを作ってあげる.<br />
sender_canonical_maps = hash:/etc/postfix/sender_canonical<br />
local_header_rewrite_clients = static:all<br />
<br />
中身↓<br />
naotaka@(hostname).local email-address-in-provider<br />
<br />% sudo postmap /etc/postfix/sasl_passwd<br />
% sudo postmap /etc/postfix/sender_canonical</div><div dir="ltr" style="text-align: left;" trbidi="on">
<br />
(余談)<br />
From アドレスの書き換えには, main.cf の myhostname を書き換えることでも対応可能なようにも思えるのですが,そこでは,naotaka@$myhostname になってしまいます.この naotaka がプロバイダのアカウントと一致してないといけないので,弾かれてしまいました.かつ,xxx@$myhostname の xxx が Mac に存在しないと不達になるという罠もあるので, myhostname は無視で,sender_canonical が正解でした.<br />
<br />
(残課題)<br />
SMTPUTF8 is required, but was not offered by host [provider-smtp-server] というエラーは出ていて,どうやら subject に日本語が入っていると通らなくて,crontab でディレクトリに日本語が入ってるスクリプトを起動してると subject に日本語が入ってしまって送れないという罠が残ってます.これはsmtp server 側の機能不足?か,client でencode してあげれば良いだけ?<br />
<br />
(参考) <a href="https://tech-lab.sios.jp/archives/12289">https://tech-lab.sios.jp/archives/12289</a><br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-61606843924559370402020-06-08T09:07:00.001+09:002020-06-09T15:12:59.479+09:00Matplotlib on Mac<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://ekbo.blogspot.com/2020/02/matplotlib-on-mac-homebrew.html">http://ekbo.blogspot.com/2020/02/matplotlib-on-mac-homebrew.html</a><br />
<br />
混沌としてきた.Catalina にアップグレードするタイミングで, Python 3.8 が供給されたのか,タイミングは分からないけど,自分にとっては同時になってしまった.<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">>>> import matplotlib.pyplot as plt</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">ImportError: numpy.core.multiarray failed to import</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Traceback (most recent call last):</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> File "<stdin>", line 1, in <module></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> File "/opt/homebrew/lib/python3.7/site-packages/matplotlib/__init__.py", line 205, in <module></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> _check_versions()</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> File "/opt/homebrew/lib/python3.7/site-packages/matplotlib/__init__.py", line 190, in _check_versions</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> from . import ft2font</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">ImportError: numpy.core.multiarray failed to import</span><br />
<br />
発端はこいつ.Pythonでグラフが書けなくなった.何が起きているのか全く分からなかったのだが,<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">% brew search python3</span><br />
<br />
で判明.<span style="background-color: yellow;"><b>python@3.8</b> </span>が供給されていて,インストールされている!!何かが起きても仕方がない状況が生じてしまったようだ...諦めて,<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">% /opt/homebrew/opt/python@3.8/bin/pip3 install matplotlib</span><br />
<br />
で入れ直し.動いた.3.7 の削除をすべきか?<br />
<br />
ps.<br />
pipにしようかどうしようかと思っていたところもあったが,brewでpython入れると,<br />
<br />
<span style="font-family: Courier New, Courier, monospace;"># You can install Python packages with</span><br />
<span style="font-family: Courier New, Courier, monospace;"># /opt/homebrew/opt/python@3.8/bin/pip3 install <package></span><br />
<div>
って言われてる.従え.</div>
<div>
<br /></div>
</div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-16838352409059559152020-04-05T12:21:00.000+09:002020-04-05T12:21:25.944+09:00montageでフォントエラー<div dir="ltr" style="text-align: left;" trbidi="on">
何故か, montage で画像を連結しただけで,フォントエラー<div>
<br /><div>
<span style="background-color: #f3f3f3; font-family: Courier New, Courier, monospace;">montage: unable to read font `helvetica' @ error/annotate.c/RenderFreetype/1391.</span></div>
<div>
<br /></div>
<div>
が出た.</div>
<div>
<br /></div>
<div>
対処作が簡潔すぎて驚いたのだが,gs (ghostcript) を入れたら解決とな...</div>
<div>
<br /></div>
<div>
<span style="background-color: #f3f3f3; font-family: Courier New, Courier, monospace;">% brew install gs</span></div>
<div>
<br /></div>
<div>
参考)</div>
<div>
https://apple.stackexchange.com/questions/224285/why-does-image-magick-fail-to-read-fonts</div>
<div>
<br /></div>
</div>
</div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-53826204611059166172020-03-15T09:27:00.000+09:002020-03-15T12:58:10.221+09:00OpenTSUNAMI(杞憂プロジェクト)<div dir="ltr" style="text-align: left;" trbidi="on">
<iframe allow="encrypted-media" allowtransparency="true" frameborder="0" height="663" scrolling="no" src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fnaotaka.yamamoto%2Fposts%2F3110682012289113&width=500" style="border: none; overflow: hidden;" width="500"></iframe>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.bosai.go.jp/study/publish/book/seika_r01/html5.html?fbclid=IwAR25899PBdUqzr4go56i3PGxVZR1T7Fnt2tGMCOmVgS99eaBRVQMGKbSyTk#page=57"><img alt="OpenTSUNAMI(杞憂プロジェクト)ポスター" border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhReMZRGwD52zU_CPuanWte5YOsrXtqlRqWx9HYRY9XHDfDy1feRFDaJwbymT3SXz7Z9xnwZtl1Ar6gKCqbrqqnnCpQnoSj1bIzXH_k-9eNpENYt-6bJtQxp5sJ0zmPwl2KnUE5cULI_3E/s640/54_%25E5%259C%25B0%25E9%259C%2587_%25E8%25BF%2591%25E8%25B2%259E%25E7%259B%25B4%25E5%25AD%259D_1129.png" style="margin-left: auto; margin-right: auto;" title="ポスター" width="449" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">ポスター</td></tr>
</tbody></table>
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-11395201037164702612020-02-22T14:25:00.004+09:002020-06-08T09:08:49.434+09:00Matplotlib on Mac Homebrew<div dir="ltr" style="text-align: left;" trbidi="on">
matplotlibの入れ方更新 -> <a href="https://ekbo.blogspot.com/2020/06/Matplotlib-on-Mac.html">https://ekbo.blogspot.com/2020/06/Matplotlib-on-Mac.html</a> 2020.6.8<br />
<br />
自分がどうするかの宣言も含めて,Mac OS X の Homebrew の Python (Version 3) でどう環境を構築するか.<br />
<br />
そもそも Python 自体のインストールが混沌としてしまっている...<br />
<br />
<ol style="text-align: left;">
<li>QGISのためのパッケージインストール.確か,QGISのインストールで,Python3 をバイナリパッケージで入れろと言われた気がする.</li>
<li>MacPorts がまだ Homebrew への完全移行が終わっていないので残ってる.</li>
<li>Homebrew で入れた</li>
</ol>
<br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;">/Library/Frameworks/Python.framework/Versions/3.6/bin/python3</span></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">/opt/homebrew/bin/python3</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">/opt/local/bin/python3</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">/usr/local/bin/python3</span></div>
</div>
<div>
一つ多い....</div>
<div>
<br /></div>
<div>
で,Matplotlib をはぢめましょう.と思ったときに,ふと,,,どうすんだ?</div>
<div>
<br /></div>
<div>
確実に,Homebrew の環境で作業するために,</div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">/opt/homebrew/bin/pip3.7 install matplotlib</span></div>
<div>
にしました.pip3 で十分ですが... pip とすると, Version 2 と Version 3 を見失う場合があるので念の為(自分は,Python2 をインストールしていないので混乱しませんが).</div>
<div>
<br /></div>
<div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;">#!/opt/homebrew/bin/python3</span></div>
<div>
<br /></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;">import sys</span></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;">import numpy as np</span></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;">import matplotlib as mpl</span></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;">import matplotlib.pyplot as plt</span></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;">t = np.arange(0,2*np.pi, 0.1)</span></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;">plt.figure(1)</span></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;">plt.plot(t, np.sin(t))</span></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;">plt.show()</span></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace;">sys.exit(0)</span></div>
</div>
<div>
<br /></div>
<div>
動いた!</div>
<div>
<br />
<br />
<a name='more'></a><br />
何も細かい調整してないから,mpl は要らなかったか・・・<br />
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-54120440258109971562020-02-21T21:52:00.000+09:002020-02-21T21:52:06.019+09:00sshpass on Homebrew<div dir="ltr" style="text-align: left;" trbidi="on">
MacPorts から, HomeBrew へ乗り換えを進めています.<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">% brew install sshpass</span><br />
<span style="font-family: Courier New, Courier, monospace;">Error: No available formula with the name "sshpass"</span><br />
<span style="font-family: Courier New, Courier, monospace;">We won't add sshpass because it makes it too easy for novice SSH users to</span><br />
<span style="font-family: Courier New, Courier, monospace;">ruin SSH's security.</span><br />
<br />
1つ,移行が出来なかったのが sshpass.まぁ,言ってることも分からんでもない.が,今どきログインパスワード(公開鍵を使ってない)な時点で意識低いということで,自分専用端末からだけは使う.<br />
<br />
<a href="https://qiita.com/bezeklik/items/30b56fa13f651620591d">macOS に Homebrew で sshpass をインストールする</a>に書かれているようなHomebrew の中でなんとかする!という方針もありですが,それも面倒なので,ソースから.<br />
<br />
どこにあるかは,port に教えてもらう.<br />
<span style="font-family: Courier New, Courier, monospace;">% port info sshpass | grep Homepage</span><br />
<span style="font-family: Courier New, Courier, monospace;">Homepage: <a href="http://sourceforge.net/projects/sshpass/">http://sourceforge.net/projects/sshpass/</a></span><br />
<br />
私の趣味的には, ~/local なので,<br />
<span style="font-family: Courier New, Courier, monospace;">% ./configure --prefix=$HOME/local</span><br />
<span style="font-family: Courier New, Courier, monospace;">% make</span><br />
<span style="font-family: Courier New, Courier, monospace;">% make install</span><br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-55523260403431805752020-01-15T23:32:00.000+09:002020-01-30T12:29:05.985+09:00M 6.4 - 8km S of Indios, Puerto Rico on 7 Jan. 2020<div dir="ltr" style="text-align: left;" trbidi="on">
津波波形データベース構築の一例として,1月7日にプエルトリコで発生した地震による津波のデータ収集と計算をやってみた.<br />
<br />
<span style="background-color: cyan; font-size: large;">波源断層モデル</span><br />
Moment Tensor (USGS)<br />
(17.916, 293.187) 13.5 km, Dip: 43 deg., Strike: 268 deg., Rake: -58 deg.<br />
<br />
M0 - S 関係 (cite) から,<br />
(L, W) = (20.0073963517812 km, 10.00369817589060 km)<br />
slip amount: 0.500816743451796 m<br />
<br />
<span style="background-color: cyan; font-size: large;">DEM作成</span><br />
GEBCO 2019から,当該領域の切り出し (grdcut) を行った.GEBCO_2019.nc は, grdmath を用いて正負を反転してある.<br />
<span style="font-family: "courier new" , "courier" , monospace;">% grdmath GEBCO/GEBCO_2019/GEBCO_2019.nc NEG = GEBCO_2019.nc</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">% grdcut -R290/300/15/20 $bathymetry/GEBCO_2019.nc -Ggebco.grd</span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1RE4FCSx53wiONyL6aGMfJUBWaYjt5NKHnjruj_f3yqu00rPPm6AanCGHXInL3nntowWFGioOm9ePUgEGWDEN4itDxAywCHfIdlctADo-XWA-G5Lccw2m_gCN70W-1YXjsbmbkKgvgu0/s1600/PerutoRico.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="836" data-original-width="1592" height="168" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1RE4FCSx53wiONyL6aGMfJUBWaYjt5NKHnjruj_f3yqu00rPPm6AanCGHXInL3nntowWFGioOm9ePUgEGWDEN4itDxAywCHfIdlctADo-XWA-G5Lccw2m_gCN70W-1YXjsbmbkKgvgu0/s320/PerutoRico.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2-maOrypHSeOZjzxqF7iLzk51Gka2azxhW4reApUacwtSqm2LdVDQYJn2gPr6ivqqoot_mvS1UDhxgVyxbDUaMxfA9x-uo4PZE0gj4YV8CKPC0E4B69t8sU4cuNUFJD94E3tddQ4jeJ8/s1600/zoom.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1303" data-original-width="1600" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2-maOrypHSeOZjzxqF7iLzk51Gka2azxhW4reApUacwtSqm2LdVDQYJn2gPr6ivqqoot_mvS1UDhxgVyxbDUaMxfA9x-uo4PZE0gj4YV8CKPC0E4B69t8sU4cuNUFJD94E3tddQ4jeJ8/s320/zoom.png" width="320" /></a></div>
<br />
GEBCO 2019 から切り出した地形データでJAGURSを走らせると,北西の領域端にかかっている島のところで発散が生じた.そのため,周囲3分角(15秒角の12メッシュ)は,水深100 mよりも浅い海と陸地を水深 100 mで固定する修正を grdmask と grdmath で行った.下記は, GMT 6.0.0 (Homebrew on OS X) を使用している( -I15s は, -I15c に相当).<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">% cat<<EOF | grdmask -A -Gmask.grd -I15s -Rgebco.grd -N100/100/NaN</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">290:3 15:3</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">290:3 19:57</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">299:57 19:57</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">299:57 15:3</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">EOF</span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;">% grdmath gebco.grd mask.grd LT mask.grd MUL 0 NAN gebco.grd AND = masked_gebco.grd=cf</span></div>
<div>
<br />
<span style="background-color: #fff2cc;">(解説)</span><br />
grdmask で,標準入力から縁取りの4点を入力して, -N 領域外/線上/内側 の値を指定する. -Rgebco.grd で元のDEMと範囲を合わせて,分解能も指定する(-I15s).さらに,大円ではなく直線で四角にするため -A オプションを付ける.<br />
<span style="font-family: "courier new" , "courier" , monospace;"> -A Suppress connecting geographic points using great circle arcs, i.e., connect by straight lines,</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> unless m or p is appended to first follow meridian then parallel, or vice versa.</span><br />
<br /></div>
<div>
<span style="background-color: cyan; font-size: large;">験潮所</span></div>
<div>
ITIC (International Tsunami Information Center) のアラートで 0.02 mの津波が観測されたようなので,UNESCO IOC <a href="http://www.ioc-sealevelmonitoring.org/">Sea Level Station Monitoring Facility</a> の <a href="http://www.ioc-sealevelmonitoring.org/news.php?p=show&id=8164">event</a> から<a href="http://www.ioc-sealevelmonitoring.org/station.php?code=magi2&period=0.16&endtime=2020-01-07T11:00">Magueyes Island PR staion</a> のデータを "show data" から取得. 200〜2000秒のバンドパスフィルタをかけた.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg9_tNVH1BSLd65Sd3F-tB2rEKVkZYYzUEWfRkAM7xMm3vMW0hdrYIi47JfgI61TIwqzEg6QZHP8988LLwyBby8s8C34mepDL2-QP-G6m02zhLpsV2-7_itFlUzXEWfmCJYDD3OpEllbM/s1600/bp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="1280" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg9_tNVH1BSLd65Sd3F-tB2rEKVkZYYzUEWfRkAM7xMm3vMW0hdrYIi47JfgI61TIwqzEg6QZHP8988LLwyBby8s8C34mepDL2-QP-G6m02zhLpsV2-7_itFlUzXEWfmCJYDD3OpEllbM/s640/bp.png" width="640" /></a></div>
<div>
<br /></div>
<div>
(lat, lon) = (17.9701, -67.0464) だったが,DEMに重ね合わせると,ずれていたので, (17.9636, 292.9536) に移動した.</div>
<div>
<br /></div>
<div>
<span style="background-color: cyan; font-size: large;">JAGURS計算</span></div>
<div>
設定した断層パラメータで, dt=1.0 s で計算した.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjudtQm7nPVtjNkoXO7BTWGcnRkd1ls70tP75HW5_mh2ne4o-6pdAgRYaebw_rzJJTDj0L-DhzHxNM2JPDfAZZaGE7u722LJhbYdDeVkkES-CPGDL-A0ur8CJIl5G4K88nxV7vDUptK6U4/s1600/tgs000001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="1280" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjudtQm7nPVtjNkoXO7BTWGcnRkd1ls70tP75HW5_mh2ne4o-6pdAgRYaebw_rzJJTDj0L-DhzHxNM2JPDfAZZaGE7u722LJhbYdDeVkkES-CPGDL-A0ur8CJIl5G4K88nxV7vDUptK6U4/s640/tgs000001.png" width="640" /></a></div>
<div>
<br /></div>
</div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-29748124879762559742020-01-12T09:11:00.000+09:002020-01-12T09:11:08.585+09:00autofs & NFS on Catalina (途中経過)<div dir="ltr" style="text-align: left;" trbidi="on">
データ共有がNFSでされているので,Macからも autofs 使って NFS にあるデータにアクセスできるようにしていたのですが, Catalina にした瞬間からアクセス不能. autofs は動いているようで,マウント先ディレクトリの作成は出来てる.が,remote の情報が必要になる瞬間から, ls しても, no such file or directory になってしまう.2台とも同じ症状なので, Catalina化が原因なのはほぼ確定.Mojave がなくなってしまったので確定とまではいかないけど...<br />
<br />
どうやら,「<a href="https://qiita.com/dmrt/items/b9aab190840c4854f219">【解決済】macOS Catalinaで NFS マウントに失敗する。(stale NFS file handle or permission denied)</a>」のように,MacOS を NFS サーバにしていると, /etc/exports の書き方が変わった(相対パス→絶対パス)ようで,そのトラブルが多い模様.<br />
<br />
私の場合 autofs / automount から NFS をマウントしているだけど, automount によるマウントポイントのディレクトリは作成されるものの, ls しても無いと言われる・・・ので, NFS クライアントに何らかの不具合がありそう.<br />
<br />
と思ったけど, mount_nfs 使って手動でマウントしたところ,アクセスできた!ということは,automount から NFS クライアントへの連携のところか...<br />
<br />
(一旦,公開)<br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-20871972542495624542020-01-09T23:32:00.000+09:002020-01-10T13:51:41.669+09:00JAGURS on Catalina with HPC Compiler for MacOS X<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://hpc.sourceforge.net/">HPC Compiler for MacOS X</a> を Catalina で使うには,ちょっと面倒なようです.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBHwRTgwWtLyOsz1QOUB0nFDakrsQZBTww71twKyeXYs9WrBeB2Vm-u9qDoBKeeDVOxoVCv7q2Evbabg6IOppVv1FAra9Y8CPmyW3H628lcJcIFdT69dJFy0Np-zCfQoQwDfD3hfbLAuE/s1600/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2020-01-09+13.32.04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="586" data-original-width="1064" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBHwRTgwWtLyOsz1QOUB0nFDakrsQZBTww71twKyeXYs9WrBeB2Vm-u9qDoBKeeDVOxoVCv7q2Evbabg6IOppVv1FAra9Y8CPmyW3H628lcJcIFdT69dJFy0Np-zCfQoQwDfD3hfbLAuE/s320/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2020-01-09+13.32.04.png" width="320" /></a></div>
コマンドラインで gcc を利用すると,「開発元を検証できないため開けません。」というポップアップが表示されてしまいます.よくあるセキュリティ上の警告ですが,なにせ,実行ファイルを1つ1つ対処してあげなければいけないので,JAGURS を make するには,<br />
<br />
/usr/local/bin/gcc<br />
/usr/local/bin/gfortran<br />
/usr/local/libexec/gcc/x86_64-apple-darwin19/9.2.0/cc1<br />
/usr/local/libexec/gcc/x86_64-apple-darwin19/9.2.0/collect2<br />
<br />
の4つが必要でした.さらに,実行時にダイナミックライブラリのリンクでも必要で, .dylib 毎に聞かれます・・・一気にYesにする方法もありますが,ちまちまやるとしたら,システム環境設定を開いておくと,一つ一つ聞かれました.Ctrl+open よりは楽です.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfEdjfO-oWZ1cM1ycbiTAG2rcD1AcOCKkJM2OScEhpaS5Aijq0o2oStS3B_MEq7V-QmmVaDxPnb29uHSjgZMX_EKfa1y-qyYjw-PNYe1DEdZbF_CcExgxRaFNdoqOSEkHmo7bTB490-Xc/s1600/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2020-01-10+09.49.33.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="618" data-original-width="1064" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfEdjfO-oWZ1cM1ycbiTAG2rcD1AcOCKkJM2OScEhpaS5Aijq0o2oStS3B_MEq7V-QmmVaDxPnb29uHSjgZMX_EKfa1y-qyYjw-PNYe1DEdZbF_CcExgxRaFNdoqOSEkHmo7bTB490-Xc/s320/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2020-01-10+09.49.33.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2x7on0FBmFMSkP6E3y9UgC73X4j9lN0wOONAMo5rvhjDiLDDr9dlcv-5iqy5sytnsZL9LYe0_lzgvjCTunJsGXnJx5a1jtIXW1XMavycj7nbq5fCFH1tsUQwAAYWjMF_YCfg_3TpNjBc/s1600/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2020-01-10+09.49.39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1370" data-original-width="1560" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2x7on0FBmFMSkP6E3y9UgC73X4j9lN0wOONAMo5rvhjDiLDDr9dlcv-5iqy5sytnsZL9LYe0_lzgvjCTunJsGXnJx5a1jtIXW1XMavycj7nbq5fCFH1tsUQwAAYWjMF_YCfg_3TpNjBc/s320/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2020-01-10+09.49.39.png" width="320" /></a></div>
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-77188151109817472462020-01-06T21:33:00.000+09:002020-01-06T21:33:02.675+09:00iLogScanner<div dir="ltr" style="text-align: left;" trbidi="on">
いくつかのサーバ運用を今でもやっていますが,可能な限り省力化したいところ.その中で,ログ監視をやらなきゃいけないので, <a href="https://www.ipa.go.jp/security/vuln/iLogScanner/">iLogScanner</a> を使っていますが,備忘録がなかったので自分用のメモです.<br />
<br />
やることは簡単で,ダウンロードして,展開して,<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">iLogScanner/1_bin/iLogScanner.sh mode=cui logtype=apache accesslog=log1,log2... reporttype=html level=detail outdir=$outdir</span><br />
<br />
とかです.accesslog= のところは,複数ファイルをカンマ区切りで繋ぎます.日付ごとにファイルが異なる場合には,ファイルリストが必要になるので,スクリプトを作ると良いでしょう.閲覧用に reporttype=html と日々のメール送信用に reporttype=text の両方を実行しています.<br />
<br />
あと,java が必要なので,<br />
<span style="font-family: Courier New, Courier, monospace;">% sudo yum install java-1.8.0-openjdk</span><br />
しました.<br />
<br />
参考)<br />
<a href="https://www.denet.ad.jp/technology/2015/08/vol33-ilogscanner.html">iLogScannerでログのセキュリティスキャンを自動化する</a><br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-46499777758991663892019-12-26T02:31:00.000+09:002019-12-26T02:31:07.134+09:00CD/DVDをコマンドラインで取り出す<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Courier New, Courier, monospace;">% diskutil eject /Volumes/XXXXX</span><br />
<br />
あとは,ダウンロードしたImageファイルが無駄にマウントされたままだった場合は,<br />
<span style="font-family: Courier New, Courier, monospace;">% diskutil unmount /Volumes/XXXXX</span><br />
で出来る.<br />
<br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-36740465157938404902019-12-25T21:03:00.000+09:002019-12-25T21:03:08.210+09:00GitHubのfork/cloneを本家に同期させる<div dir="ltr" style="text-align: left;" trbidi="on">
昨今,ツールが便利になり過ぎて,それならこっちの方法の方が良いよぉ〜とか,お決まりの方法がなくて,ぽりすーで決まったりするところがあるから逆に初心者には面倒な世の中になったなと思いながら, GitHub をいじり始めたのでメモ.<br />
<br />
ともかく,むかぁ〜し,fork した JAGURS が自分のところにありました.<br />
<a href="https://github.com/naotaka-chikasada/jagurs">https://github.com/naotaka-chikasada/jagurs</a><br />
<br />
が,この作業を開始した時点で,2017年の古いまま.まずは,これを最新にしなきゃいけない.ということで,「<a href="https://qiita.com/xtetsuji/items/555a1ef19ed21ee42873">GitHubでFork/cloneしたリポジトリを本家リポジトリに追従する</a>」を参考に,少し足りないところを補足して整理しました.<br />
<br />
自分のforkしたJAGURSを取得(ユーザ名は要修正)<br />
<span style="font-family: Courier New, Courier, monospace;">% git clone https://username@github.com/username/jagurs.git</span><br />
<br />
upstreamという名前(←たぶん,何でも良い)で,本家を名指し(remote add).<br />
<span style="font-family: Courier New, Courier, monospace;">% cd jagurs</span><br />
<span style="font-family: Courier New, Courier, monospace;">% git remote add upstream https://github.com/jagurs-admin/jagurs.git</span><br />
(この作業は,今後やらなくてよいはず)<br />
<br />
本家を追従<br />
<span style="font-family: Courier New, Courier, monospace;">% git fetch upstream</span><br />
<br />
マージ<br />
<span style="font-family: Courier New, Courier, monospace;">% git checkout master</span><br />
<span style="font-family: Courier New, Courier, monospace;">Already on 'master'</span><br />
<span style="font-family: Courier New, Courier, monospace;">Your branch is up to date with 'origin/master'.</span><br />
<span style="font-family: Courier New, Courier, monospace;">% git merge upstream/master</span><br />
<span style="font-family: Courier New, Courier, monospace;">Already up to date.</span><br />
<br />
最後にサーバにアップロード<br />
<span style="font-family: Courier New, Courier, monospace;">% git push origin</span><br />
<br />
参考にさせていただいたブログでは,最後のサーバにアップロードが無いので,ウェブで見えるレポジトリが更新されませんでした.<br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-48847679169886360652019-12-25T09:04:00.001+09:002019-12-25T09:04:15.447+09:00Bluetoothをコマンドラインで再起動する方法<div dir="ltr" style="text-align: left;" trbidi="on">
しばしば TrakPad の Bluetooth 接続が切れて,こんな得体も知れない不具合の対策を考えるのも嫌だったので,逃げ道.<br />
<br />
% sudo killall bluetoothd<br />
<br />
こんだけかい?!<br />
bluetoothd の再起動(正確には停止)には root 権限が必要だったようで,sudo してます.<br />
<br />
これでやっと有線(USB)マウス外せる.<br />
<br />
(仕組みは分かってませんが,どっかに supervisor みたいなのが居て, bluetoothd が落ちたら起動してくれる仕組みが走ってます.つまり,その supervisor が生きている前提の対処法であることは忘れてはいけないかもしれません.)<br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-49738258610960432612019-12-14T02:48:00.000+09:002019-12-14T02:48:40.543+09:00MP-CD1 モバイルプロジェクター<div dir="ltr" style="text-align: left;" trbidi="on">
最近の出張でウケてるのがモバイルプロジェクター.<br />
<br />
ずいぶん小さくて明るくなったので,出張や外勤の時に持ち歩いてたら使えそうだなと思って買いました.ただ,種類は色々.目的によって絞り込みをかけていかないと失敗しそうです.私のポイントは,<br />
<br />
<ul style="text-align: left;">
<li>軽くて持ち歩く(かばんに入れっぱなし)気になること</li>
<li>多少明るい室内でも使えること</li>
<li>無線接続</li>
<li>ポスター会場で使えること</li>
</ul>
<br />
でした.色々悩んで買ったのは<a href="https://www.sony.jp/video-projector/products/MP-CD1/">SONYのモバイルプロジェクターMP-CD1</a>.ただし,このブログを書いている時点で生産中止で在庫限りでした.写真は,iPod touchの写真を投影(それ自体に意味はない).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoHTNFr4H77WgSmXXumqhII16H8tf7AWWhN05NNGuzwNlIyN2lBnjsFKHTN7f09U3EYkySN80k54e3KfAtoTJK-K9Q8kaKmTAK70gN5UkdvmBqLzUZoGDm_jLzyPhrMEqkPBe4qlYCNUE/s1600/2019-12-13+16.15.41.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoHTNFr4H77WgSmXXumqhII16H8tf7AWWhN05NNGuzwNlIyN2lBnjsFKHTN7f09U3EYkySN80k54e3KfAtoTJK-K9Q8kaKmTAK70gN5UkdvmBqLzUZoGDm_jLzyPhrMEqkPBe4qlYCNUE/s320/2019-12-13+16.15.41.jpg" width="240" /></a></div>
<br />
<br />
決定的だったのは,<span style="color: red;">ACアダプタ</span>.バッテリー内臓で充電式のものもあったのだけど,充電(給電)にはACアダプタが必要なものが結構多かった.のに対して,MP-CD1は,UCB-C給電.MacBook な私にとっては,「必然的に持っているもの」だったので本体重量に加えて,充電ケーブルの重量(MP-CD1だと,私にとっては0g)で考えました.<br />
<br />
その代わり,主に妥協したのが,HDMI有線接続しか出来ないという点.USBメモリに入れたpptxを再生できたり,無線でつながったりするのも魅力的だったのだけど,諦めました.写真のHDMIは付属ケーブルでかなり太くて硬いので,<a href="https://www.elecom.co.jp/products/DH-HDP14SS10BK.html">書い直す予定</a>.<br />
<br />
ポスター会場でも使えるほど明るくて軽量なものはなかったので断念しました.ポスター会場用には,モバイルLCDを持った方が良さそうです.<br />
<br />
おまけの機能として,USB-Aでモバイルバッテリにもなる点.スマホの充電に使えるのでこれは便利と思います.逆に,飛行機の時は機内持ち込みが必須になってしまいましたが.</div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-54383154685728799392019-12-12T08:17:00.003+09:002019-12-25T12:30:31.436+09:00JAGURS compilation using Homebrew on MacOS<div dir="ltr" style="text-align: left;" trbidi="on">
まだ MacPorts 使ってるの?とか言われてしまったので, Homebrew へ.主に何に使ってたかと言うと, JAGURS なので,まずは JAGURS がコンパイル出来るように整備してみた.<br />
<br />
が,Makefile のバージョン管理に RCS 使ってたので,先ずは,<br />
<span style="font-family: "courier new" , "courier" , monospace;">% brew intall rcs</span><br />
<br />
それ以前としては, /usr/local に入っている HPC compiler を上書きさせないために, /opt/homebrew をインストール先にした.参考にした記事は<a href="https://qiita.com/usamik26/items/601f5612bd3f8a21cc41">こちら</a>.<br />
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo mkdir homebrew</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo chown ${USER}:staff homebrew</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew</span><br />
<br />
依存ライブラリのインストール<br />
% brew install netcdf<br />
% brew install proj<br />
% brew install fftw<br />
(伴って gcc のインストールも始まっていて重い・・・)<br />
<br />
<b>Makefile:</b><br />
<span style="font-family: "courier new" , "courier" , monospace;">PROJ4_DIR=/opt/homebrew</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">FFTW3_INCLUDE_DIR=/opt/homebrew/include</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">NETCDF=/opt/homebrew</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">% make</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">In file included from mapproject.c:4:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/opt/homebrew/include/proj_api.h:37:2: error: #error 'To use the proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> #error 'To use the proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> ^~~~~</span><br />
<br />
mapproject.c で,proj_api.h を include する前に, <span style="font-family: "courier new" , "courier" , monospace;">ACCEPT_USE_OF_DEPRECATED_PROJ_API_H </span><span style="font-family: inherit;">を定義してあげると, make が通るようになります.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">% cat mapproject.patch</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">*** mapproject.c 2019/12/11 20:49:39 1.1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">--- mapproject.c 2019/12/11 20:51:04</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">***************</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">*** 1,6 ****</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">--- 1,7 ----</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> #include <stdio.h></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> #include <string.h></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> #include <stdlib.h></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">+ #define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> #include <proj_api.h></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;"> static projPJ pj_tmerc, pj_latlong;</span><br />
<br />
もしくは,proj をバージョン5にするという解決策もあるようですが,,,悩みどころ.<br />
<br />
参考までに,GitHub上のOSGeoの<a href="https://github.com/OSGeo/PROJ/issues/836">チケット</a>.</div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-2745416066040930732019-10-23T09:21:00.002+09:002019-10-23T09:21:36.560+09:00Dropboxに写真を同期<div dir="ltr" style="text-align: left;" trbidi="on">
iPad(昔はiPhone)で撮った写真と動画の管理って,Macだと意外(?)と面倒なようで,Macに接続してもストレージとしてマウントしてくれないので,何かのツールにお任せする必要があるようです(ホントか?).<br />
<br />
最終的に,Dropboxに行き着いていたのだけど,どうも最近,iOS (iPadOS) のWi-Fiで同期済のものが,USBで有線接続したら重複してDropboxに入るようになってしまった.同期済みのものが「カメラアップロード」フォルダに残っていれば, -1.jpg のようなファイル名になって同定が用意なんだけど,既にrenameしていたり,移動していると何のことか良く分からない...<br />
<br />
というわけで,Mac側の設定をOFFにしました.設定→インポートの「デバイス」から対象の端末を削除すれば良いようです.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMLzSLN4ki4ob6yxnwg1UdnkUKzq8_lNaQQIivaNrvJjXqrt1O0chP8SdsKXqGOq1v-1x2_-oiOy1Ut7AlPpqHYdGKx3LzRKz76M74Xs0q4drfw-ggsorupcsp3pCXFTvMNPR0G__99Io/s1600/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2019-10-23+09.14.59.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1168" data-original-width="1284" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMLzSLN4ki4ob6yxnwg1UdnkUKzq8_lNaQQIivaNrvJjXqrt1O0chP8SdsKXqGOq1v-1x2_-oiOy1Ut7AlPpqHYdGKx3LzRKz76M74Xs0q4drfw-ggsorupcsp3pCXFTvMNPR0G__99Io/s320/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2019-10-23+09.14.59.png" width="320" /></a></div>
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-72286853113517447792019-10-07T00:38:00.003+09:002019-10-07T00:38:58.006+09:00stdio.h が無いって・・・<div dir="ltr" style="text-align: left;" trbidi="on">
久しぶりにコンパイルしようと思う度にひっかかるので自分でも書いておく.<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">/usr/local/lib/gcc/x86_64-apple-darwin17.5.0/8.1.0/include-fixed/stdio.h:78:10: 致命的エラー: _stdio.h: No such file or directory</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> #include <_stdio.h></span><br />
<br />
よっぽど何かが壊れないとならなさそうな状況にOSをupdateするとなってしまう.まぁ,ともかく,<br />
<span style="font-family: "courier new" , "courier" , monospace;">% open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg</span><br />
で良いそうだ.<br />
<br />
<a href="https://forums.developer.apple.com/thread/104296">Missing /usr/include w/ Xcode 10</a><br />
<a href="https://qiita.com/labocho/items/b966149e7e9700414bbc">macOS Mojave にアップデートしたら stdio.h がないって言われた</a><br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-36524578034704719922019-06-12T21:00:00.000+09:002019-06-26T16:34:20.837+09:00遠地の波形<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="https://doi.org/10.1016/j.ocemod.2017.01.002">Baba et al. (2016)</a> で提案されているSD+EL+GPの計算はJAGURSで出来ますが,EL (Elastic Loading) を有効にするため,<br />
<div style="text-align: center;">
with_elastic_loading=1</div>
として,パッケージとして配布されている<br />
<div style="text-align: center;">
m_pyfile='PREM_Ggz.nc'</div>
を使うと,GPも含んでいるため,漏れなく gravitational potential change も付いてきます.マニュアルには書かれていませんが,パッケージに入っている PREM_Gz.nc を使うと,ELのみが適用されるようです(確認中).<br />
<br />
海⽔密度効果は,独立に<br />
<div style="text-align: center;">
with_density=1</div>
を設定することで有効に出来ます.<br />
<br />
If you specify<br />
<div style="text-align: center;">
with_elastic_loading=1</div>
<span style="text-align: center;">option to apply elastic loading in your simulation using </span>PREM_Ggz.nc file which is included in JAGURS package, the gravitational potential change is also adopted. Because PREM_Ggz.nc contains not only elastic loading but also gravitational potential change. If you omit GP, PREM_Gz.nc should be set as <span style="text-align: center;">m_pyfile parameter. </span><br />
<span style="text-align: center;"><br /></span>
<span style="color: red;">Error発生:</span><br />
netcdf err=-51 in file=PREM_Ggz.nc<br />
これは, https://www.unidata.ucar.edu/software/netcdf/docs/nc-error-codes.html によると,"Not a netcdf file".<br />
<br />
どうやら,ライブラリ関係が古かったためだったよう.ただし,詳細は詰めていない.<br />
動いてた環境(MacPorts):<br />
hdf5 @1.10.5_0+cxx+hl (active)<br />
netcdf @4.6.3_0+dap+netcdf4 (active)<br />
netcdf-fortran @4.4.5_5+gcc7 (active)<br />
<br />
駄目だった環境(Source build @linux):<br />
hdf5-1.8.19<br />
netcdf-4.4.1.1<br />
netcdf-fortran-4.4.4<br />
<br />
駄目だった環境(linux)で,hdf5-1.10.5, netcdf-c-4.6.3, netcdf-fortran-4.4.5 を使ったところ,問題なくELが計算できた.<br />
<br />
If you have an error of "netcdf err=-51 in file=PREM_Ggz.nc", please update hdf5 and netcdf libraries. I'm not sure the real reason, but I succeeded to execute JAGURS with hdf5-1.10.5, netcdf-c-4.6.3 and netcdf-fortran-4.4.5 instead of hdf5-1.8.19, netcdf-4.4.1.1 and netcdf-fortran-4.4.4.<br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-31941140109823298102019-05-24T21:34:00.000+09:002019-05-24T21:34:07.599+09:00JAGURSのNCDIO<div dir="ltr" style="text-align: left;" trbidi="on">
スパコンじゃないにしても,大量に計算をする場合に出力ファイル数というのは意外と気をつけなければいけません.JAGURSでは,<u>NCDIOオプションを付けてコンパイルする</u>ことで,初期⽔位,⽔位変動,最⼤波⾼,最⼩波⾼,到着時刻分布をドメイン毎に1つのファイルにまとめてくれる機能があります.<br />
<br />
※ 利用しての気付きとして,計算をやり直す時などに既にSD01.ncファイルが存在しているときちんと計算結果が出力されないという制限があります.計算をやり直す前に出力ファイルを一旦消してから実行する必要があるようです.<br />
<br />
Makefileに<br />
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;">OUTPUT=NCDIO</span></div>
を指定するか,<br />
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace;">make -e OUTPUT=NCDIO</span></div>
などのようにコマンドライン引数で指定します.<br />
<br />
まとまったファイルに何が入っているかは,NetCDFパッケージに含まれている以下のコマンドで確認することが出来ます.<br />
ncdump -h SD01.nc<br />
<br />
そして,例えば,最大波高(max_height)を抽出するには,GMTのgrdreformat が使えます.<br />
grdreformat SD01.nc\?max_height SD01.zmax.grd<br />
<br />
もちろん,QGIS等のGISソフトに対しては,SD01.nc をそのまま入力することが出来ます.<br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-67276012060655888382018-11-09T14:44:00.002+09:002018-11-09T14:44:37.658+09:00JAGURSのNaN<div dir="ltr" style="text-align: left;" trbidi="on">
JAGURSの計算結果には陸域(水が届かなかったメッシュ)のデータは含まれません.一方で,出力は2次元のメッシュデータなので何かの値が入っています.どうやら,それが -10000000000 のようです.これを無視してしまうと(というか,autoscaleで描画すると)以下のようになってしまいます.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMBvXguzDQfX_cq8FYcazhU4LFvBmCGZpwdXTGgjU7Af1Ly7A85CO18wMRY28tKwB0z4O3wubJcpoyupcMu_BvrpB03_cCxFeYKme43P0GJxkjtH9fUkeyZDEl6R3LR7aM8kME8Wp-V2Q/s1600/SD01.00002400.bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="637" data-original-width="955" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMBvXguzDQfX_cq8FYcazhU4LFvBmCGZpwdXTGgjU7Af1Ly7A85CO18wMRY28tKwB0z4O3wubJcpoyupcMu_BvrpB03_cCxFeYKme43P0GJxkjtH9fUkeyZDEl6R3LR7aM8kME8Wp-V2Q/s320/SD01.00002400.bw.png" width="320" /></a></div>
これは,海に値が入っていないわけでも,陸が黒いわけでもなくて,データなしの -10000000000 が負に大きすぎて黒くなっているに過ぎません.なので,陸域の点を使って透明にしてあげて,色をつけてあげます.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcrgxU7QjQ_dFFTGHuVqO2HfvR17-K4fyJ2e-opDm0vNnp469EfBDJDkA4vnB7W6rmlliXnyx5u9wA9dn4mgOA2gSEGQOUCRCPqJF56RXl5vnZsqcyhyphenhyphenTtNtClmiM0YYhJRXYKHfDUJOg/s1600/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2018-11-09+14.28.16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="889" data-original-width="927" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcrgxU7QjQ_dFFTGHuVqO2HfvR17-K4fyJ2e-opDm0vNnp469EfBDJDkA4vnB7W6rmlliXnyx5u9wA9dn4mgOA2gSEGQOUCRCPqJF56RXl5vnZsqcyhyphenhyphenTtNtClmiM0YYhJRXYKHfDUJOg/s320/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2018-11-09+14.28.16.png" width="320" /></a></div>
右の2番めのアイコンを使うと,画像の点を指定して透明にする値を入力できます.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEdEUg8-Tr6rKw7oSMqTsCSxywJDQfIpkwY-giAGzKZ2T4j9UOg-S86hPjiJ_BZGtuYAHRK3sXJRBeOboZaDmkOvvC3Uu-USr3KBALB7yAiffplzpl4JIV-7UCbitJx8Q8kUsENF3GWa8/s1600/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2018-11-09+14.29.15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="889" data-original-width="927" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEdEUg8-Tr6rKw7oSMqTsCSxywJDQfIpkwY-giAGzKZ2T4j9UOg-S86hPjiJ_BZGtuYAHRK3sXJRBeOboZaDmkOvvC3Uu-USr3KBALB7yAiffplzpl4JIV-7UCbitJx8Q8kUsENF3GWa8/s320/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2018-11-09+14.29.15.png" width="320" /></a></div>
これをApplyすると,背景の地図が見えるようになります.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL9RZzA95eARrQTCyNfDfH5c2nzcgYBsv75_yIoIarHjLFq3ONqD3NO_g4N66a28eKZiqRDE6n_vdtHwWf_LWPIecnmwiWrZRROXqNRqwM0imOugY3giyQaoN0dtCTFHnSO9PV-v6Xlyo/s1600/SD01.00002400.om.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="637" data-original-width="955" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL9RZzA95eARrQTCyNfDfH5c2nzcgYBsv75_yIoIarHjLFq3ONqD3NO_g4N66a28eKZiqRDE6n_vdtHwWf_LWPIecnmwiWrZRROXqNRqwM0imOugY3giyQaoN0dtCTFHnSO9PV-v6Xlyo/s320/SD01.00002400.om.png" width="320" /></a></div>
背景(地形図)が見えるようになりましたが,レンジが適切ではないので波が表示されないので,調整します.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCZ9kfFMy8Ldt9T5fg2wsu6mRPKfl6uKPW3lfxI0YsaLD4lKXRl4QJUFkrDcFYcv4Wbp3kyysuNjnazJNPcLjbcN33KKkvBIfOIFLYXKCfIChSE4arhssP2zmXFICYgDp4TcaM1sug6c/s1600/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2018-11-09+14.34.05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="776" data-original-width="813" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCZ9kfFMy8Ldt9T5fg2wsu6mRPKfl6uKPW3lfxI0YsaLD4lKXRl4QJUFkrDcFYcv4Wbp3kyysuNjnazJNPcLjbcN33KKkvBIfOIFLYXKCfIChSE4arhssP2zmXFICYgDp4TcaM1sug6c/s320/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2018-11-09+14.34.05.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUjErXHwpGaH4ocMB_aPb8RUuTxTfBNWNQH-C62bgcw13ZMd9MJHp2DFAgpUUMt5vh5lYiwz8652zr6UBgzVU6vLeh_shx5LuzWFy9Kp4CuITKaFBrJCxnnZny4Uziq-m3e_BzjBle5RY/s1600/SD01.00002400.br.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="637" data-original-width="955" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUjErXHwpGaH4ocMB_aPb8RUuTxTfBNWNQH-C62bgcw13ZMd9MJHp2DFAgpUUMt5vh5lYiwz8652zr6UBgzVU6vLeh_shx5LuzWFy9Kp4CuITKaFBrJCxnnZny4Uziq-m3e_BzjBle5RY/s320/SD01.00002400.br.png" width="320" /></a></div>
<br />
これで見た目も良くなりました.<br />
<br /></div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-49019446251274183312018-11-09T13:41:00.002+09:002018-11-09T13:41:39.292+09:00直交座標系での計算<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
JAGURSで直交座標系(CARTESIAN)で計算するには,Makefileで<br />
#<span style="font-family: "courier new" , "courier" , monospace;">CARTESIAN=ON</span><br />
を有効にするために#のコメントアウトを外します.<br />
<br />
従って,球座標(JAGURSのデフォルト)で作成したバイナリとは別になりますので時々で使い分ける場合はファイル名を変えるなり,ディレクトリを別にするなりしておく必要があります.<br />
<br />
OpenTSUNAMI (杞憂プロジェクト)はぢめます.詳しくは後日.</div>
<blockquote class="twitter-tweet" data-lang="ja">
<div dir="ltr" lang="ja">
Open TSUNAMI(オープン津波)とか称してオープンソースソフトであるJAGURSとオープンデータ(広義)を使って色々やってみることにしました. <a href="https://t.co/hsjagQXTkg">https://t.co/hsjagQXTkg</a></div>
— 山本直孝 (@naotakayamamoto) <a href="https://twitter.com/naotakayamamoto/status/943697004357599232?ref_src=twsrc%5Etfw">2017年12月21日</a></blockquote>
<script async="" charset="utf-8" src="https://platform.twitter.com/widgets.js"></script>
</div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.comtag:blogger.com,1999:blog-8329576811709510038.post-66889689064808679512018-11-05T12:28:00.002+09:002018-11-09T22:16:03.552+09:00JAGURS on OSX (Brief summary in en)<div dir="ltr" style="text-align: left;" trbidi="on">
I succeeded to compile and run JAGURS on Mac OSX in the following steps.<br />
<br />
1. Install libraries via <a href="https://www.macports.org/install.php" target="_blank">MacPorts</a><br />
<br />
$ port install netcdf +dap +netcdf4<br />
$ port install netcdf-fortran +gcc8<br />
$ port install proj<br />
$ port install fftw-3 +gfortran<br />
$ port install szip<br />
<br />
<div>
2. Install compiler from <a href="http://hpc.sourceforge.net/" target="_blank">HPC Mac OS X compiler</a>.</div>
<div>
<br />
3. Download <a href="https://github.com/jagurs-admin/jagurs" target="_blank">JAGURS</a> from GitHub<br />
<br /></div>
<div>
4. Modify Makefile using CC=/usr/local/bin/gcc and FC=/usr/local/bin/gfortran. You should use -cpp option in gfortran command line to use preprocessor and -fopenmp option to use OpenMP directive. OR download <a href="http://quaketm.bosai.go.jp/~naotaka/JAGURS/Makefile.MacOSX.0500" target="_blank">Makefile.MacOSX.0500</a> and save as Makefile in src/ directory (<a href="http://quaketm.bosai.go.jp/~naotaka/JAGURS/Makefile.patch" target="_blank">diff patch</a>).</div>
<div>
<br />
日本語は<a href="https://ekbo.blogspot.com/2018/10/jagurs-on-mac-2.html" target="_blank">こちら</a>.<br />
<br /></div>
</div>
Chikahttp://www.blogger.com/profile/01560782487409712349noreply@blogger.com