0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

gfortran on WSL Ubuntu-24.04 で FVCOM のコンパイル

Posted at

海洋モデルFVCOMをgfortranでコンパイルするための開発環境整備の備忘録です.gfortranを採用すると,Claude Code on the web等での開発環境の構築が簡単になります.
Intel oneAPI 等の他の開発環境を無効にしておきます.

コンパイラ,NetCDF,NetCDF-Fortran,METIS-5,PROJのインストール

sudo apt update
sudo apt install -y \
    gfortran gcc g++ make makedepf90 \
    libnetcdf-dev libnetcdff-dev \
    libopenmpi-dev openmpi-bin \
    libmetis-dev libproj-dev proj-bin

PROJ wrapperのインストール

cd ~/Github/FVCOM/src/libs/proj4_modern
./build_proj4_modern_gnu.sh

Julian のインストール

インストール先を ~/local/fvcom/libs/gnu/ とし,この下に binincludelib ディレクトリが存在することを確認しておきます.存在しない場合は作成しておきます.

cd ~/Github/FVCOM/src
# GNU用のmake.incを用意する.MPI用でOK
cp make.inc.gnu make.inc
cd libs
tar -xzf julian.tgz
cd julian
make
make install INSTALLDIR=$HOME/local/fvcom/libs/gnu

FVCOMのコンパイル

GNU用のmakefileを用意しておく必要があります.make.inc.gnumake.incにコピーし,適切に編集します.

cd ~/Github/FVCOM/src
cp makefile.gnu makefile
make -j 8
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?