Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1
/** @file common.h
2
*/
3
/**
4
# A C interface to the General Ocean Turbulence Model (GOTM)
5
6
[GOTM](http://gotm.net) is a library implementing a large number of
7
turbulence models and auxilliary functions adapted to the description
8
of vertical mixing in ocean models.
9
10
This file and other files in this folder provide the C functions
11
definitions which can be used to call the corresponding Fortran
12
functions in the GOTM libraries.
13
14
Note that these files are entirely independent from Basilisk.
15
16
All the header files (except this one) were generated automatically
17
from the Fortran 90 source code of GOTM (stable version 5.2.1). The
18
[Makefile]() provided can be used to regenerate them if necessary.
19
20
## Installation of GOTM
21
22
The GOTM libraries must be installed separately. Only version 5.2.1 is
23
supported at the moment. A [patch](gotm.patch) must be applied before
24
compilation.
25
26
See the [GOTM installation
27
instructions](https://gotm.net/software/linux/) for details but
28
otherwise follow this recipe:
29
30
~~~bash
31
sudo apt install libnetcdff-dev
32
wget https://github.com/gotm-model/code/archive/v5.2.1.tar.gz
33
tar xzvf v5.2.1.tar.gz
34
cd code-5.2.1/src
35
wget https://basilisk.fr/src/gotm/gotm.patch?raw -O gotm.patch
36
patch -p0 < gotm.patch
37
cd ..
38
mkdir build
39
cd build
40
cmake ../src -DGOTM_USE_FABM=off
41
make
42
~~~
43
*/
44
45
typedef
int
integer
;
46
typedef
int
logical
;
47
typedef
double
realtype
;
48
typedef
long
timestepkind
;
49
typedef
struct
{
50
realtype
*
a
;
51
}
realtype_1d
;
52
53
int
strlencheck
(
const
char
*
s
) {
54
return
(
s
!=
NULL
?
strlen
(
s
) : 0);
55
}
56
57
extern
integer
__gotm_MOD_nlev
;
58
#define gotm_nlev __gotm_MOD_nlev
59
extern
realtype
__gotm_MOD_dt
;
60
#define gotm_dt __gotm_MOD_dt
61
extern
realtype
__gotm_MOD_cnpar
;
62
#define gotm_cnpar __gotm_MOD_cnpar
63
extern
integer
__gotm_MOD_buoy_method
;
64
#define gotm_buoy_method __gotm_MOD_buoy_method
65
66
#define airsea_tx __airsea_MOD_tx
67
#define airsea_ty __airsea_MOD_ty
68
#define airsea_evap __airsea_MOD_evap
69
70
#define time_unixseconds() ((long)((time_julianday - 2440587.5)*86400. + \
71
time_secondsofday))
x
int x
Definition
common.h:76
strlencheck
#define strlencheck(s)
Definition
cvmix.h:119
integer
int integer
Definition
cvmix.h:105
s
scalar s
Definition
embed-tree.h:56
realtype
double realtype
Definition
common.h:47
integer
int integer
Definition
common.h:45
__gotm_MOD_buoy_method
integer __gotm_MOD_buoy_method
logical
int logical
Definition
common.h:46
timestepkind
long timestepkind
Definition
common.h:48
__gotm_MOD_dt
realtype __gotm_MOD_dt
__gotm_MOD_nlev
integer __gotm_MOD_nlev
__gotm_MOD_cnpar
realtype __gotm_MOD_cnpar
realtype_1d
Definition
common.h:49
realtype_1d::a
realtype * a
Definition
common.h:50
gotm
common.h
Generated by
1.9.8