Skip to content

Commit

Permalink
Add gsw_sa_ct_interp as an interpolation option for gsw_geo_strf_dyn_…
Browse files Browse the repository at this point in the history
…height_1
  • Loading branch information
mauzey1 committed Sep 25, 2024
1 parent e6afedf commit 6170072
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gsw_oceanographic_toolbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -4269,8 +4269,13 @@ gsw_geo_strf_dyn_height_1(double *sa, double *ct, double *p, double p_ref,
err = err || gsw_util_pchip_interp(p, ct, nz, p_i, ct_i, n_i);
if (err) err = 6;
}
else if (interp_method == INTERP_METHOD_MRST) {
err = gsw_sa_ct_interp(sa, ct, p, nz,
p_i, n_i, sa_i, ct_i);
if (err) err = 7;
}
else {
err = 7;
err = 8;
}
if (err) {
free(p_i);
Expand Down
1 change: 1 addition & 0 deletions gswteos-10.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ extern "C" {

#define INTERP_METHOD_LINEAR 1
#define INTERP_METHOD_PCHIP 2
#define INTERP_METHOD_MRST 3

/*
** Prototypes:
Expand Down

0 comments on commit 6170072

Please sign in to comment.