-
Notifications
You must be signed in to change notification settings - Fork 22
Compiling
Before downloading any of ROMS repositories, ensure that your ~/.gitconfig
has the appropriate git-lfs
configuration for correctly downloading some roms_test input and observation NetCDF files. Otherwise, the Test Cases requiring 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 = true
Alternatively, 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 where the User cloned/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:
-j [N] Compile in parallel using N processes or CPUs. For example:
build_roms.sh -j 10
-b Compile a specific ROMS GitHub branch. For example:
build_roms.sh -j 5 -b feature/kernel
-p macro Prints any Makefile macro value. For example:
build_roms.sh -p FFLAGS
-noclean Do not clean already compiled objects. For example:
build_roms.sh -j 10 -noclean
Check ROMS repository for available branches other than main and develop. Notice that the feature branches are under development and targeted to advanced users, superusers, and beta testers. Regular and novice users must use the default develop branch. Alternatively, after downloading the code type:
git branch -a
If 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/kernel
The CMake build scripts (cbuild_roms.csh and cbuild_roms.sh) are more complicated and are intended for advanced users.
ROMS Information and Instructions