Skip to content
/ GSW-C Public

C implementation of the Thermodynamic Equation Of Seawater - 2010 (TEOS-10)

License

Notifications You must be signed in to change notification settings

TEOS-10/GSW-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Original README
###############

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

About

C implementation of the Thermodynamic Equation Of Seawater - 2010 (TEOS-10)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages