Setup FVCOM 3.2 for serial run

Table of Contents


First, makedepf90 should have been installed. See this article for installation.


Move onto ./Configure and type:

[cc]$ ./ series[/cc]

The file "" is created in ./FVCOM_source. Edit the "" as follows:

Set "TOPDIR" based on your system.

Comment out "LIBDIR" and "INCDIR" for MEDM ENVIRONMENT. Then uncomment those for LOCAL INSTALL

Set "IOLIBS" and IOINCS for netCDF according to your installation of netCDF (netCDF should be compiled using the same compiler and installed.)

Edit Flags dependent on your desired simulation type. Test cases provided are useful examples.

Install libraries

Then before compiling FVCOM, you need to move onto ./FVCOM_source/libs and edit makefile as follows:

  • Delete "metis" and "netcdf" in PACKAGES.
  • Comment out the lines including metis and netcdf.

Now part of your mekefile has been modified like below:

for item in $(PACKAGES); do (./ $$item ) || exit 1; done
cd proj && ./configure CC=$(CC) CFLAGS=-O3 CXX=$(CC) CXXFLAGS=-O3 F77=$(FC) FFLAGS=-O3 --prefix=$(MYINSTALLDIR)
cd proj && make install
cd fproj && ./configure CPPFLAGS='$(COMPILER)' CC=$(CC) CFLAGS=-O3 CXX=$(CXX) CXXFLAGS=-O3 FC=$(FC) FFLAGS=-O3 --with-proj4=$(MYINSTALLDIR) --prefix=$(MYINSTALLDIR)
cd fproj && make install
# cd netcdf && ./configure CC=$(CC) CFLAGS=-O3 CXX=$(CC) CXXFLAGS=-O3 F77=$(FC) F90=$(FC) FFLAGS=-O3 --prefix=$(MYINSTALLDIR) --build=$(MACHTYPE)
# cd netcdf && make install
# cd metis && make install
cd julian && make install

Build fvcom

You can now make libs. Metis and netcdf should be installed by yourself separately.

[cc]$ make[/cc]

After these preparations, move onto ./FVCOM_source and then you can finally compile FVCOM:

[cc]$ make[/cc]

Setup test case of Estuary

Create "run" directory parallel to FVCOM_source directory and copy a set of files for this test case as well as fvcom executable file (or create a symbolic link) as follows:

$ mkdir run
cd run
ln -s ../FVCOM_source/fvcom
cp ../Examples/Estuary/run/tst_run.nml .
cd ..
cp -r ./Examples/Estuary/tstinp/ .
cd run
./fvcom --casename=tst

The directories of FVCOM_source, run and tstinp are parallel to each other.

Simpler way is just moving onto and using the original directory of Estuary as follows:

cd ./Examples/Estuary/run
ln -s ../../../FVCOM_source/fvcom
./fvcom --casename=tst


These processes did not work well on shared folders of VMware. It says "symbolic link: operation not supported." I do not know the reason but you may need to work on a pure linux hdd, not shared folder on Windows.

Setup FVCOM 3.2 for serial run” に対して4件のコメントがあります。

  1. admin より:

    In case of oakleaf-fx10@UTokyo, this method will not work. One of the problems is failure of building proj and fproj. These packages may not be used in many cases and thus let's give up to install them. A packeage of "julian," however, needs to be installed.
    Since install directories will not be created automatically in this case, create them first. Moving onto ./FVCOM_source/libs/ and do as follows:
    $ mkdir install
    $ cd install
    $ mkdir bin
    $ mkdir lib
    $ mkdir include
    $ cd ../julian
    Edit one line starting with "JOPT" in makefile, replacing "-O3" with "-Kfast" (no other editing required).
    Then edit makefile in ./FVCOM_source/libs/ itemized below and them make:

    • Just put julian in "PACKAGES."
    • Comment out lines for building the other packages.

    If you encounter any problem, one of the causes might be own-compiler and cross-compiler issue.