-
Notifications
You must be signed in to change notification settings - Fork 18
/
README
120 lines (88 loc) · 4.54 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
TEOS-10 V3.06 GSW Oceanographic Toolbox in C
============================================
This began as a translation of the original Fortran-90 source code into C. Unlike
the Fortran-90 and Matlab versions of the toolbox, functions in the C version
are primarily scalar. You should download the documentation from
http://teos-10.org, but should look at gswteos-10.h for the C API.
The functions gsw_saar and gsw_deltasa_atlas have been modified from the
original to not use an external data file for global absolute salinity
anomaly and absolute salinity anomaly ratio data. The data are instead
incorporated into static variables that are used directly.
Manifest:
---------
LICENSE -- GSW C software license
README -- This file.
gsw_check_functions.c -- C implementation of the check functions
gsw_check_data.c -- static check data used by
gsw_ check functions.c
gsw_oceanographic_toolbox.c -- The C GSW library less gsw_saar
gsw_saar.c -- gsw_saar and gsw_deltasa_atlas (modified)
gsw_saar_data.c -- static global absolute salinity anomaly data
used by gsw_saar.c
gswteos-10.h -- GSW function prototypes
gsw_internal_const.h -- Common parameters used to compile the C GSW
library.
Makefile -- basic make file to build gsw_check and
libgswteos-10.so
TOOLS.ini -- Variable definitions used by nmake
TOOLS.gcc -- Variable definitions used by make
meson.build -- Meson build file (alternative build system to build
libgswteos-10 library and gsw_check tests)
meson.options -- Meson build options file (defines additional options
for the Meson build system)
Usage (Unix / make):
--------------------
The C GSW Oceanographic Toolbox comes with a testing program, gsw_check. In the
directory that the toolbox was unpacked, type:
make
and it will attempt to build gsw_check with a dynamically-linked GSW library.
Note that the Makefile assumes that your C compiler is gcc.
If gsw_check builds successfully, run it to test the toolbox:
./gsw_check
Usage (Windows / nmake):
------------------------
In the directory that the toolbox was unpacked, type:
nmake
and it will attempt to build gsw_check with a dynamically-linked GSW library.
Note that Developer Command Prompt for VS should be used or compiler paths
should be set manually.
If gsw_check builds successfully, run it to test the toolbox:
gsw_check.exe
Usage (meson build system):
---------------------------
We provide a meson.build file (https://mesonbuild.com/) for GSW-C that works
on Linux, Mac, and Windows.
To setup a build directory and install the library and headers:
meson setup builddir
meson install -C builddir
This will install gswteos-10.h, a shared library libgswteos-10 and a package
config file gswteos-10.pc.
Meson can be configured with options like prefix, default_library etc.:
meson setup builddir -Dprefix=/usr/local -Ddefault_library=static -Dbuildtype=release
meson install -C builddir
For more options see mesonbuild.com. To run the tests use:
meson test -C builddir -v
Notes:
------
C programs using the GSW Oceanographic Toolbox should include the
supplied header file:
#include <gswteos-10.h>
You'll probably want to build gsw_oceanographic_toolbox.c, and gsw_saar.c
into a library. "make library" will attempt to build a shared library for
gcc/GNU Linux platforms.
ChangeLog:
2017-02-23: gsw-3.05.0-3 Bug fix in gsw_geo_strf_dyn_height_pc.
2016-08-19: gsw-3.05.0-3 upstream changes and minor infrastructure fixes.
2015-08-26: gsw-3.05.1 added gsw_geo_strf_dyn_height,
gsw_geo_strf_dyn_height_pc and support functions.
2015-08-08: gsw-3.05 many new additions and code reorganization.
2015-04-13: gsw-3.03 new additions: gsw_spiciness functions.
2015-01-07: gsw-3.03 Bug fixes, new additions.
2014-06-13: gsw-3.03 Bug fixes, new additions.
2013-09-17: gsw-3.02 Bug fixes, new additions.
2013-03-29: gsw-3.01 Bug fixes, new additions.
2012-10-07: gsw-3.0.1 New gsw_check_functions.c based on revised f90.
2011-09-23: gsw-3.0 Initial creation.
Frank Delahoyde <fmdelahoyde@gmail.com>
For more recent changes, see the repo on Github:
https://github.com/TEOS-10/GSW-C