-
Notifications
You must be signed in to change notification settings - Fork 0
Configuring and Compiling
Before downloading any of the ROMS repositories, ensure that your ~/.gitconfig has the appropriate git-lfs configuration for correctly downloading some ECCOFS and roms_test input and observation NetCDF files. Otherwise, the required application input NetCDF files will fail. The Git LFS is a command-line extension and specification for managing large files with Git. A sample of the configuration file looks like this:
more ~/.gitconf
[User]
name = GivenName MiddleName FamilyName
email = your@email
[credential]
helper = cache --timeout=7200
helper = store --file ~/.my-credentials
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = trueAlternatively, you may execute git lfs pull at your location of this repository to download a viable version of the Git LFS files from the remote repository in GitHub. Also, to automatically add the LFS filter to your existing ~/.gitconfig, you could use git lfs install from anywhere in your computer directories.
We highly recommend that users define the ROMS_ROOT_DIR variable in their computer shell logging environment, specifying the location where the User cloned or downloaded the ROMS source code. That is, use the value of pwd from the computer directory where you executed git clone https://github.com/myroms/roms.git:
setenv ROMS_ROOT_DIR MyDownlodLocationDirectory
The GNU make and CMake build scripts will use this environmental variable when compiling roms or any of the Test Cases without the need to customize the location of the ROMS source code.
Users must study the build scripts to learn how to customize them. Notice that there are a few options for their execution:
Usage:
./build_roms.sh [options]
or
./cbuild_roms.sh [options]
Options:
-b Compile a specific ROMS GitHub branch
build_roms.sh -j 10 -b feature/kernel
-g Compile with debug flag (slower code)
build_roms.sh -g -j 10
-j [N] Compile in parallel using N CPUs
omit argument for all available CPUs
-pio Compile with the PIO (Parallel I/O) NetCDF library
Otherwise, it used the standard NetCDF library (slower)
build_roms.sh -pio -j 10
-p macro Prints any Makefile macro value. For example,
build_roms.sh -p FFLAGS
-noclean Do not clean already compiled objectsCheck ROMS repository for available branches other than main and develop. Note that the feature branches are under development and intended for advanced users, superusers, and beta testers. Regular and novice users must use the default develop branch. Alternatively, after downloading the code, type:
git branch -aIf using the -b option, the build script will clone the ROMS source code from GitHub into your project sub-directory src, for example:
git clone https://www.github.com/myroms/roms.git src
cd src
git checkout feature/kernelThe CMake build scripts (cbuild_roms.csh and cbuild_roms.sh) are more complicated and are intended for advanced users.
East Coast Community Ocean Forecast System (ECCOFS)