Skip to content

Instantly share code, notes, and snippets.

View ciscorn's full-sized avatar
🛌
rehab

Taku Fukada ciscorn

🛌
rehab
View GitHub Profile
@ciscorn
ciscorn / build_wgrib2.sh
Created August 3, 2024 11:10
Build wgrib2 on macOS
brew install libomp netcdf
export OpenMP_ROOT=$(brew --prefix)/opt/libomp
cd wgrib2-3.3.0/
mkdir -p build
cd build
cmake .. -DUSE_NETCDF3=0 -DUSE_NETCDF4=1
@ciscorn
ciscorn / tide_main.rs
Last active January 24, 2025 06:28
tide, tidal, 天文潮位
///
///
/// 参考: https://www1.kaiho.mlit.go.jp/kenkyu/report/rhr60/rhr60_r_01.pdf
/// 潮汐表の計算について 海洋情報部研究報告 第60号 令和4年3月18日
use chrono::{Datelike, NaiveDate};
/// 各分潮の角速度 (度/時)
const OMEGAS: [f64; 60] = [
0.0410686, 0.0821373, 0.5443747, 1.0158958, 1.0980331, 12.8542862, 12.9271398, 13.3986609,
13.4715145, 13.9430356, 14.0251729, 14.4920521, 14.5695476, 14.9178647, 14.9589314, 15.0000000,