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
7turbulence models and auxilliary functions adapted to the description
8of vertical mixing in ocean models.
9
10This file and other files in this folder provide the C functions
11definitions which can be used to call the corresponding Fortran
12functions in the GOTM libraries.
13
14Note that these files are entirely independent from Basilisk.
15
16All the header files (except this one) were generated automatically
17from 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
22The GOTM libraries must be installed separately. Only version 5.2.1 is
23supported at the moment. A [patch](gotm.patch) must be applied before
24compilation.
25
26See the [GOTM installation
27instructions](https://gotm.net/software/linux/) for details but
28otherwise follow this recipe:
29
30~~~bash
31sudo apt install libnetcdff-dev
32wget https://github.com/gotm-model/code/archive/v5.2.1.tar.gz
33tar xzvf v5.2.1.tar.gz
34cd code-5.2.1/src
35wget https://basilisk.fr/src/gotm/gotm.patch?raw -O gotm.patch
36patch -p0 < gotm.patch
37cd ..
38mkdir build
39cd build
40cmake ../src -DGOTM_USE_FABM=off
41make
42~~~
43*/
44
45typedef int integer;
46typedef int logical;
47typedef double realtype;
48typedef long timestepkind;
49typedef struct {
52
53int strlencheck (const char * s) {
54 return (s != NULL ? strlen(s) : 0);
55}
56
58#define gotm_nlev __gotm_MOD_nlev
60#define gotm_dt __gotm_MOD_dt
62#define gotm_cnpar __gotm_MOD_cnpar
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))
int x
Definition common.h:76
#define strlencheck(s)
Definition cvmix.h:119
int integer
Definition cvmix.h:105
scalar s
Definition embed-tree.h:56
double realtype
Definition common.h:47
int integer
Definition common.h:45
integer __gotm_MOD_buoy_method
int logical
Definition common.h:46
long timestepkind
Definition common.h:48
realtype __gotm_MOD_dt
integer __gotm_MOD_nlev
realtype __gotm_MOD_cnpar
realtype * a
Definition common.h:50