Skip to content

Commit

Permalink
Merge branch 'master' of hg::ssh://localhost/~/src/TEOS-10/gsw-3
Browse files Browse the repository at this point in the history
V3.05.0_2 gsw_geo_strf_dyn_height and support.
  • Loading branch information
Frank Delahoyde committed Aug 26, 2015
2 parents 530c5da + 9c4bd52 commit 3b01f73
Show file tree
Hide file tree
Showing 16 changed files with 94,935 additions and 92,897 deletions.
1 change: 1 addition & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
d7a5468a0b8c0ee5cb6816651111ff3f9002c40c 3.03.0
9fcb589f4b1d64904c96521c0f9eb80879eec76e 3.0.3
598ab1e9d3335922429698b2fe2e86cfaca1a816 3.05.0-1
94f86ff546f4e15ead5b5e09db103397bfe8bdcc 3.05.0-2
4 changes: 2 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 9ab24815eb12 2015/08/09 00:29:39 fdelahoyde $
# $Id: GNUmakefile,v 0db1b20bdf1b 2015/08/26 21:39:20 fdelahoyde $
# $Version: 3.05.0-1 $
# Makefile for libgswteos-10 on Linux/GNU.

Expand Down Expand Up @@ -42,7 +42,7 @@
awk -F . '{printf "%d.%d\n",$$1,$$2}')
Program:= gsw_check
$(Program)_SRCS:= gsw_check_functions.c
$(Program)_LIBS:= -L. -lgswteos-10 -lm -Wl,-rpath,./
$(Program)_LIBS:= -L. -lgswteos-10 -lm -Wl,-rpath,./ -lmcheck
$(Library)_SRCS:= gsw_oceanographic_toolbox.c \
gsw_saar.c
$(Library)_OBJS:= gsw_oceanographic_toolbox.o \
Expand Down
8 changes: 6 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
TEOS-10 V3.05 GSW Oceanographic Toolbox in C

This is a translation of the original Fortran-90 source code into C. Unlike
the Fortran-90 and Matlab versions of the toolbox the C version is primarily
scalar. You should download the documentation from http://teos-10.org.
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
Expand Down Expand Up @@ -53,6 +55,8 @@ gcc/GNU Linux platforms.

ChangeLog:

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.
Expand Down
4,701 changes: 2,423 additions & 2,278 deletions gsw_check_data.c

Large diffs are not rendered by default.

30 changes: 28 additions & 2 deletions gsw_check_functions.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** $Id: gsw_check_functions.c,v fd0cbbe936fc 2015/08/14 15:32:41 fdelahoyde $
** $Id: gsw_check_functions.c,v 0db1b20bdf1b 2015/08/26 21:39:20 fdelahoyde $
** $Version: 3.05.0-1 $
*/
#include <stdio.h>
Expand Down Expand Up @@ -96,7 +96,7 @@ double h[cast_m*cast_n];
int
main(int argc, char **argv)
{
int count = cast_m*cast_n, i, j, k, l;
int count = cast_m*cast_n, i, j, k, l, n;
double saturation_fraction, value[count], lat[count],
lon[count], val1[count], val2[count], val3[count],
val4[count], val5[count];
Expand Down Expand Up @@ -362,6 +362,32 @@ main(int argc, char **argv)
check_accuracy("ipv_vs_fnsquared_ratio",p_mid_ipvfn2_ca,"p_mid_ipvfn2",
count, val2, p_mid_ipvfn2);

for (j = 0; j<cast_mpres_n; j++) {
k = j*cast_m;
for (n=0; n<cast_m; n++)
if (isnan(sa[k+n]) || fabs(sa[k+n]) >= GSW_ERROR_LIMIT)
break;
if (gsw_geo_strf_dyn_height(&sa[k],&ct[k],&p[k],pref[0],n,
&val1[k]) == NULL)
printf("geo_strf_dyn_height returned NULL.\n");
}
check_accuracy("geo_strf_dyn_height",geo_strf_dyn_height_ca,
"geo_strf_dyn_height",count, val1, geo_strf_dyn_height);

for (j = 0; j<cast_mpres_n; j++) {
k = j*cast_m;
for (n=0; n<cast_m; n++)
if (isnan(sa[k+n]) || fabs(sa[k+n]) >= GSW_ERROR_LIMIT)
break;
gsw_geo_strf_dyn_height_pc(&sa[k],&ct[k],&delta_p[k],n,
&val1[k], &val2[k]);
}
check_accuracy("geo_strf_dyn_height_pc",geo_strf_dyn_height_pc_ca,
"geo_strf_dyn_height_pc",count, val1, geo_strf_dyn_height_pc);
check_accuracy("geo_strf_dyn_height_pc",geo_strf_dyn_height_pc_p_mid_ca,
"geo_strf_dyn_height_pc_p_mid",count, val2,
geo_strf_dyn_height_pc_p_mid);

section_title("Thermodynamic properties of ice Ih");

count = cast_ice_m*cast_ice_n;
Expand Down
Loading

0 comments on commit 3b01f73

Please sign in to comment.