ROMS源程序中包含以下几种文件格式:
1.Fortran 文件(.F)
这个不用多说,每个物理海洋人都懂得。
2.头文件(.h)
(.h)文件使用C语言中ANSI码标准定义的文件。它的C preprocessor(cpp)过程所涉及到的文件,注释行使用 /*
和 */
.用于将.F文件读取并构建.F90文件,以供编译器编译,过程中删除注释行,以增加程序的可读性。
其中主要包含以下语法:
// 开启逻辑开关
#define UV_TIDES
// 字符代替
#define PRIVATE_2D_SCRATCH_ARRAY Istr-3:Iend+3,Jstr-3:Jend+3
// 关闭逻辑开关
#undef DEBUGGING
// 引用头文件
#include "set_bounds.h"
// 条件引用
#ifdef PROFILE
CALL wclock_on (ng, iNLM, 13)
#endif
#ifndef TS_FIXED
USE rho_eos_mod, ONLY: rho_eos
#endif
#if defined BBL_MODEL && (defined MB_BBL || defined SSW_BBL)
// 开关简化
#define FLOATS 1
#define FLOATS
参考1:https://www.myroms.org/wiki/C_Preprocessor
参考2:http://www.runoob.com/cprogramming/c-header-files.html
参考3:http://gcc.gnu.org/onlinedocs/cpp/
3.输入文件(.in)
输入文件所使用的是ROMS namelist语法,与Fortran namelist语法相似。
参考1:https://www.myroms.org/wiki/ocean.in
参考2:https://www.myroms.org/wiki/Input_Parameter_Files
4.源变量定义文件(varinfo.dat)
参考1:https://www.myroms.org/wiki/varinfo.dat
5.makefile
参考1:https://www.myroms.org/wiki/makefile
6.build.bash
编译过程使用,推荐使用build而不是makefile。
参考1:https://www.myroms.org/wiki/build_Script