Title: | Gibbs Sea Water Functions |
---|---|
Description: | Provides an interface to the Gibbs 'SeaWater' ('TEOS-10') C library, version 3.06-16-0 (commit '657216dd4f5ea079b5f0e021a4163e2d26893371', dated 2022-10-11, available at <https://github.com/TEOS-10/GSW-C>, which stems from 'Matlab' and other code written by members of Working Group 127 of 'SCOR'/'IAPSO' (Scientific Committee on Oceanic Research / International Association for the Physical Sciences of the Oceans). |
Authors: | Dan Kelley [aut, cre, cph] |
Maintainer: | Dan Kelley <[email protected]> |
License: | GPL (>= 2) | file LICENSE |
Version: | 1.2-0 |
Built: | 2025-03-08 12:55:24 UTC |
Source: | https://github.com/teos-10/gsw-r |
This is mainly used within gsw, to ensure that arguments sent to the C functions are of equal length. This is a convenience, for processing data that often have this condition. For example, a CTD profile is likely to have many values for SP, t, and p, but just a single value for each of longitude and latitude. It is important to call argfix() to handle such cases, because otherwise the underlying C code will be looking past the end of the vectors storing longitude and latitude, which can yield odd results or even segmentation faults.
argfix(list)
argfix(list)
list |
A list of elements, typically arguments that will be used in GSW functions. |
A list with all elements of same shape (length or dimension).
Note that the unit is K/Pa; multiply by 1e4 to get the more useful K/dbar.
gsw_adiabatic_lapse_rate_from_CT(SA, CT, p)
gsw_adiabatic_lapse_rate_from_CT(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
adiabatic lapse rate (note unconventional unit) [ K/Pa ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_adiabatic_lapse_rate_from_CT.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) lr <- gsw_adiabatic_lapse_rate_from_CT(SA, CT, p) stopifnot(all.equal(lr*1e7, c(0.240199646230069, 0.238457486976761, 0.203635157319712, 0.119829566859790, 0.100052760967308, 0.087773070307283)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) lr <- gsw_adiabatic_lapse_rate_from_CT(SA, CT, p) stopifnot(all.equal(lr*1e7, c(0.240199646230069, 0.238457486976761, 0.203635157319712, 0.119829566859790, 0.100052760967308, 0.087773070307283)))
Note that the unit is K/Pa; multiply by 1e4 to get the more useful K/dbar.
gsw_adiabatic_lapse_rate_ice(t, p)
gsw_adiabatic_lapse_rate_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
adiabatic lapse rate (note unconventional unit) [ K/Pa ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_adiabatic_lapse_rate_ice.html
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) lr <- gsw_adiabatic_lapse_rate_ice(t, p) stopifnot(all.equal(lr*1e7, c(0.218777853913651, 0.216559115188599, 0.216867659957613, 0.216988337914416, 0.217182707402780, 0.218100558740840)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) lr <- gsw_adiabatic_lapse_rate_ice(t, p) stopifnot(all.equal(lr*1e7, c(0.218777853913651, 0.216559115188599, 0.216867659957613, 0.216988337914416, 0.217182707402780, 0.218100558740840)))
Thermal expansion coefficient with respect to Conservative Temperature, using the 75-term equation for specific volume.
gsw_alpha(SA, CT, p)
gsw_alpha(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
thermal expansion coefficient with respect to Conservative Temperature [ 1/K ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_alpha.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) alpha <- gsw_alpha(SA,CT,p) stopifnot(all.equal(alpha*1e3, c(0.324464211877393, 0.322610094680523, 0.281335030247435, 0.173529986885424, 0.146898108553385, 0.130265123640082)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) alpha <- gsw_alpha(SA,CT,p) stopifnot(all.equal(alpha*1e3, c(0.324464211877393, 0.322610094680523, 0.281335030247435, 0.173529986885424, 0.146898108553385, 0.130265123640082)))
Thermal expansion coefficient over haline contraction coefficient, using the 75-term equation for specific volume.
gsw_alpha_on_beta(SA, CT, p)
gsw_alpha_on_beta(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
ratio of thermal expansion coefficient to haline contraction coefficient [ (g/kg)/K ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_alpha_on_beta.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) alpha_on_beta <- gsw_alpha_on_beta(SA,CT,p) stopifnot(all.equal(alpha_on_beta, c(0.452468543022009, 0.449601695030057, 0.387140203094424, 0.230778871228268, 0.193747796234162, 0.170946048860385)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) alpha_on_beta <- gsw_alpha_on_beta(SA,CT,p) stopifnot(all.equal(alpha_on_beta, c(0.452468543022009, 0.449601695030057, 0.387140203094424, 0.230778871228268, 0.193747796234162, 0.170946048860385)))
Thermal expansion coefficient with respect to in-situ temperature.
gsw_alpha_wrt_t_exact(SA, t, p)
gsw_alpha_wrt_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
thermal expansion coefficient with respect to in-situ temperature [ 1/K ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_alpha_wrt_t_exact.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) alpha_wrt_t_exact <- gsw_alpha_wrt_t_exact(SA,t,p) stopifnot(all.equal(alpha_wrt_t_exact*1e3, c(0.325601747227247, 0.323448083851267, 0.281413883319329, 0.172825692975230, 0.145569941503599, 0.128362986933288)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) alpha_wrt_t_exact <- gsw_alpha_wrt_t_exact(SA,t,p) stopifnot(all.equal(alpha_wrt_t_exact*1e3, c(0.325601747227247, 0.323448083851267, 0.281413883319329, 0.172825692975230, 0.145569941503599, 0.128362986933288)))
Thermal expansion coefficient of ice, with respect to in-situ temperature.
gsw_alpha_wrt_t_ice(t, p)
gsw_alpha_wrt_t_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
thermal expansion coefficient with respect to in-situ temperature [ 1/K ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_alpha_wrt_t_ice.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) alpha <- gsw_alpha_wrt_t_ice(t, p) stopifnot(all.equal(alpha*1e3, c(0.154472408751279, 0.153041866100900, 0.153232698269327, 0.153297634665747, 0.153387461617896, 0.153938395452558)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) alpha <- gsw_alpha_wrt_t_ice(t, p) stopifnot(all.equal(alpha*1e3, c(0.154472408751279, 0.153041866100900, 0.153232698269327, 0.153297634665747, 0.153387461617896, 0.153938395452558)))
Haline contraction coefficient with respect to Conservative Temperature, using the 75-term equation for specific volume.
gsw_beta(SA, CT, p)
gsw_beta(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Haline contraction coefficient at constant Conservative Temperature [ kg/g ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_beta.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) beta <- gsw_beta(SA,CT,p) stopifnot(all.equal(beta, 1e-3*c(0.717521909550091, 0.717657376442386, 0.726169785748549, 0.750420924314564, 0.754903052075032, 0.756841573481865)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) beta <- gsw_beta(SA,CT,p) stopifnot(all.equal(beta, 1e-3*c(0.717521909550091, 0.717657376442386, 0.726169785748549, 0.750420924314564, 0.754903052075032, 0.756841573481865)))
Haline contraction coefficient at constant in-situ temperature.
gsw_beta_const_t_exact(SA, t, p)
gsw_beta_const_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Haline contraction coefficient at constant in-situ temperature [ kg/g ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_beta_const_t_exact.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) b <- gsw_beta_const_t_exact(SA, t, p) stopifnot(all.equal(b*1e3, c(0.731120837010429, 0.731071779078011, 0.736019128913071, 0.753810501711847, 0.757259405338257, 0.758649268096996)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) b <- gsw_beta_const_t_exact(SA, t, p) stopifnot(all.equal(b*1e3, c(0.731120837010429, 0.731071779078011, 0.736019128913071, 0.753810501711847, 0.757259405338257, 0.758649268096996)))
Electrical conductivity (in mS/cm) from Practical Salinity. To convert the return value to conductivity ratio, divide by 42.9140 (the value of conductivity at S=35, T68=15, and p=0).
gsw_C_from_SP(SP, t, p)
gsw_C_from_SP(SP, t, p)
SP |
Practical Salinity (PSS-78) [ unitless ]. The valid range for most 'gsw' functions is from 2 to 42. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
electrical conductivity [ mS/cm ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_C_from_SP.html
Other things related to salinity:
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
Other things related to conductivity:
gsw_SP_from_C()
SP <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) C <- gsw_C_from_SP(SP, t, p) stopifnot(all.equal(C, c(56.412599581571186, 56.316185602699953, 50.670369333973944, 38.134518936104350, 35.056577637635257, 32.986550607990118)))
SP <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) C <- gsw_C_from_SP(SP, t, p) stopifnot(all.equal(C, c(56.412599581571186, 56.316185602699953, 50.670369333973944, 38.134518936104350, 35.056577637635257, 32.986550607990118)))
Cabbeling coefficient (75-term equation)
gsw_cabbeling(SA, CT, p)
gsw_cabbeling(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Cabbeling coefficient with respect to Conservative Temperature [ 1/(K^2) ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_cabbeling.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) cabbeling <- gsw_cabbeling(SA,CT,p) stopifnot(all.equal(cabbeling*1e4, c(0.086645721047423, 0.086837829466794, 0.092525582052438, 0.108884336975401, 0.112971197222338, 0.115483896148927)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) cabbeling <- gsw_cabbeling(SA,CT,p) stopifnot(all.equal(cabbeling*1e4, c(0.086645721047423, 0.086837829466794, 0.092525582052438, 0.108884336975401, 0.112971197222338, 0.115483896148927)))
Chemical Potential of Ice
gsw_chem_potential_water_ice(t, p)
gsw_chem_potential_water_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
chemical potential [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_chem_potential_water_ice.html
Other things related to chemical potential:
gsw_chem_potential_water_t_exact()
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) pot <- gsw_chem_potential_water_ice(t, p) stopifnot(all.equal(pot/1e4, c(-1.340648365149857, -1.644921413491445, -1.480991678890353, -1.272436055728805, -0.711509477199393, 0.045575390357792)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) pot <- gsw_chem_potential_water_ice(t, p) stopifnot(all.equal(pot/1e4, c(-1.340648365149857, -1.644921413491445, -1.480991678890353, -1.272436055728805, -0.711509477199393, 0.045575390357792)))
Chemical Potential of Water in Seawater
gsw_chem_potential_water_t_exact(SA, t, p)
gsw_chem_potential_water_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
chemical potential [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_chem_potential_water_t_exact.html
Other things related to chemical potential:
gsw_chem_potential_water_ice()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) pot <- gsw_chem_potential_water_t_exact(SA, t, p) stopifnot(all.equal(pot, c(-8.545561146284534, -8.008085548342105, -5.103980139874876, -0.634067782745442, 3.335566803473286, 7.555434445971858)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) pot <- gsw_chem_potential_water_t_exact(SA, t, p) stopifnot(all.equal(pot, c(-8.545561146284534, -8.008085548342105, -5.103980139874876, -0.634067782745442, 3.335566803473286, 7.555434445971858)))
Specific heat of ice
gsw_cp_ice(t, p)
gsw_cp_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
specific heat [ J/(K*kg) ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_cp_ice.html
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) cp <- gsw_cp_ice(t, p) stopifnot(all.equal(cp, c(2017.314262094657, 1997.830122682709, 2002.281331375396, 2006.127319545421, 2015.676303959609, 2033.308170371559)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) cp <- gsw_cp_ice(t, p) stopifnot(all.equal(cp, c(2017.314262094657, 1997.830122682709, 2002.281331375396, 2006.127319545421, 2015.676303959609, 2033.308170371559)))
Isobaric heat capacity
gsw_cp_t_exact(SA, t, p)
gsw_cp_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
heat capacity [ J/(kg*K) ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_cp_t_exact.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) cp_t_exact <- gsw_cp_t_exact(SA, t, p) stopifnot(all.equal(cp_t_exact/1e3, c(4.002888003958537, 4.000980283927373, 3.995546468894633, 3.985076769021370, 3.973593843482723, 3.960184084786622)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) cp_t_exact <- gsw_cp_t_exact(SA, t, p) stopifnot(all.equal(cp_t_exact/1e3, c(4.002888003958537, 4.000980283927373, 3.995546468894633, 3.985076769021370, 3.973593843482723, 3.960184084786622)))
First Derivatives of Conservative Temperature
gsw_CT_first_derivatives(SA, pt)
gsw_CT_first_derivatives(SA, pt)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
pt |
potential temperature (ITS-90) [ degC ] |
A list containing CT_SA
[ K/(g/kg) ], the derivative of
Conservative Temperature with respect to Absolute Salinity,
and CT_pt
[ unitless ], the derivative of
Conservative Temperature with respect to potential temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_first_derivatives.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) pt <- c(28.7832, 28.4209, 22.7850, 10.2305, 6.8292, 4.3245) r <- gsw_CT_first_derivatives(SA, pt) stopifnot(all.equal(r$CT_SA, c(-0.041981092877806, -0.041558140199508, -0.034739209004865, -0.018711103772892, -0.014075941811725, -0.010571716552295))) stopifnot(all.equal(r$CT_pt, c(1.002814937296636, 1.002554817053239, 1.001645140295163, 1.000003771100520, 0.999716359504731, 0.999474326580093)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) pt <- c(28.7832, 28.4209, 22.7850, 10.2305, 6.8292, 4.3245) r <- gsw_CT_first_derivatives(SA, pt) stopifnot(all.equal(r$CT_SA, c(-0.041981092877806, -0.041558140199508, -0.034739209004865, -0.018711103772892, -0.014075941811725, -0.010571716552295))) stopifnot(all.equal(r$CT_pt, c(1.002814937296636, 1.002554817053239, 1.001645140295163, 1.000003771100520, 0.999716359504731, 0.999474326580093)))
Derivatives of Conservative Temperature with Respect to or at Constant in-situ Temperature
gsw_CT_first_derivatives_wrt_t_exact(SA, t, p)
gsw_CT_first_derivatives_wrt_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing CT_SA_wrt_t
[ K/(g/kg) ], the derivative of
Conservative Temperature with respect to Absolute Salinity at constant
temperature and pressure, CT_t_wrt_t
[ unitless], the derivative of
Conservative Temperature with respect to temperature at constant
Absolute Salinity and pressure, and CT_p_wrt_t
, the derivative
of Conservative Temperature with respect to pressure at constant Absolute
Salinity and temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_first_derivatives_wrt_t_exact.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_CT_first_derivatives_wrt_t_exact(SA, t, p) stopifnot(all.equal(r$CT_SA_wrt_t, c(-0.041988694538987, -0.041596549088952, -0.034853545749326, -0.019067140454607, -0.015016439826591, -0.012233725491373))) stopifnot(all.equal(r$CT_t_wrt_t, c(1.002752642867571, 1.002243118597902, 1.000835702767227, 0.998194915250648, 0.995219303532390, 0.991780205482695))) stopifnot(all.equal(r$CT_p_wrt_t/1e-7, c(-0.241011880838437, -0.239031676279078, -0.203649928441505, -0.119370679226136, -0.099140832825342, -0.086458168643579)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_CT_first_derivatives_wrt_t_exact(SA, t, p) stopifnot(all.equal(r$CT_SA_wrt_t, c(-0.041988694538987, -0.041596549088952, -0.034853545749326, -0.019067140454607, -0.015016439826591, -0.012233725491373))) stopifnot(all.equal(r$CT_t_wrt_t, c(1.002752642867571, 1.002243118597902, 1.000835702767227, 0.998194915250648, 0.995219303532390, 0.991780205482695))) stopifnot(all.equal(r$CT_p_wrt_t/1e-7, c(-0.241011880838437, -0.239031676279078, -0.203649928441505, -0.119370679226136, -0.099140832825342, -0.086458168643579)))
Conservative Temperature of Freezing Seawater
gsw_CT_freezing(SA, p, saturation_fraction = 1)
gsw_CT_freezing(SA, p, saturation_fraction = 1)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
saturation fraction of dissolved air in seawater |
Conservative Temperature at freezing of seawater [ degC ].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_freezing.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 CT <- gsw_CT_freezing(SA, p, saturation_fraction) stopifnot(all.equal(CT, c(-1.899683776424096, -1.940791867869104, -2.006240664432488, -2.092357761318778, -2.359300831770506, -2.677162675412748)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 CT <- gsw_CT_freezing(SA, p, saturation_fraction) stopifnot(all.equal(CT, c(-1.899683776424096, -1.940791867869104, -2.006240664432488, -2.092357761318778, -2.359300831770506, -2.677162675412748)))
First Derivatives of Conservative Temperature for Freezing Water
gsw_CT_freezing_first_derivatives(SA, p, saturation_fraction = 1)
gsw_CT_freezing_first_derivatives(SA, p, saturation_fraction = 1)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
A list containing CTfreezing_SA
[ K/(g/kg) ], the derivative of
Conservative Temperature with respect to Absolute Salinity at constant
potential temperature, and CTfreezing_p
[ unitless], the derivative of
Conservative Temperature with respect to pressure at constant
Absolute Salinity.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_freezing_first_derivatives.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- c( 1, 0.8, 0.6, 0.5, 0.4, 0) r <- gsw_CT_freezing_first_derivatives(SA, p, saturation_fraction) stopifnot(all.equal(r$CTfreezing_SA, c(-0.058193253897272, -0.058265158334170, -0.058345661671901, -0.058373842446463, -0.058534544740846, -0.058730846361252))) stopifnot(all.equal(r$CTfreezing_p/1e-7, c(-0.765300390432684, -0.766942996466485, -0.769892679988284, -0.774561011527902, -0.787769143040504, -0.802771548245855)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- c( 1, 0.8, 0.6, 0.5, 0.4, 0) r <- gsw_CT_freezing_first_derivatives(SA, p, saturation_fraction) stopifnot(all.equal(r$CTfreezing_SA, c(-0.058193253897272, -0.058265158334170, -0.058345661671901, -0.058373842446463, -0.058534544740846, -0.058730846361252))) stopifnot(all.equal(r$CTfreezing_p/1e-7, c(-0.765300390432684, -0.766942996466485, -0.769892679988284, -0.774561011527902, -0.787769143040504, -0.802771548245855)))
First Derivatives of Conservative Temperature for Freezing Water (Polynomial version)
gsw_CT_freezing_first_derivatives_poly(SA, p, saturation_fraction = 1)
gsw_CT_freezing_first_derivatives_poly(SA, p, saturation_fraction = 1)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
A list containing CTfreezing_SA
[ K/(g/kg) ], the derivative of
Conservative Temperature with respect to Absolute Salinity at constant
potential temperature, and CTfreezing_p
[ unitless], the derivative of
Conservative Temperature with respect to pressure at constant
Absolute Salinity.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_freezing_first_derivatives_poly.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- c( 1, 0.8, 0.6, 0.5, 0.4, 0) r <- gsw_CT_freezing_first_derivatives_poly(SA, p, saturation_fraction) stopifnot(all.equal(r$CTfreezing_SA, c(-0.058191181082769, -0.058263310660779, -0.058343573188907, -0.058370514075271, -0.058528023214462, -0.058722959729433))) stopifnot(all.equal(r$CTfreezing_p/1e-7, c(-0.765690732336706, -0.767310677213890, -0.770224214219328, -0.774843488962665, -0.787930403016584, -0.802821704643775)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- c( 1, 0.8, 0.6, 0.5, 0.4, 0) r <- gsw_CT_freezing_first_derivatives_poly(SA, p, saturation_fraction) stopifnot(all.equal(r$CTfreezing_SA, c(-0.058191181082769, -0.058263310660779, -0.058343573188907, -0.058370514075271, -0.058528023214462, -0.058722959729433))) stopifnot(all.equal(r$CTfreezing_p/1e-7, c(-0.765690732336706, -0.767310677213890, -0.770224214219328, -0.774843488962665, -0.787930403016584, -0.802821704643775)))
Conservative Temperature Freezing Point (Polynomial version)
gsw_CT_freezing_poly(SA, p, saturation_fraction = 1)
gsw_CT_freezing_poly(SA, p, saturation_fraction = 1)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
saturation fraction of dissolved air in seawater |
Conservative Temperature at freezing of seawater [ degC ].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_freezing_poly.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 CT_freezing <- gsw_CT_freezing(SA, p, saturation_fraction) stopifnot(all.equal(CT_freezing, c(-1.899683776424096, -1.940791867869104, -2.006240664432488, -2.092357761318778, -2.359300831770506, -2.677162675412748)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 CT_freezing <- gsw_CT_freezing(SA, p, saturation_fraction) stopifnot(all.equal(CT_freezing, c(-1.899683776424096, -1.940791867869104, -2.006240664432488, -2.092357761318778, -2.359300831770506, -2.677162675412748)))
Conservative Temperature from Enthalpy
gsw_CT_from_enthalpy(SA, h, p)
gsw_CT_from_enthalpy(SA, h, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
h |
specific enthalpy [ J/kg ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Conservative Temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_from_enthalpy.html
Other things related to enthalpy:
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) h <- c(1.15103e5, 1.14014e5, 0.92180e5, 0.43255e5, 0.33087e5, 0.26970e5) p <- c( 10, 50, 125, 250, 600, 1000) pt <- c(28.7832, 28.4209, 22.7850, 10.2305, 6.8292, 4.3245) CT <- gsw_CT_from_enthalpy(SA, h, p) stopifnot(all.equal(CT, c(28.809854569021972, 28.439026483379287, 22.786196534098817, 10.226106994920777, 6.827159682675204, 4.323428660306681)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) h <- c(1.15103e5, 1.14014e5, 0.92180e5, 0.43255e5, 0.33087e5, 0.26970e5) p <- c( 10, 50, 125, 250, 600, 1000) pt <- c(28.7832, 28.4209, 22.7850, 10.2305, 6.8292, 4.3245) CT <- gsw_CT_from_enthalpy(SA, h, p) stopifnot(all.equal(CT, c(28.809854569021972, 28.439026483379287, 22.786196534098817, 10.226106994920777, 6.827159682675204, 4.323428660306681)))
Conservative Temperature from Entropy
gsw_CT_from_entropy(SA, entropy)
gsw_CT_from_entropy(SA, entropy)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
entropy |
specific entropy [ J/(degC*kg) ] |
Conservative Temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_from_entropy.html
Other things related to entropy:
gsw_entropy_first_derivatives()
,
gsw_entropy_from_pt()
,
gsw_entropy_from_t()
,
gsw_entropy_ice()
,
gsw_pt_from_entropy()
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) entropy <- c(400.3892, 395.4378, 319.8668, 146.7910, 98.6471, 62.7919) CT <- gsw_CT_from_entropy(SA, entropy) stopifnot(all.equal(CT, c(28.809902787278070, 28.439199226786918, 22.786199266954270, 10.226197672488652, 6.827196739780282, 4.323602945446461)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) entropy <- c(400.3892, 395.4378, 319.8668, 146.7910, 98.6471, 62.7919) CT <- gsw_CT_from_entropy(SA, entropy) stopifnot(all.equal(CT, c(28.809902787278070, 28.439199226786918, 22.786199266954270, 10.226197672488652, 6.827196739780282, 4.323602945446461)))
Conservative Temperature from Potential Temperature
gsw_CT_from_pt(SA, pt)
gsw_CT_from_pt(SA, pt)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
pt |
potential temperature (ITS-90) [ degC ] |
Conservative Temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_from_pt.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) pt <- c(28.7832, 28.4209, 22.7850, 10.2305, 6.8292, 4.3245) CT <- gsw_CT_from_pt(SA, pt) stopifnot(all.equal(CT, c(28.809923015982083, 28.439144260767169, 22.786246608464264, 10.226165605435785, 6.827183417643142, 4.323565182322069)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) pt <- c(28.7832, 28.4209, 22.7850, 10.2305, 6.8292, 4.3245) CT <- gsw_CT_from_pt(SA, pt) stopifnot(all.equal(CT, c(28.809923015982083, 28.439144260767169, 22.786246608464264, 10.226165605435785, 6.827183417643142, 4.323565182322069)))
Conservative Temperature from Density, Absolute Salinity and Pressure
gsw_CT_from_rho(rho, SA, p)
gsw_CT_from_rho(rho, SA, p)
rho |
seawater density [ kg/m^3 ] |
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing two estimates of Conservative Temperature:
CT
and CT_multiple
, each in [ degC ].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_from_rho.html
Other things related to density:
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
rho <- c(1021.8484, 1022.2647, 1024.4207, 1027.7841, 1029.8287, 1031.9916) SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_CT_from_rho(rho, SA, p) stopifnot(all.equal(r$CT, c(28.784377302226968, 28.432402127485858, 22.808745445250068, 10.260169334807866, 6.887336649146716, 4.404594162282834)))
rho <- c(1021.8484, 1022.2647, 1024.4207, 1027.7841, 1029.8287, 1031.9916) SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_CT_from_rho(rho, SA, p) stopifnot(all.equal(r$CT, c(28.784377302226968, 28.432402127485858, 22.808745445250068, 10.260169334807866, 6.887336649146716, 4.404594162282834)))
Convert from temperature to conservative temperature
gsw_CT_from_t(SA, t, p)
gsw_CT_from_t(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Conservative Temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_from_t.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) CT <- gsw_CT_from_t(SA, t, p) stopifnot(all.equal(CT, c(28.809919826700281, 28.439227816091140, 22.786176893078498, 10.226189266620782, 6.827213633479988, 4.323575748610455)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) CT <- gsw_CT_from_t(SA, t, p) stopifnot(all.equal(CT, c(28.809919826700281, 28.439227816091140, 22.786176893078498, 10.226189266620782, 6.827213633479988, 4.323575748610455)))
Conservative Temperature at Maximum Density
gsw_CT_maxdensity(SA, p)
gsw_CT_maxdensity(SA, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Conservative Temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_maxdensity.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) CT <- gsw_CT_maxdensity(SA, p) stopifnot(all.equal(CT, c(-3.731407240089855, -3.861137427731664, -4.060390602245942, -4.306222571955388, -5.089240667106197, -6.028034316992341)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) CT <- gsw_CT_maxdensity(SA, p) stopifnot(all.equal(CT, c(-3.731407240089855, -3.861137427731664, -4.060390602245942, -4.306222571955388, -5.089240667106197, -6.028034316992341)))
Second Derivatives of Conservative Temperature
gsw_CT_second_derivatives(SA, pt)
gsw_CT_second_derivatives(SA, pt)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
pt |
potential temperature (ITS-90) [ degC ] |
A list containing CT_SA_SA
[ K/(g/kg)^2 ], the second derivative of
Conservative Temperature with respect to Absolute Salinity at constant
potential temperature, and CT_SA_pt
[ 1/(g/kg) ], the derivative of
Conservative Temperature with respect to potential temperature and
Absolute Salinity, and CT_pt_pt
[ 1/degC ], the second derivative of
Conservative Temperature with respect to potential temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_CT_second_derivatives.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) pt <- c(28.7832, 28.4209, 22.7850, 10.2305, 6.8292, 4.3245) r <- gsw_CT_second_derivatives(SA, pt) stopifnot(all.equal(r$CT_SA_SA/1e-3, c(-0.060718502077064, -0.062065324400873, -0.084017055354742, -0.148436050120131, -0.171270386500246, -0.189920754900116))) stopifnot(all.equal(r$CT_SA_pt, c(-0.001197415000869, -0.001198309530139, -0.001226523296082, -0.001335896286481, -0.001380492698572, -0.001417751669135))) stopifnot(all.equal(r$CT_pt_pt/1e-3, c(0.123012754427146, 0.124662008871271, 0.140829458783443, 0.140646803448166, 0.113684095615077, 0.082286843477998)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) pt <- c(28.7832, 28.4209, 22.7850, 10.2305, 6.8292, 4.3245) r <- gsw_CT_second_derivatives(SA, pt) stopifnot(all.equal(r$CT_SA_SA/1e-3, c(-0.060718502077064, -0.062065324400873, -0.084017055354742, -0.148436050120131, -0.171270386500246, -0.189920754900116))) stopifnot(all.equal(r$CT_SA_pt, c(-0.001197415000869, -0.001198309530139, -0.001226523296082, -0.001335896286481, -0.001380492698572, -0.001417751669135))) stopifnot(all.equal(r$CT_pt_pt/1e-3, c(0.123012754427146, 0.124662008871271, 0.140829458783443, 0.140646803448166, 0.113684095615077, 0.082286843477998)))
Absolute Salinity Anomaly from Practical Salinity
gsw_deltaSA_from_SP(SP, p, longitude, latitude)
gsw_deltaSA_from_SP(SP, p, longitude, latitude)
SP |
Practical Salinity (PSS-78) [ unitless ]. The valid range for most 'gsw' functions is from 2 to 42. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
deltaSA Absolute Salinity Anomaly [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_deltaSA_from_SP.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
SP = c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p = c( 10, 50, 125, 250, 600, 1000) lat = c( 4, 4, 4, 4, 4, 4) long = c( 188, 188, 188, 188, 188, 188) deltaSA = gsw_deltaSA_from_SP(SP,p,long,lat) stopifnot(all.equal(deltaSA, c(0.000167203365230, 0.000268836122231, 0.000665803155705, 0.002706154619403, 0.005652977406832, 0.009444734661606)))
SP = c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p = c( 10, 50, 125, 250, 600, 1000) lat = c( 4, 4, 4, 4, 4, 4) long = c( 188, 188, 188, 188, 188, 188) deltaSA = gsw_deltaSA_from_SP(SP,p,long,lat) stopifnot(all.equal(deltaSA, c(0.000167203365230, 0.000268836122231, 0.000665803155705, 0.002706154619403, 0.005652977406832, 0.009444734661606)))
Dilution coefficient
gsw_dilution_coefficient_t_exact(SA, t, p)
gsw_dilution_coefficient_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
dilution coefficient [ (J/kg)(kg/g) ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_dilution_coefficient_t_exact.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) dc <- gsw_dilution_coefficient_t_exact(SA, t, p) stopifnot(all.equal(dc, c(79.140034211532040, 79.104983526833820, 77.503312016847389, 73.535062653715272, 72.483378545466564, 71.760667498673087)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) dc <- gsw_dilution_coefficient_t_exact(SA, t, p) stopifnot(all.equal(dc, c(79.140034211532040, 79.104983526833820, 77.503312016847389, 73.535062653715272, 72.483378545466564, 71.760667498673087)))
Dynamic enthalpy of seawater (75-term equation)
gsw_dynamic_enthalpy(SA, CT, p)
gsw_dynamic_enthalpy(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
dynamic enthalpy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_enthalpy.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <-c( 28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) de <- gsw_dynamic_enthalpy(SA, CT, p) stopifnot(all.equal(de/1000, c(0.097864698087770, 0.489161476686235, 1.220512192086506, 2.433731199531144, 5.833880057399701, 9.711443860944032)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <-c( 28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) de <- gsw_dynamic_enthalpy(SA, CT, p) stopifnot(all.equal(de/1000, c(0.097864698087770, 0.489161476686235, 1.220512192086506, 2.433731199531144, 5.833880057399701, 9.711443860944032)))
Specific enthalpy of seawater (75-term equation)
gsw_enthalpy(SA, CT, p)
gsw_enthalpy(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
specific enthalpy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_enthalpy.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <-c( 28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_enthalpy(SA, CT, p) stopifnot(all.equal(e/1e5, c(1.151031813559086, 1.140146926828028, 0.921800138366058, 0.432553713026279, 0.330871609742468, 0.269706841603465)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <-c( 28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_enthalpy(SA, CT, p) stopifnot(all.equal(e/1e5, c(1.151031813559086, 1.140146926828028, 0.921800138366058, 0.432553713026279, 0.330871609742468, 0.269706841603465)))
Seawater Specific Enthalpy in terms of Conservative Temperature
gsw_enthalpy_CT_exact(SA, CT, p)
gsw_enthalpy_CT_exact(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
specific enthalpy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_enthalpy_CT_exact.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_enthalpy_CT_exact(SA, CT, p) stopifnot(all.equal(e/1e5, c(1.151031813321767, 1.140146925586514, 0.921800131787836, 0.432553712315790, 0.330871615358722, 0.269706848807403)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_enthalpy_CT_exact(SA, CT, p) stopifnot(all.equal(e/1e5, c(1.151031813321767, 1.140146925586514, 0.921800131787836, 0.432553712315790, 0.330871615358722, 0.269706848807403)))
Specific enthalpy difference [ J/kg ].
gsw_enthalpy_diff(SA, CT, p_shallow, p_deep)
gsw_enthalpy_diff(SA, CT, p_shallow, p_deep)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p_shallow |
pressure at a shallower depth [ dbar ] |
p_deep |
pressure at a deeper depth [ dbar ] |
specific enthalpy difference [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_enthalpy_diff.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p_shallow <- c(10, 50, 125, 250, 600, 1000) p_deep <- c( 110, 150, 225, 350, 700, 1100) ed <- gsw_enthalpy_diff(SA, CT, p_shallow, p_deep) stopifnot(all.equal(ed/1e2, c(9.784180644568052, 9.780195056105020, 9.759587700515114, 9.727552719534447, 9.708223170174454, 9.687871289079633)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p_shallow <- c(10, 50, 125, 250, 600, 1000) p_deep <- c( 110, 150, 225, 350, 700, 1100) ed <- gsw_enthalpy_diff(SA, CT, p_shallow, p_deep) stopifnot(all.equal(ed/1e2, c(9.784180644568052, 9.780195056105020, 9.759587700515114, 9.727552719534447, 9.708223170174454, 9.687871289079633)))
First Derivatives of Enthalpy
gsw_enthalpy_first_derivatives(SA, CT, p)
gsw_enthalpy_first_derivatives(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
a list containing h_SA
[ (J/kg)/(g/kg) ], the derivative
of enthalpy wrt Absolute Salinity, and h_CT
[ (J/kg)/degC ],
the derivative of enthalpy wrt Conservative Temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_enthalpy_first_derivatives.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) d <- gsw_enthalpy_first_derivatives(SA, CT, p) stopifnot(all.equal(d$h_SA, c(-0.070223912348929, -0.351159768365102, -0.887025065692568, -1.829602387915694, -4.423463748270238, -7.405100077558673))) stopifnot(all.equal(d$h_CT/1e3, c(3.991899705530481, 3.992025640520101, 3.992210365030743, 3.992284150250490, 3.992685389122658, 3.993014168534175)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) d <- gsw_enthalpy_first_derivatives(SA, CT, p) stopifnot(all.equal(d$h_SA, c(-0.070223912348929, -0.351159768365102, -0.887025065692568, -1.829602387915694, -4.423463748270238, -7.405100077558673))) stopifnot(all.equal(d$h_CT/1e3, c(3.991899705530481, 3.992025640520101, 3.992210365030743, 3.992284150250490, 3.992685389122658, 3.993014168534175)))
First Derivatives of Enthalpy wrt CT
gsw_enthalpy_first_derivatives_CT_exact(SA, CT, p)
gsw_enthalpy_first_derivatives_CT_exact(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
a list containing h_SA
[ (J/kg)/(g/kg) ], the derivative
of enthalpy wrt Absolute Salinity, and h_CT
[ (J/kg)/degC ],
the derivative of enthalpy wrt Conservative Temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
The HTML documentation suggests that this function returns 3 values, but there are only 2 returned values in the C code used here (and the matlab code on which that is based). Also, the d/dSA check values given the HTML are not reproduced by the present function. This was reported on Mar 18, 2017 as https://github.com/TEOS-10/GSW-Matlab/issues/7. See https://github.com/TEOS-10/GSW-R/issues/34
http://www.teos-10.org/pubs/gsw/html/gsw_enthalpy_first_derivatives_CT_exact.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) d <- gsw_enthalpy_first_derivatives_CT_exact(SA, CT, p) stopifnot(all.equal(d$h_SA, c(-0.070224183838619, -0.351159869043798, -0.887036550157504, -1.829626251448858, -4.423522691827955, -7.405211691293971))) stopifnot(all.equal(d$h_CT/1e3, c(3.991899712269790, 3.992025674159605, 3.992210402650973, 3.992283991748418, 3.992685275917238, 3.993014370250710)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) d <- gsw_enthalpy_first_derivatives_CT_exact(SA, CT, p) stopifnot(all.equal(d$h_SA, c(-0.070224183838619, -0.351159869043798, -0.887036550157504, -1.829626251448858, -4.423522691827955, -7.405211691293971))) stopifnot(all.equal(d$h_CT/1e3, c(3.991899712269790, 3.992025674159605, 3.992210402650973, 3.992283991748418, 3.992685275917238, 3.993014370250710)))
Specific enthalpy of ice [ J/kg ]. Note that this is a negative quantity.
gsw_enthalpy_ice(t, p)
gsw_enthalpy_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
specific enthalpy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_enthalpy_ice.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) se <- gsw_enthalpy_ice(t, p) stopifnot(all.equal(se/1e5, c(-3.554414597446597, -3.603380857687490, -3.583089884253586, -3.558998379233944, -3.494811024956881, -3.402784319238127)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) se <- gsw_enthalpy_ice(t, p) stopifnot(all.equal(se/1e5, c(-3.554414597446597, -3.603380857687490, -3.583089884253586, -3.558998379233944, -3.494811024956881, -3.402784319238127)))
Second Derivatives of Enthalpy
gsw_enthalpy_second_derivatives(SA, CT, p)
gsw_enthalpy_second_derivatives(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing h_SA_SA
[ (J/kg)/(g/kg)^2 ], the second derivative of
enthalpy with respect to Absolute Salinity, h_SA_CT
[ (J/kg)/(K*g/kg) ], the derivative of
enthalpy with respect to Absolute Salinity and Conservative Temperature,
and h_CT_CT
[ (J/kg)/degC^2 ], the second derivative of
enthalpy with respect to Conservative Temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_enthalpy_second_derivatives.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_enthalpy_second_derivatives(SA, CT, p) stopifnot(all.equal(r$h_SA_SA, c(0.000080922482023, 0.000404963500641, 0.001059800046742, 0.002431088963823, 0.006019611828423, 0.010225411250217))) stopifnot(all.equal(r$h_SA_CT, c(0.000130004715129, 0.000653614489248, 0.001877220817849, 0.005470392103793, 0.014314756132297, 0.025195603327700))) stopifnot(all.equal(r$h_CT_CT, c(0.000714303909834, 0.003584401249266, 0.009718730753139, 0.024064471995224, 0.061547884081343, 0.107493969308119)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_enthalpy_second_derivatives(SA, CT, p) stopifnot(all.equal(r$h_SA_SA, c(0.000080922482023, 0.000404963500641, 0.001059800046742, 0.002431088963823, 0.006019611828423, 0.010225411250217))) stopifnot(all.equal(r$h_SA_CT, c(0.000130004715129, 0.000653614489248, 0.001877220817849, 0.005470392103793, 0.014314756132297, 0.025195603327700))) stopifnot(all.equal(r$h_CT_CT, c(0.000714303909834, 0.003584401249266, 0.009718730753139, 0.024064471995224, 0.061547884081343, 0.107493969308119)))
Second Derivatives of Enthalpy (exact)
gsw_enthalpy_second_derivatives_CT_exact(SA, CT, p)
gsw_enthalpy_second_derivatives_CT_exact(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing h_SA_SA
[ (J/kg)/(g/kg)^2 ], the second derivative of
enthalpy with respect to Absolute Salinity, h_SA_CT
[ (J/kg)/(K*g/kg) ], the derivative of
enthalpy with respect to Absolute Salinity and Conservative Temperature,
and h_CT_CT
[ (J/kg)/degC^2 ], the second derivative of
enthalpy with respect to Conservative Temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_enthalpy_second_derivatives_CT_exact.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_enthalpy_second_derivatives_CT_exact(SA, CT, p) stopifnot(all.equal(r$h_SA_SA, c(0.000082767011576, 0.000414469343141, 0.001089580017293, 0.002472193425998, 0.006103171596320, 0.010377465312463))) stopifnot(all.equal(r$h_SA_CT, c(0.000130320164426, 0.000655016236924, 0.001879127443985, 0.005468695168037, 0.014315709000526, 0.025192691262061))) stopifnot(all.equal(r$h_CT_CT, c(0.000714365642428, 0.003584965089168, 0.009733337653703, 0.024044402143825, 0.061449390733344, 0.107333638394904)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_enthalpy_second_derivatives_CT_exact(SA, CT, p) stopifnot(all.equal(r$h_SA_SA, c(0.000082767011576, 0.000414469343141, 0.001089580017293, 0.002472193425998, 0.006103171596320, 0.010377465312463))) stopifnot(all.equal(r$h_SA_CT, c(0.000130320164426, 0.000655016236924, 0.001879127443985, 0.005468695168037, 0.014315709000526, 0.025192691262061))) stopifnot(all.equal(r$h_CT_CT, c(0.000714365642428, 0.003584965089168, 0.009733337653703, 0.024044402143825, 0.061449390733344, 0.107333638394904)))
Seawater Specific Enthalpy in terms of in-situ Temperature
gsw_enthalpy_t_exact(SA, t, p)
gsw_enthalpy_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
specific enthalpy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_enthalpy_t_exact.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_enthalpy_t_exact(SA, t, p) stopifnot(all.equal(e/1e5, c(1.151032604783763, 1.140148036012021, 0.921799209310966, 0.432553283808897, 0.330872159700175, 0.269705880448018)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_enthalpy_t_exact(SA, t, p) stopifnot(all.equal(e/1e5, c(1.151032604783763, 1.140148036012021, 0.921799209310966, 0.432553283808897, 0.330872159700175, 0.269705880448018)))
First Derivatives of Entropy
gsw_entropy_first_derivatives(SA, CT)
gsw_entropy_first_derivatives(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
a list containing eta_SA
[ (J/(kg*degC) / (g/kg) ],
the derivative of entropy wrt Absolute Salinity, and eta_CT
[ (J/(kg*degC^2) ],
the derivative of entropy wrt Conservative Temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_entropy_first_derivatives.html
Other things related to entropy:
gsw_CT_from_entropy()
,
gsw_entropy_from_pt()
,
gsw_entropy_from_t()
,
gsw_entropy_ice()
,
gsw_pt_from_entropy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) d <- gsw_entropy_first_derivatives(SA, CT) stopifnot(all.equal(d$eta_SA, c(-0.263286800711655, -0.263977276574528, -0.255367497912925, -0.238066586439561, -0.234438260606436, -0.232820684341694))) stopifnot(all.equal(d$eta_CT, c(13.221031210083824, 13.236911191313675, 13.489004628681361, 14.086599016583795, 14.257729576432077, 14.386429945649411)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) d <- gsw_entropy_first_derivatives(SA, CT) stopifnot(all.equal(d$eta_SA, c(-0.263286800711655, -0.263977276574528, -0.255367497912925, -0.238066586439561, -0.234438260606436, -0.232820684341694))) stopifnot(all.equal(d$eta_CT, c(13.221031210083824, 13.236911191313675, 13.489004628681361, 14.086599016583795, 14.257729576432077, 14.386429945649411)))
Calculates specific entropy in terms of Absolute Salinity and Potential Temperature.
gsw_entropy_from_pt(SA, pt)
gsw_entropy_from_pt(SA, pt)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
pt |
potential temperature (ITS-90) [ degC ] |
specific entropy [ J/(kg*degC) ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_entropy_from_pt.html
Other things related to entropy:
gsw_CT_from_entropy()
,
gsw_entropy_first_derivatives()
,
gsw_entropy_from_t()
,
gsw_entropy_ice()
,
gsw_pt_from_entropy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) pt <- c(28.7832, 28.4210, 22.7850, 10.2305, 6.8292, 4.3245) e <- gsw_entropy_from_pt(SA, pt) stopifnot(all.equal(e/1e2, c(4.003894674443156, 3.954383994925507, 3.198674385897981, 1.467905482842553, 0.986469100565646, 0.627913567234252)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) pt <- c(28.7832, 28.4210, 22.7850, 10.2305, 6.8292, 4.3245) e <- gsw_entropy_from_pt(SA, pt) stopifnot(all.equal(e/1e2, c(4.003894674443156, 3.954383994925507, 3.198674385897981, 1.467905482842553, 0.986469100565646, 0.627913567234252)))
Calculates specific entropy in terms of Absolute Salinity, in-situ temperature and pressure.
gsw_entropy_from_t(SA, t, p)
gsw_entropy_from_t(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
specific entropy [ J/(kg*K) ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_entropy_from_t.html
Other things related to entropy:
gsw_CT_from_entropy()
,
gsw_entropy_first_derivatives()
,
gsw_entropy_from_pt()
,
gsw_entropy_ice()
,
gsw_pt_from_entropy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_entropy_from_t(SA, t, p) stopifnot(all.equal(e/1e2, c(4.003894252787245, 3.954381784340642, 3.198664981986740, 1.467908815899072, 0.986473408657975, 0.627915087346090)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_entropy_from_t(SA, t, p) stopifnot(all.equal(e/1e2, c(4.003894252787245, 3.954381784340642, 3.198664981986740, 1.467908815899072, 0.986473408657975, 0.627915087346090)))
Entropy of ice
gsw_entropy_ice(t, p)
gsw_entropy_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
entropy [ J/(kg*degC) ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_entropy_ice.html
Other things related to entropy:
gsw_CT_from_entropy()
,
gsw_entropy_first_derivatives()
,
gsw_entropy_from_pt()
,
gsw_entropy_from_t()
,
gsw_pt_from_entropy()
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_entropy_ice(t, p) stopifnot(all.equal(e/1e3, c(-1.303663820598987, -1.324090218294577, -1.319426394193644, -1.315402956671801, -1.305426590579231, -1.287021035328113)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_entropy_ice(t, p) stopifnot(all.equal(e/1e3, c(-1.303663820598987, -1.324090218294577, -1.319426394193644, -1.315402956671801, -1.305426590579231, -1.287021035328113)))
Second Derivatives of Entropy
gsw_entropy_second_derivatives(SA, CT)
gsw_entropy_second_derivatives(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
A list containing eta_SA_SA
[ (J/(K*kg))/(g/kg)^2 ], the second derivative of
entropy with respect to Absolute Salinity, eta_SA_CT
[ (J/(K*kg))/(K*g/kg) ], the derivative of
entropy with respect to Absolute Salinity and Conservative Temperature,
and eta_CT_CT
[ (J/(K*kg))/K^2 ], the second derivative of
entropy with respect to Conservative Temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_entropy_second_derivatives.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) r <- gsw_entropy_second_derivatives(SA, CT) stopifnot(all.equal(r$eta_SA_SA, c(-0.007627718929669, -0.007591969960708, -0.007528186784540, -0.007455177590576, -0.007441108287466, -0.007414368396280))) stopifnot(all.equal(r$eta_SA_CT, c(-0.001833104216751, -0.001819473824306, -0.001580843823414, -0.000930111408561, -0.000717011215195, -0.000548410546830))) stopifnot(all.equal(r$eta_CT_CT, c(-0.043665023731109, -0.043781336189326, -0.045506114440888, -0.049708939454018, -0.050938690879443, -0.051875017843472)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) r <- gsw_entropy_second_derivatives(SA, CT) stopifnot(all.equal(r$eta_SA_SA, c(-0.007627718929669, -0.007591969960708, -0.007528186784540, -0.007455177590576, -0.007441108287466, -0.007414368396280))) stopifnot(all.equal(r$eta_SA_CT, c(-0.001833104216751, -0.001819473824306, -0.001580843823414, -0.000930111408561, -0.000717011215195, -0.000548410546830))) stopifnot(all.equal(r$eta_CT_CT, c(-0.043665023731109, -0.043781336189326, -0.045506114440888, -0.049708939454018, -0.050938690879443, -0.051875017843472)))
Ratio of Absolute to Preformed Salinity, minus 1
gsw_Fdelta(p, longitude, latitude)
gsw_Fdelta(p, longitude, latitude)
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
(S/Sstar)-1 [ unitless ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_Fdelta.html
p <- c( 10, 50, 125, 250, 600, 1000) latitude <- c( 4, 4, 4, 4, 4, 4) longitude <- c(188, 188, 188, 188, 188, 188) r <- gsw_Fdelta(p, longitude, latitude) stopifnot(all.equal(r/1e-3, c(0.006472309923452, 0.010352848168433, 0.025541937543450, 0.104348729347986, 0.218678084205081, 0.365415366571266)))
p <- c( 10, 50, 125, 250, 600, 1000) latitude <- c( 4, 4, 4, 4, 4, 4) longitude <- c(188, 188, 188, 188, 188, 188) r <- gsw_Fdelta(p, longitude, latitude) stopifnot(all.equal(r/1e-3, c(0.006472309923452, 0.010352848168433, 0.025541937543450, 0.104348729347986, 0.218678084205081, 0.365415366571266)))
Calculation of Absolute Salinity, Conservative Temperature, and ice mass fraction based on bulk Absolute Salinity, bulk enthalpy, and pressure
gsw_frazil_properties(SA_bulk, h_bulk, p)
gsw_frazil_properties(SA_bulk, h_bulk, p)
SA_bulk |
Absolute Salinity of a combination of seawater and ice [ g/kg ] |
h_bulk |
enthalpy of a mixture of seawater and ice [ J/kg ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
a list containing SA_final
, h_final
and w_Ih_final
.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_frazil_properties.html
SA_bulk <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) h_bulk <- c( -4.5544e4, -4.6033e4, -4.5830e4, -4.5589e4, -4.4948e4, -4.4027e4) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_frazil_properties(SA_bulk, h_bulk, p) stopifnot(all.equal(r$SA_final, c(39.111030663000442, 39.407625769681573, 39.595789974885108, 39.481230045372889, 39.591177095552503, 39.826467709177123))) stopifnot(all.equal(r$CT_final, c(-2.156311126114311, -2.204672298963783, -2.273689262333450, -2.363714136353600, -2.644541000680772, -2.977651291726651))) stopifnot(all.equal(r$w_Ih_final, c(0.112480560814322, 0.114600300867556, 0.115421108602301, 0.117372990660305, 0.122617649983886, 0.127906590822347)))
SA_bulk <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) h_bulk <- c( -4.5544e4, -4.6033e4, -4.5830e4, -4.5589e4, -4.4948e4, -4.4027e4) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_frazil_properties(SA_bulk, h_bulk, p) stopifnot(all.equal(r$SA_final, c(39.111030663000442, 39.407625769681573, 39.595789974885108, 39.481230045372889, 39.591177095552503, 39.826467709177123))) stopifnot(all.equal(r$CT_final, c(-2.156311126114311, -2.204672298963783, -2.273689262333450, -2.363714136353600, -2.644541000680772, -2.977651291726651))) stopifnot(all.equal(r$w_Ih_final, c(0.112480560814322, 0.114600300867556, 0.115421108602301, 0.117372990660305, 0.122617649983886, 0.127906590822347)))
Calculation of Absolute Salinity, Conservative Temperature, and ice mass fraction based on bulk Absolute Salinity, bulk potential enthalpy, and pressure
gsw_frazil_properties_potential(SA_bulk, h_pot_bulk, p)
gsw_frazil_properties_potential(SA_bulk, h_pot_bulk, p)
SA_bulk |
Absolute Salinity of a combination of seawater and ice [ g/kg ] |
h_pot_bulk |
potential enthalpy of a mixture of seawater and ice [ J/kg ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
a list containing SA_final
, h_final
and w_Ih_final
.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_frazil_properties_potential.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA_bulk <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) h_pot_bulk <- c(-4.5544e4, -4.6033e4, -4.5830e4, -4.5589e4, -4.4948e4, -4.4027e4) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_frazil_properties_potential(SA_bulk, h_pot_bulk, p) stopifnot(all.equal(r$SA_final, c(39.098258701462051, 39.343217598625756, 39.434254585716296, 39.159536295126657, 38.820511558004590, 38.542322667924459))) stopifnot(all.equal(r$CT_final, c(-2.155553336670014, -2.200844802695826, -2.264077329325076, -2.344567015865174, -2.598559540430464, -2.900814843304696))) stopifnot(all.equal(r$w_Ih_final, c(0.112190640891586, 0.113150826758543, 0.111797588975174, 0.110122251260246, 0.105199838799201, 0.098850365110330)))
SA_bulk <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) h_pot_bulk <- c(-4.5544e4, -4.6033e4, -4.5830e4, -4.5589e4, -4.4948e4, -4.4027e4) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_frazil_properties_potential(SA_bulk, h_pot_bulk, p) stopifnot(all.equal(r$SA_final, c(39.098258701462051, 39.343217598625756, 39.434254585716296, 39.159536295126657, 38.820511558004590, 38.542322667924459))) stopifnot(all.equal(r$CT_final, c(-2.155553336670014, -2.200844802695826, -2.264077329325076, -2.344567015865174, -2.598559540430464, -2.900814843304696))) stopifnot(all.equal(r$w_Ih_final, c(0.112190640891586, 0.113150826758543, 0.111797588975174, 0.110122251260246, 0.105199838799201, 0.098850365110330)))
Calculation of Absolute Salinity, Conservative Temperature, and ice mass fraction based on bulk Absolute Salinity, bulk potential enthalpy, and pressure
gsw_frazil_properties_potential_poly(SA_bulk, h_pot_bulk, p)
gsw_frazil_properties_potential_poly(SA_bulk, h_pot_bulk, p)
SA_bulk |
Absolute Salinity of a combination of seawater and ice [ g/kg ] |
h_pot_bulk |
potential enthalpy of a mixture of seawater and ice [ J/kg ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
a list containing SA_final
, h_final
and w_Ih_final
.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_frazil_properties_potential_poly.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA_bulk <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) h_pot_bulk <- c(-4.5544e4, -4.6033e4, -4.5830e4, -4.5589e4, -4.4948e4, -4.4027e4) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_frazil_properties_potential_poly(SA_bulk, h_pot_bulk, p) stopifnot(all.equal(r$SA_final, c(39.098264696022831, 39.343217436835218, 39.434244243586633, 39.159511498029801, 38.820458704205542, 38.542256756176229))) stopifnot(all.equal(r$CT_final, c(-2.155537691991377, -2.200841508940901, -2.264094318382661, -2.344613208230164, -2.598663953454472, -2.900948531145453))) stopifnot(all.equal(r$w_Ih_final, c(0.112190777010854, 0.113150823111566, 0.111797356032850, 0.110121687760246, 0.105198620534670, 0.098848824039493)))
SA_bulk <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) h_pot_bulk <- c(-4.5544e4, -4.6033e4, -4.5830e4, -4.5589e4, -4.4948e4, -4.4027e4) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_frazil_properties_potential_poly(SA_bulk, h_pot_bulk, p) stopifnot(all.equal(r$SA_final, c(39.098264696022831, 39.343217436835218, 39.434244243586633, 39.159511498029801, 38.820458704205542, 38.542256756176229))) stopifnot(all.equal(r$CT_final, c(-2.155537691991377, -2.200841508940901, -2.264094318382661, -2.344613208230164, -2.598663953454472, -2.900948531145453))) stopifnot(all.equal(r$w_Ih_final, c(0.112190777010854, 0.113150823111566, 0.111797356032850, 0.110121687760246, 0.105198620534670, 0.098848824039493)))
Ratios of changes in SA
, CT
and p
that occur
when frazil ice forms due to changes in pressure upon
the mixture of seawater and ice.
gsw_frazil_ratios_adiabatic(SA, p, w_Ih)
gsw_frazil_ratios_adiabatic(SA, p, w_Ih)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
w_Ih |
initial mass fraction (ice) / (water + ice) |
a list containing dSA_dCT_frazil
, dSA_dP_frazil
and dCT_dP_frazil
.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_frazil_ratios_adiabatic.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) w_Ih <- c( 0.9, 0.84, 0.4, 0.25, 0.05, 0.01) r <- gsw_frazil_ratios_adiabatic(SA, p, w_Ih) stopifnot(all.equal(r$dSA_dCT_frazil, c(3.035152370800401, 1.932548405396193, 0.613212115809003, 0.516103092738565, 0.436656742034200, 0.425827266533876))) stopifnot(all.equal(r$dSA_dP_frazil/1e-6, c(-0.197406834470366, -0.133213926580032, -0.045580136143659, -0.038806356507548, -0.033541272953744, -0.033350141194082))) stopifnot(all.equal(r$dCT_dP_frazil/1e-7, c(-0.650401727338347, -0.689317412221414, -0.743301297684333, -0.751910946738026, -0.768138213038669, -0.783184728059898)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) w_Ih <- c( 0.9, 0.84, 0.4, 0.25, 0.05, 0.01) r <- gsw_frazil_ratios_adiabatic(SA, p, w_Ih) stopifnot(all.equal(r$dSA_dCT_frazil, c(3.035152370800401, 1.932548405396193, 0.613212115809003, 0.516103092738565, 0.436656742034200, 0.425827266533876))) stopifnot(all.equal(r$dSA_dP_frazil/1e-6, c(-0.197406834470366, -0.133213926580032, -0.045580136143659, -0.038806356507548, -0.033541272953744, -0.033350141194082))) stopifnot(all.equal(r$dCT_dP_frazil/1e-7, c(-0.650401727338347, -0.689317412221414, -0.743301297684333, -0.751910946738026, -0.768138213038669, -0.783184728059898)))
Ratios of changes in SA
, CT
and p
that occur
when frazil ice forms due to changes in pressure upon
the mixture of seawater and ice.
gsw_frazil_ratios_adiabatic_poly(SA, p, w_Ih)
gsw_frazil_ratios_adiabatic_poly(SA, p, w_Ih)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
w_Ih |
initial mass fraction (ice) / (water + ice) |
a list containing dSA_dCT_frazil
, dSA_dP_frazil
and dCT_dP_frazil
.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_frazil_ratios_adiabatic_poly.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) w_Ih <- c( 0.9, 0.84, 0.4, 0.25, 0.05, 0.01) r <- gsw_frazil_ratios_adiabatic_poly(SA, p, w_Ih) stopifnot(all.equal(r$dSA_dCT_frazil, c(3.035308957896530, 1.932631198810934, 0.613220785586734, 0.516106221687200, 0.436657158542033, 0.425827675768018))) stopifnot(all.equal(r$dSA_dP_frazil/1e-6, c(-0.197512213108610, -0.133280971893621, -0.045599951957139, -0.038820466574251, -0.033548047632788, -0.033352365425407))) stopifnot(all.equal(r$dCT_dP_frazil/1e-7, c(-0.650715350062703, -0.689634794137768, -0.743613932027895, -0.752179782823459, -0.768292629045686, -0.783236208526200)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) w_Ih <- c( 0.9, 0.84, 0.4, 0.25, 0.05, 0.01) r <- gsw_frazil_ratios_adiabatic_poly(SA, p, w_Ih) stopifnot(all.equal(r$dSA_dCT_frazil, c(3.035308957896530, 1.932631198810934, 0.613220785586734, 0.516106221687200, 0.436657158542033, 0.425827675768018))) stopifnot(all.equal(r$dSA_dP_frazil/1e-6, c(-0.197512213108610, -0.133280971893621, -0.045599951957139, -0.038820466574251, -0.033548047632788, -0.033352365425407))) stopifnot(all.equal(r$dCT_dP_frazil/1e-7, c(-0.650715350062703, -0.689634794137768, -0.743613932027895, -0.752179782823459, -0.768292629045686, -0.783236208526200)))
This calculates a geopotential anomaly, called either the dynamic height anomaly or the geostrophic streamfunction in the TEOS-10 document listed as [1] below; users should read that and the references therein for more details on the definition and its calculation here.
To get the column-integrated value in meters, take the first
value of the returned vector and divide by
9.7963. Note that this yields an integral
with the top measured pressure (not zero) as an upper limit.
gsw_geo_strf_dyn_height(SA, CT, p, p_ref = 0)
gsw_geo_strf_dyn_height(SA, CT, p, p_ref = 0)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
p_ref |
reference pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Because of the scheme used in the underlying C code, the pressures must be in order, and must not have any repeats. Also, there must be at least 4 pressure values. Violating any of these three restrictions yields an error.
If p_ref
exceeds the largest p
value, a vector
of zeros is returned, in accordance with the underlying C code.
Note the alteration of the test-value tolerance from a much smaller default. This is required because the test values derive from the GSW-Matlab code, which uses a different interpolation scheme than the GSW-C code, upon which GSW-R relies. See References 2 and 3 for more on this topic.
A vector containing geopotential anomaly in
for each level. For more on the units, see [2].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
1. http://www.teos-10.org/pubs/gsw/html/gsw_geo_strf_dyn_height.html 2. https://github.com/TEOS-10/GSW-R/issues/47 3. Barker, Paul M., and Trevor J. McDougall. "Two Interpolation Methods Using Multiply-Rotated Piecewise Cubic Hermite Interpolating Polynomials." Journal of Atmospheric and Oceanic Technology 37, no. 4 (April 2020): 605–19.
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 500 dh <- gsw_geo_strf_dyn_height(SA, CT, p, p_ref) # NOTE: see Details for the reason for the coarse tolerance. stopifnot(all.equal(dh, c(12.172172845782585, 9.797739925848624, 6.070940749148281, 3.042891445395256, -1.078872239804912, -4.656953829254061), tolerance=0.02))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 500 dh <- gsw_geo_strf_dyn_height(SA, CT, p, p_ref) # NOTE: see Details for the reason for the coarse tolerance. stopifnot(all.equal(dh, c(12.172172845782585, 9.797739925848624, 6.070940749148281, 3.042891445395256, -1.078872239804912, -4.656953829254061), tolerance=0.02))
This calculates a geopotential anomaly, called either the dynamic height anomaly or the geostrophic streamfunction in the TEOS-10 document listed as [1] below.
To get the column-integrated value in meters, take the first
value of the returned vector and divide by
9.7963. Note that this yields an integral
with the top measured pressure (not zero) as an upper limit.
gsw_geo_strf_dyn_height_1(SA, CT, p, p_ref = 0, max_dp = 1, interp_method = 2)
gsw_geo_strf_dyn_height_1(SA, CT, p, p_ref = 0, max_dp = 1, interp_method = 2)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
p_ref |
reference pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
max_dp |
numeric value indicating the maximum tolerated pressure
separation between levels. If any pressure step exceeds |
interp_method |
integer specifying interpolation scheme (1 for linear, 2 for pchip) |
Because of the scheme used in the underlying C code, the pressures must be in order, and must not have any repeats. Also, there must be at least 4 pressure values. Violating any of these restrictions yields an error.
If p_ref
exceeds the largest p
value, a vector
of zeros is returned, in accordance with the underlying C code.
A vector containing geopotential anomaly in
for each level. For more on the units, see [2].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
1. http://www.teos-10.org/pubs/gsw/html/gsw_geo_strf_dyn_height.html
2. Talley et al., 2011. Descriptive Physical Oceanography, Edition 6, Elsevier.
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 1000 dh <- gsw_geo_strf_dyn_height_1(SA, CT, p, p_ref, 1, 2) ## FIXME: The following test values fail. ## all.equal(dh, c(17.039204557769487, 14.665853784722286, 10.912861136923812, ## 7.567928838774945, 3.393524055565328, 0))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 1000 dh <- gsw_geo_strf_dyn_height_1(SA, CT, p, p_ref, 1, 2) ## FIXME: The following test values fail. ## all.equal(dh, c(17.039204557769487, 14.665853784722286, 10.912861136923812, ## 7.567928838774945, 3.393524055565328, 0))
Geostrophic Dynamic Height Anomaly (Piecewise-Constant Profile)
gsw_geo_strf_dyn_height_pc(SA, CT, delta_p)
gsw_geo_strf_dyn_height_pc(SA, CT, delta_p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
delta_p |
difference in sea pressure between the deep and
shallow limits of layers within which |
A list containing dyn_height
, the dynamic height anomaly [ m^2/s^2 ], and
p_mid
[ dbar ], the pressures at the layer centres. Note that the dynamic height
anomaly unit, also known as a "dynamic meter", corresponds to approximately 1.02 metres of sealevel height
(see e.g. Talley et al., 2011. Descriptive Physical Oceanography, Edition 6.
Elsevier).
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_geo_strf_dyn_height.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) delta_p <- c(10, 40, 75, 125, 350, 400) r <- gsw_geo_strf_dyn_height_pc(SA, CT, delta_p) stopifnot(all.equal(r$dyn_height, c(-0.300346215853487, -1.755165998114308, -4.423531083131365, -6.816659136254657, -9.453175257818430, -12.721009624991439))) stopifnot(all.equal(r$p_mid/1e2, c(0.050000000000000, 0.300000000000000, 0.875000000000000, 1.875000000000000, 4.250000000000000, 8.000000000000000)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) delta_p <- c(10, 40, 75, 125, 350, 400) r <- gsw_geo_strf_dyn_height_pc(SA, CT, delta_p) stopifnot(all.equal(r$dyn_height, c(-0.300346215853487, -1.755165998114308, -4.423531083131365, -6.816659136254657, -9.453175257818430, -12.721009624991439))) stopifnot(all.equal(r$p_mid/1e2, c(0.050000000000000, 0.300000000000000, 0.875000000000000, 1.875000000000000, 4.250000000000000, 8.000000000000000)))
Gibbs Energy of Seawater, and its Derivatives
gsw_gibbs(ns, nt, np, SA, t, p = 0)
gsw_gibbs(ns, nt, np, SA, t, p = 0)
ns |
An integer, the order of the |
nt |
An integer, the order of the |
np |
An integer, the order of the |
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Gibbs energy [ J/kg ] if ns
=nt
=np
=0. Derivative of energy
with respect to SA
[ J/kg/(g/kg)^ns ] if ns
is nonzero and nt
=np
=0,
etc. Note that derivatives with respect to pressure are in units with Pa, not dbar.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
The TEOS-10 webpage for gsw_gibbs
does not provide test values, so
the present R version should be considered untested.
http://www.teos-10.org/pubs/gsw/html/gsw_gibbs.html
library(gsw) p <- seq(0, 100, 1) SA <- rep(35, length(p)) t <- rep(-5, length(p)) ## Check the derivative wrt pressure. Note the unit change E <- gsw_gibbs(0, 0, 0, SA, t, p) # Estimate derivative from linear fit (try plotting: it is very linear) m <- lm(E ~ p) print(summary(m)) plot(p, E) abline(m) dEdp1 <- coef(m)[2] # Calculate derivative ... note we multiply by 1e4 to get from 1/Pa to 1/dbar dEdp2 <- 1e4 * gsw_gibbs(0, 0, 1, SA[1], t[1], p[1]) ## Ratio dEdp1 / dEdp2
library(gsw) p <- seq(0, 100, 1) SA <- rep(35, length(p)) t <- rep(-5, length(p)) ## Check the derivative wrt pressure. Note the unit change E <- gsw_gibbs(0, 0, 0, SA, t, p) # Estimate derivative from linear fit (try plotting: it is very linear) m <- lm(E ~ p) print(summary(m)) plot(p, E) abline(m) dEdp1 <- coef(m)[2] # Calculate derivative ... note we multiply by 1e4 to get from 1/Pa to 1/dbar dEdp2 <- 1e4 * gsw_gibbs(0, 0, 1, SA[1], t[1], p[1]) ## Ratio dEdp1 / dEdp2
Gibbs Energy of Ice, and its Derivatives
gsw_gibbs_ice(nt, np, t, p = 0)
gsw_gibbs_ice(nt, np, t, p = 0)
nt |
An integer, the order of the |
np |
An integer, the order of the |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Gibbs energy [ J/kg ] if ns
=nt
=np
=0. Derivative of energy
with respect to t
[ J/kg/(degC)^nt ] if nt
is nonzero,
etc. Note that derivatives with respect to pressure are in units with Pa, not dbar.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
The TEOS-10 webpage for gsw_gibbs_ice
does not provide test values, so
the present R version should be considered untested.
http://www.teos-10.org/pubs/gsw/html/gsw_gibbs_ice.html
library(gsw) p <- seq(0, 100, 1) t <- rep(-5, length(p)) ## Check the derivative wrt pressure. Note the unit change E <- gsw_gibbs_ice(0, 0, t, p) # Estimate derivative from linear fit (try plotting: it is very linear) m <- lm(E ~ p) print(summary(m)) plot(p, E) abline(m) dEdp1 <- coef(m)[2] # Calculate derivative ... note we multiply by 1e4 to get from 1/Pa to 1/dbar dEdp2 <- 1e4 * gsw_gibbs_ice(0, 1, t[1], p[1]) ## Ratio dEdp1 / dEdp2
library(gsw) p <- seq(0, 100, 1) t <- rep(-5, length(p)) ## Check the derivative wrt pressure. Note the unit change E <- gsw_gibbs_ice(0, 0, t, p) # Estimate derivative from linear fit (try plotting: it is very linear) m <- lm(E ~ p) print(summary(m)) plot(p, E) abline(m) dEdp1 <- coef(m)[2] # Calculate derivative ... note we multiply by 1e4 to get from 1/Pa to 1/dbar dEdp2 <- 1e4 * gsw_gibbs_ice(0, 1, t[1], p[1]) ## Ratio dEdp1 / dEdp2
Gravitational Acceleration
gsw_grav(latitude, p = 0)
gsw_grav(latitude, p = 0)
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
gravitational acceleration [ m/s^2 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_grav.html
lat <- c(-90, -60, -30, 0) grav <- gsw_grav(lat) stopifnot(all.equal(grav, c(9.832186205884799, 9.819178859991149, 9.793249257048750, 9.780327000000000)))
lat <- c(-90, -60, -30, 0) grav <- gsw_grav(lat) stopifnot(all.equal(grav, c(9.832186205884799, 9.819178859991149, 9.793249257048750, 9.780327000000000)))
Helmholtz Energy of Ice
gsw_Helmholtz_energy_ice(t, p)
gsw_Helmholtz_energy_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Helmholtz energy if ice [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_Helmholtz_energy_ice.html
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_Helmholtz_energy_ice(t, p) stopifnot(all.equal(e/1e4, c(-1.362572315008330, -1.710375005915343, -1.628083272702224, -1.555573047498573, -1.375469831393882, -1.053585607014677)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_Helmholtz_energy_ice(t, p) stopifnot(all.equal(e/1e4, c(-1.362572315008330, -1.710375005915343, -1.628083272702224, -1.555573047498573, -1.375469831393882, -1.053585607014677)))
Ice Fraction to Cool Seawater to Freezing
gsw_ice_fraction_to_freeze_seawater(SA, CT, p, t_Ih)
gsw_ice_fraction_to_freeze_seawater(SA, CT, p, t_Ih)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
t_Ih |
initial temperature of ice [ degC ] |
a list containing SA_freeze
, CT_freeze
and w_Ih
.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_ice_fraction_to_freeze_seawater.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) t_Ih <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) r <- gsw_ice_fraction_to_freeze_seawater(SA, CT, p, t_Ih) stopifnot(all.equal(r$SA_freeze, c(25.823952352620722, 26.120495895535438, 27.460572941868072, 30.629978769577168, 31.458222332943784, 32.121170316796444))) stopifnot(all.equal(r$CT_freeze, c(-1.389936216242376, -1.437013334134283, -1.569815847128818, -1.846419165657020, -2.166786673735941, -2.522730879078756))) stopifnot(all.equal(r$w_Ih, c(0.256046867272203, 0.251379393389925, 0.215985652155336, 0.121020375537284, 0.094378196687535, 0.075181377710828)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) t_Ih <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) r <- gsw_ice_fraction_to_freeze_seawater(SA, CT, p, t_Ih) stopifnot(all.equal(r$SA_freeze, c(25.823952352620722, 26.120495895535438, 27.460572941868072, 30.629978769577168, 31.458222332943784, 32.121170316796444))) stopifnot(all.equal(r$CT_freeze, c(-1.389936216242376, -1.437013334134283, -1.569815847128818, -1.846419165657020, -2.166786673735941, -2.522730879078756))) stopifnot(all.equal(r$w_Ih, c(0.256046867272203, 0.251379393389925, 0.215985652155336, 0.121020375537284, 0.094378196687535, 0.075181377710828)))
This function determines whether a given hydrographic value lies what the TEOS-10 literature calls a "funnel" of values that lead to acceptably accurate computation of specific volume. For more details, consult the TEOS-10 literature, perhaps starting with the materials referred to in the webpage cited in the ‘References’ section.
gsw_infunnel(SA, CT, p)
gsw_infunnel(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
a logical value indicating whether the given point is inside the funnel of acceptable values.
https://www.teos-10.org/pubs/gsw/html/gsw_infunnel.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
library(gsw) gsw_infunnel(35, 10, 100) # TRUE gsw_infunnel(45, 10, 100) # FALSE: too salty gsw_infunnel(35, -4, 100) # FALSE: below freezing
library(gsw) gsw_infunnel(35, 10, 100) # TRUE gsw_infunnel(45, 10, 100) # FALSE: too salty gsw_infunnel(35, -4, 100) # FALSE: below freezing
Specific Internal Energy of Seawater (75-term equation)
gsw_internal_energy(SA, CT, p)
gsw_internal_energy(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
specific internal energy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_internal_energy.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_internal_energy(SA, CT, p) stopifnot(all.equal(e/1e5, c(1.148091576956162, 1.134013145527675, 0.909571141498779, 0.408593072177020, 0.273985276460357, 0.175019409258405)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_internal_energy(SA, CT, p) stopifnot(all.equal(e/1e5, c(1.148091576956162, 1.134013145527675, 0.909571141498779, 0.408593072177020, 0.273985276460357, 0.175019409258405)))
Specific Internal Energy of Ice (75-term equation)
gsw_internal_energy_ice(t, p)
gsw_internal_energy_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
specific internal energy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_internal_energy_ice.html
t_Ih <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_internal_energy_ice(t_Ih, p) stopifnot(all.equal(e/1e5, c(-3.556606992432442, -3.609926216929878, -3.597799043634774, -3.587312078410920, -3.561207060376329, -3.512700418975375)))
t_Ih <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) e <- gsw_internal_energy_ice(t_Ih, p) stopifnot(all.equal(e/1e5, c(-3.556606992432442, -3.609926216929878, -3.597799043634774, -3.587312078410920, -3.561207060376329, -3.512700418975375)))
Note that the C library had to be patched to get this working; a new version of the library will address the bug directly.
gsw_IPV_vs_fNsquared_ratio(SA, CT, p, p_ref = 0)
gsw_IPV_vs_fNsquared_ratio(SA, CT, p, p_ref = 0)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
p_ref |
reference pressure [ dbar ] |
list containing IPV_vs_fNsquared_ratio [ unitless ] and mid-point pressure p_mid [ dbar ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_IPV_vs_fNsquared_ratio.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 0 r <- gsw_IPV_vs_fNsquared_ratio(SA, CT, p, p_ref) stopifnot(all.equal(r$IPV_vs_fNsquared_ratio, c(0.999742244888022, 0.996939883468178, 0.986141997098021, 0.931595598713477, 0.861224354872028))) stopifnot(all.equal(r$p_mid, c(30, 87.5, 187.5, 425, 800)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 0 r <- gsw_IPV_vs_fNsquared_ratio(SA, CT, p, p_ref) stopifnot(all.equal(r$IPV_vs_fNsquared_ratio, c(0.999742244888022, 0.996939883468178, 0.986141997098021, 0.931595598713477, 0.861224354872028))) stopifnot(all.equal(r$p_mid, c(30, 87.5, 187.5, 425, 800)))
Isentropic Compressibility of Seawater (75-term equation)
gsw_kappa(SA, CT, p)
gsw_kappa(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
isentropic compressibility [ 1/Pa ] (not 1/dbar)
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_kappa.html
Other things related to compressibility:
gsw_kappa_const_t_ice()
,
gsw_kappa_ice()
,
gsw_kappa_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <-c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) kappa <- gsw_kappa(SA, CT, p) stopifnot(all.equal(kappa*1e9, c(0.411343648791300, 0.411105416128094, 0.416566236026610, 0.435588650838751, 0.438782500588955, 0.439842289994702)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <-c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) kappa <- gsw_kappa(SA, CT, p) stopifnot(all.equal(kappa*1e9, c(0.411343648791300, 0.411105416128094, 0.416566236026610, 0.435588650838751, 0.438782500588955, 0.439842289994702)))
Calculate isothermal compressibility of ice, in 1/Pa.
gsw_kappa_const_t_ice(t, p)
gsw_kappa_const_t_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
isothermal compressibility of ice [ 1/Pa ] (not 1/dbar)
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_kappa_const_t_ice.html
Other things related to compressibility:
gsw_kappa()
,
gsw_kappa_ice()
,
gsw_kappa_t_exact()
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) kappa <- gsw_kappa_const_t_ice(t, p) stopifnot(all.equal(kappa*1e9, c(0.115874753261484, 0.115384948953145, 0.115442212717850, 0.115452884634531, 0.115454824232421, 0.115619994536961)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) kappa <- gsw_kappa_const_t_ice(t, p) stopifnot(all.equal(kappa*1e9, c(0.115874753261484, 0.115384948953145, 0.115442212717850, 0.115452884634531, 0.115454824232421, 0.115619994536961)))
Calculate isentropic compressibility of ice, in 1/Pa.
gsw_kappa_ice(t, p)
gsw_kappa_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
isentropic compressibility of ice [ 1/Pa ] (not 1/dbar)
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_kappa_ice.html
Other things related to compressibility:
gsw_kappa()
,
gsw_kappa_const_t_ice()
,
gsw_kappa_t_exact()
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) kappa <- gsw_kappa_ice(t, p) stopifnot(all.equal(kappa*1e9, c(0.112495239053936, 0.112070687842183, 0.112119091047584, 0.112126504739297, 0.112123513812840, 0.112262589530974)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) kappa <- gsw_kappa_ice(t, p) stopifnot(all.equal(kappa*1e9, c(0.112495239053936, 0.112070687842183, 0.112119091047584, 0.112126504739297, 0.112123513812840, 0.112262589530974)))
Isentropic compressibility of seawater (exact)
gsw_kappa_t_exact(SA, t, p)
gsw_kappa_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
isentropic compressibility [ 1/Pa ] (not 1/dbar)
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_kappa_t_exact.html
Other things related to compressibility:
gsw_kappa()
,
gsw_kappa_const_t_ice()
,
gsw_kappa_ice()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <-c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) kappa <- gsw_kappa(SA, CT, p) stopifnot(all.equal(kappa*1e9, c(0.411343648791300, 0.411105416128094, 0.416566236026610, 0.435588650838751, 0.438782500588955, 0.439842289994702)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <-c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) kappa <- gsw_kappa(SA, CT, p) stopifnot(all.equal(kappa*1e9, c(0.411343648791300, 0.411105416128094, 0.416566236026610, 0.435588650838751, 0.438782500588955, 0.439842289994702)))
Latent heat of evaporation
gsw_latentheat_evap_CT(SA, CT)
gsw_latentheat_evap_CT(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
latent heat of evaporation [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_latentheat_evap_CT.html
Other things related to latent heat:
gsw_latentheat_evap_t()
,
gsw_latentheat_melting()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) lh <- gsw_latentheat_evap_CT(SA, CT) stopifnot(all.equal(lh/1e6, c(2.429947107462561, 2.430774073049213, 2.444220372158452, 2.474127109232524, 2.482151446148560, 2.488052297193594)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) lh <- gsw_latentheat_evap_CT(SA, CT) stopifnot(all.equal(lh/1e6, c(2.429947107462561, 2.430774073049213, 2.444220372158452, 2.474127109232524, 2.482151446148560, 2.488052297193594)))
Latent heat of evaporation
gsw_latentheat_evap_t(SA, t)
gsw_latentheat_evap_t(SA, t)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
latent heat of evaporation [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_latentheat_evap_t.html
Other things related to latent heat:
gsw_latentheat_evap_CT()
,
gsw_latentheat_melting()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) lh = gsw_latentheat_evap_t(SA, t) stopifnot(all.equal(lh/1e6, c(2.429882982734836, 2.430730236218543, 2.444217294049004, 2.474137411322517, 2.482156276375029, 2.488054617630297)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) lh = gsw_latentheat_evap_t(SA, t) stopifnot(all.equal(lh/1e6, c(2.429882982734836, 2.430730236218543, 2.444217294049004, 2.474137411322517, 2.482156276375029, 2.488054617630297)))
Latent Heat of Melting
gsw_latentheat_melting(SA, p)
gsw_latentheat_melting(SA, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
latent heat of freezing [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_latentheat_melting.html
Other things related to latent heat:
gsw_latentheat_evap_CT()
,
gsw_latentheat_evap_t()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) lh <- gsw_latentheat_melting(SA, p) stopifnot(all.equal(lh/1e5, c(3.299496680271213, 3.298613352397986, 3.297125622834541, 3.294973895330757, 3.288480445559747, 3.280715862416388)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) lh <- gsw_latentheat_melting(SA, p) stopifnot(all.equal(lh/1e5, c(3.299496680271213, 3.298613352397986, 3.297125622834541, 3.294973895330757, 3.288480445559747, 3.280715862416388)))
Calculate d(SA)/d(CT) for Ice Melting in near-freezing Seawater
gsw_melting_ice_equilibrium_SA_CT_ratio(SA, p)
gsw_melting_ice_equilibrium_SA_CT_ratio(SA, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
ratio of change in SA
to change in CT
[ g/kg/degC ].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_melting_ice_equilibrium_SA_CT_ratio.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_melting_ice_equilibrium_SA_CT_ratio(SA, p) stopifnot(all.equal(r, c(0.420209509196985, 0.422511693121631, 0.424345503216433, 0.422475836091426, 0.422023427778221, 0.423037622331042)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_melting_ice_equilibrium_SA_CT_ratio(SA, p) stopifnot(all.equal(r, c(0.420209509196985, 0.422511693121631, 0.424345503216433, 0.422475836091426, 0.422023427778221, 0.423037622331042)))
Calculate d(SA)/d(CT) for Ice Melting in near-freezing Seawater (Polynomial version)
gsw_melting_ice_equilibrium_SA_CT_ratio_poly(SA, p)
gsw_melting_ice_equilibrium_SA_CT_ratio_poly(SA, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
ratio of change in SA
to change in CT
[ g/kg/degC ].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_melting_ice_equilibrium_SA_CT_ratio_poly.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_melting_ice_equilibrium_SA_CT_ratio_poly(SA, p) stopifnot(all.equal(r, c(0.420209444587263, 0.422511664682796, 0.424345538275708, 0.422475965003649, 0.422023755182266, 0.423038080717229)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_melting_ice_equilibrium_SA_CT_ratio_poly(SA, p) stopifnot(all.equal(r, c(0.420209444587263, 0.422511664682796, 0.424345538275708, 0.422475965003649, 0.422023755182266, 0.423038080717229)))
Calculate properties related to ice melting in seawater
gsw_melting_ice_into_seawater(SA, CT, p, w_Ih, t_Ih)
gsw_melting_ice_into_seawater(SA, CT, p, w_Ih, t_Ih)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
w_Ih |
initial mass fraction (ice) / (water + ice) |
t_Ih |
initial temperature of ice [ degC ] |
a list containing SA_final
, CT_final
and w_Ih_final
.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_melting_ice_into_seawater.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 4.7856, 2.4329, 1.8103, 1.2600, 0.6886, 0.4403) p <- c( 10, 50, 125, 250, 600, 1000) w_Ih <- c( 0.0560, 0.02513, 0.02159, 0.01210, 0.00943, 0.00751) t_Ih <- c(-4.7856, -4.4329, -3.8103, -4.2600, -3.8863, -3.4036) r <- gsw_melting_ice_into_seawater(SA, CT, p, w_Ih, t_Ih) stopifnot(all.equal(r$SA_final, c(32.767939199999994, 34.014676604999998, 34.269397295999994, 34.425548880000001, 34.409033862000001, 34.471559675999998))) stopifnot(all.equal(r$CT_final, c(-0.298448911022612, 0.215263001418312, -0.074341719211557, 0.207796293045473, -0.123785388299875, -0.202531182809225))) stopifnot(all.equal(r$w_Ih_final, rep(0, 6)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 4.7856, 2.4329, 1.8103, 1.2600, 0.6886, 0.4403) p <- c( 10, 50, 125, 250, 600, 1000) w_Ih <- c( 0.0560, 0.02513, 0.02159, 0.01210, 0.00943, 0.00751) t_Ih <- c(-4.7856, -4.4329, -3.8103, -4.2600, -3.8863, -3.4036) r <- gsw_melting_ice_into_seawater(SA, CT, p, w_Ih, t_Ih) stopifnot(all.equal(r$SA_final, c(32.767939199999994, 34.014676604999998, 34.269397295999994, 34.425548880000001, 34.409033862000001, 34.471559675999998))) stopifnot(all.equal(r$CT_final, c(-0.298448911022612, 0.215263001418312, -0.074341719211557, 0.207796293045473, -0.123785388299875, -0.202531182809225))) stopifnot(all.equal(r$w_Ih_final, rep(0, 6)))
Calculate d(SA)/d(CT) for Ice Melting in Seawater
gsw_melting_ice_SA_CT_ratio(SA, CT, p, t_Ih)
gsw_melting_ice_SA_CT_ratio(SA, CT, p, t_Ih)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
t_Ih |
initial temperature of ice [ degC ] |
ratio of change in SA
to change in CT
[ g/kg/degC ].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_melting_ice_SA_CT_ratio.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 3.7856, 3.4329, 2.8103, 1.2600, 0.6886, 0.4403) p <- c( 10, 50, 125, 250, 600, 1000) t_Ih <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) r <- gsw_melting_ice_SA_CT_ratio(SA, CT, p, t_Ih) stopifnot(all.equal(r, c(0.373840909022490, 0.371878514972099, 0.377104664622191, 0.382777696796156, 0.387133845152000, 0.393947316026914)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 3.7856, 3.4329, 2.8103, 1.2600, 0.6886, 0.4403) p <- c( 10, 50, 125, 250, 600, 1000) t_Ih <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) r <- gsw_melting_ice_SA_CT_ratio(SA, CT, p, t_Ih) stopifnot(all.equal(r, c(0.373840909022490, 0.371878514972099, 0.377104664622191, 0.382777696796156, 0.387133845152000, 0.393947316026914)))
Calculate d(SA)/d(CT) for Ice Melting in Seawater (Polynomial version)
gsw_melting_ice_SA_CT_ratio_poly(SA, CT, p, t_Ih)
gsw_melting_ice_SA_CT_ratio_poly(SA, CT, p, t_Ih)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
t_Ih |
initial temperature of ice [ degC ] |
ratio of change in SA
to change in CT
[ g/kg/degC ].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_melting_ice_SA_CT_ratio_poly.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 3.7856, 3.4329, 2.8103, 1.2600, 0.6886, 0.4403) p <- c( 10, 50, 125, 250, 600, 1000) t_Ih <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) r <- gsw_melting_ice_SA_CT_ratio_poly(SA, CT, p, t_Ih) stopifnot(all.equal(r, c(0.373840908629278, 0.371878512745054, 0.377104658031030, 0.382777681212224, 0.387133812279563, 0.393947267481204)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 3.7856, 3.4329, 2.8103, 1.2600, 0.6886, 0.4403) p <- c( 10, 50, 125, 250, 600, 1000) t_Ih <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) r <- gsw_melting_ice_SA_CT_ratio_poly(SA, CT, p, t_Ih) stopifnot(all.equal(r, c(0.373840908629278, 0.371878512745054, 0.377104658031030, 0.382777681212224, 0.387133812279563, 0.393947267481204)))
Calculate properties related to seaice melting in seawater
gsw_melting_seaice_into_seawater(SA, CT, p, w_seaice, SA_seaice, t_seaice)
gsw_melting_seaice_into_seawater(SA, CT, p, w_seaice, SA_seaice, t_seaice)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
w_seaice |
mass fraction (seaice) / (water + seaice) |
SA_seaice |
Absolute Salinity of seaice |
t_seaice |
temperature of seaice |
a list containing SA_final
and CT_final
.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_melting_seaice_into_seawater.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 4.7856, 2.4329, 1.8103, 1.2600, 0.6886, 0.4403) p <- c( 10, 50, 125, 250, 600, 1000) w_seaice <- c( 0.0560, 0.02513, 0.02159, 0.01210, 0.00943, 0.00751) SA_seaice <- c( 5, 4.8, 3.5, 2.5, 1, 0.4) t_seaice <- c(-4.7856, -4.4329, -3.8103, -4.2600, -3.8863, -3.4036) r <- gsw_melting_seaice_into_seawater(SA, CT, p, w_seaice, SA_seaice, t_seaice) stopifnot(all.equal(r$SA_final, c(33.047939199999995, 34.135300604999998, 34.344962295999999, 34.455798880000003, 34.418463862000003, 34.474563675999995))) stopifnot(all.equal(r$CT_final, c(-0.018822367305381, 0.345095540241769, 0.020418581143151, 0.242672380976922, -0.111078380121959, -0.197363471215418)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( 4.7856, 2.4329, 1.8103, 1.2600, 0.6886, 0.4403) p <- c( 10, 50, 125, 250, 600, 1000) w_seaice <- c( 0.0560, 0.02513, 0.02159, 0.01210, 0.00943, 0.00751) SA_seaice <- c( 5, 4.8, 3.5, 2.5, 1, 0.4) t_seaice <- c(-4.7856, -4.4329, -3.8103, -4.2600, -3.8863, -3.4036) r <- gsw_melting_seaice_into_seawater(SA, CT, p, w_seaice, SA_seaice, t_seaice) stopifnot(all.equal(r$SA_final, c(33.047939199999995, 34.135300604999998, 34.344962295999999, 34.455798880000003, 34.418463862000003, 34.474563675999995))) stopifnot(all.equal(r$CT_final, c(-0.018822367305381, 0.345095540241769, 0.020418581143151, 0.242672380976922, -0.111078380121959, -0.197363471215418)))
The result is computed based on first-differencing a computed density with
respect pressure, and this can yield noisy results with CTD data that
have not been smoothed and decimated. It also yields infinite values,
for repeated adjacent pressure (e.g. this occurs twice with the ctd
dataset provided in the oce package).
gsw_Nsquared(SA, CT, p, latitude = 0)
gsw_Nsquared(SA, CT, p, latitude = 0)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
list containing N2 [ 1/s^2 ] and mid-point pressure p_mid [ dbar ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_Nsquared.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) latitude <- 4 r <- gsw_Nsquared(SA, CT, p, latitude=4) stopifnot(all.equal(r$N2*1e3, c(0.060843209693499, 0.235723066151305, 0.216599928330380, 0.012941204313372, 0.008434782795209))) stopifnot(all.equal(r$p_mid, c(30, 87.5, 187.5, 425, 800)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) latitude <- 4 r <- gsw_Nsquared(SA, CT, p, latitude=4) stopifnot(all.equal(r$N2*1e3, c(0.060843209693499, 0.235723066151305, 0.216599928330380, 0.012941204313372, 0.008434782795209))) stopifnot(all.equal(r$p_mid, c(30, 87.5, 187.5, 425, 800)))
Computes oxygen concentration for seawater that is equilibrium with
vapour-saturated air at standard atmospheric pressure (101.325 kPa,
i.e. for sea pressure of 0dbar). The formula, not created by the SCOR/IAPSO
Working Group 127 nor approved by the IOC, is stated in the TEOS-10
documentation to be from Benson and Krause (1984), as fitted by
Garcia and Gordon (1992, 1993). That formulation is framed in UNESCO-era
water properties, so longitude and latitude are needed here, to convert
to these quantities from Absolute Salinity and Conservative Temperature;
see also gsw_O2sol_SP_pt
, which is formulated in UNESCO
terms.
gsw_O2sol(SA, CT, p, longitude, latitude)
gsw_O2sol(SA, CT, p, longitude, latitude)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
Oxygen solubility in micro-moles per kg.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_O2sol.html
Other things related to oxygen:
gsw_O2sol_SP_pt()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) latitude <- c(4, 4, 4, 4, 4, 4) longitude <- c(188, 188, 188, 188, 188, 188) O2sol <- gsw_O2sol(SA,CT,p,longitude,latitude) stopifnot(all.equal(O2sol/100, c(1.949651126384804, 1.958728907684003, 2.148922307892045, 2.738656506758550, 2.955109771828408, 3.133584919106894)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) latitude <- c(4, 4, 4, 4, 4, 4) longitude <- c(188, 188, 188, 188, 188, 188) O2sol <- gsw_O2sol(SA,CT,p,longitude,latitude) stopifnot(all.equal(O2sol/100, c(1.949651126384804, 1.958728907684003, 2.148922307892045, 2.738656506758550, 2.955109771828408, 3.133584919106894)))
Computes oxygen concentration for seawater that is equilibrium with
vapour-saturated air at standard atmospheric pressure (101.325 kPa,
i.e. for sea pressure of 0dbar). The formula, not created by the SCOR/IAPSO
Working Group 127 nor approved by the IOC, is stated in the TEOS-10
documentation to be from Benson and Krause (1984), as fitted by
Garcia and Gordon (1992, 1993). That formulation is framed in UNESCO-era
water properties; see gsw_O2sol
for the corresponding
computation in GSW variables.
gsw_O2sol_SP_pt(SP, pt)
gsw_O2sol_SP_pt(SP, pt)
SP |
Practical Salinity (PSS-78) [ unitless ]. The valid range for most 'gsw' functions is from 2 to 42. |
pt |
potential temperature (ITS-90) [ degC ] |
Oxygen solubility in micro-moles per kg.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_O2sol_SP_pt.html
Other things related to oxygen:
gsw_O2sol()
SP <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) pt <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) O2sol <- gsw_O2sol_SP_pt(SP, pt) stopifnot(all.equal(O2sol/100, c(1.946825431692940, 1.956135062814438, 2.146559360234014, 2.735652832698713, 2.951580761415903, 3.129598716631408)))
SP <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) pt <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) O2sol <- gsw_O2sol_SP_pt(SP, pt) stopifnot(all.equal(O2sol/100, c(1.946825431692940, 1.956135062814438, 2.146559360234014, 2.735652832698713, 2.951580761415903, 3.129598716631408)))
Pressure from height (75-term equation)
gsw_p_from_z(z, latitude, geo_strf_dyn_height, sea_surface_geopotential)
gsw_p_from_z(z, latitude, geo_strf_dyn_height, sea_surface_geopotential)
z |
height, zero at surface (but note last 2 args) and positive upwards [ m ] |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
geo_strf_dyn_height |
vector of same length as |
sea_surface_geopotential |
vector of same length as |
sea pressure [ dbar ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
The geo_strf_dyn_height
and sea_surface_geopotential
parameters were added in GSW-R version 1.0-6.
http://www.teos-10.org/pubs/gsw/html/gsw_p_from_z.html
Other things related to depth:
gsw_z_from_p()
z <- -c(10, 50, 125, 250, 600, 1000) latitude <- 4 p <- gsw_p_from_z(z, latitude) stopifnot(all.equal(p/1e3, c(0.010055726724518, 0.050283543374874, 0.125731858435610, 0.251540299593468, 0.604210012340727, 1.007990337692001)))
z <- -c(10, 50, 125, 250, 600, 1000) latitude <- 4 p <- gsw_p_from_z(z, latitude) stopifnot(all.equal(p/1e3, c(0.010055726724518, 0.050283543374874, 0.125731858435610, 0.251540299593468, 0.604210012340727, 1.007990337692001)))
Potential Enthalpy of Ice
gsw_pot_enthalpy_from_pt_ice(pt0_ice)
gsw_pot_enthalpy_from_pt_ice(pt0_ice)
pt0_ice |
potential temperature of ice (ITS-90) [ degC ] |
potential enthalpy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pot_enthalpy_from_pt_ice.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
pt0_ice <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) e <- gsw_pot_enthalpy_from_pt_ice(pt0_ice) stopifnot(all.equal(e/1e5, c(-3.555459449611868, -3.608607069998877, -3.596153890859193, -3.585123178806596, -3.557490528226009, -3.507198313847837)))
pt0_ice <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) e <- gsw_pot_enthalpy_from_pt_ice(pt0_ice) stopifnot(all.equal(e/1e5, c(-3.555459449611868, -3.608607069998877, -3.596153890859193, -3.585123178806596, -3.557490528226009, -3.507198313847837)))
Potential Enthalpy of Ice (Polynomial version)
gsw_pot_enthalpy_from_pt_ice_poly(pt0_ice)
gsw_pot_enthalpy_from_pt_ice_poly(pt0_ice)
pt0_ice |
potential temperature of ice (ITS-90) [ degC ] |
potential enthalpy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pot_enthalpy_from_pt_ice_poly.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
pt0_ice <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) e <- gsw_pot_enthalpy_from_pt_ice_poly(pt0_ice) stopifnot(all.equal(e/1e5, c(-3.555459482216265, -3.608607100959428, -3.596153924697033, -3.585123214031169, -3.557490561327994, -3.507198320793373)))
pt0_ice <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) e <- gsw_pot_enthalpy_from_pt_ice_poly(pt0_ice) stopifnot(all.equal(e/1e5, c(-3.555459482216265, -3.608607100959428, -3.596153924697033, -3.585123214031169, -3.557490561327994, -3.507198320793373)))
Potential Enthalpy of Ice at Freezing Point
gsw_pot_enthalpy_ice_freezing(SA, p, saturation_fraction = 1)
gsw_pot_enthalpy_ice_freezing(SA, p, saturation_fraction = 1)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
potential enthalpy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
1. The C source underlying this function lacks an argument, saturation_fraction
,
which is present in the Matlab source, and so that argument is ignored here.
2. The R code does not reproduce the check values stated at http://www.teos-10.org/pubs/gsw/html/gsw_pot_enthalpy_ice_freezing.html. Those values are incorporated in the test provided in ‘Examples’, so that test is not performed during build tests. See https://github.com/TEOS-10/GSW-R/issues/27.
http://www.teos-10.org/pubs/gsw/html/gsw_pot_enthalpy_ice_freezing.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction = 1 e <- gsw_pot_enthalpy_ice_freezing(SA, p, saturation_fraction) ## Not run: stopifnot(all.equal(e/1e5, c(-3.373409558967978, -3.374434164002012, -3.376117536928847, -3.378453698871986, -3.385497832886802, -3.393768587631489))) ## End(Not run)
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction = 1 e <- gsw_pot_enthalpy_ice_freezing(SA, p, saturation_fraction) ## Not run: stopifnot(all.equal(e/1e5, c(-3.373409558967978, -3.374434164002012, -3.376117536928847, -3.378453698871986, -3.385497832886802, -3.393768587631489))) ## End(Not run)
First Derivatives of Potential Enthalpy
gsw_pot_enthalpy_ice_freezing_first_derivatives(SA, p)
gsw_pot_enthalpy_ice_freezing_first_derivatives(SA, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing pot_enthalpy_ice_freezing_SA
[ (J/kg)/(g/kg) ], the derivative of
potential enthalpy with respect to Absolute Salinity,
and pot_enthalpy_ice_freezing_p
[ unitless ], the derivative of
Conservative Temperature with respect to potential temperature. (Note that the second
quantity is denoted pot_enthalpy_ice_freezing_P
in the documentation for the Matlab function.)
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pot_enthalpy_ice_freezing_first_derivatives.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_pot_enthalpy_ice_freezing_first_derivatives(SA, p) stopifnot(all.equal(r$pot_enthalpy_ice_freezing_SA/1e2, c(-1.183484968590718, -1.184125268891200, -1.184619267864844, -1.184026131143674, -1.183727706650925, -1.183814873741961))) stopifnot(all.equal(r$pot_enthalpy_ice_freezing_p/1e-3, c(-0.202880939983260, -0.203087335312542, -0.203473018454630, -0.204112435106666, -0.205889571619502, -0.207895691215823)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_pot_enthalpy_ice_freezing_first_derivatives(SA, p) stopifnot(all.equal(r$pot_enthalpy_ice_freezing_SA/1e2, c(-1.183484968590718, -1.184125268891200, -1.184619267864844, -1.184026131143674, -1.183727706650925, -1.183814873741961))) stopifnot(all.equal(r$pot_enthalpy_ice_freezing_p/1e-3, c(-0.202880939983260, -0.203087335312542, -0.203473018454630, -0.204112435106666, -0.205889571619502, -0.207895691215823)))
First Derivatives of Potential Enthalpy (Polynomial version)
gsw_pot_enthalpy_ice_freezing_first_derivatives_poly(SA, p)
gsw_pot_enthalpy_ice_freezing_first_derivatives_poly(SA, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing pot_enthalpy_ice_freezing_SA
[ (J/kg)/(g/kg) ], the derivative of
potential enthalpy with respect to Absolute Salinity,
and pot_enthalpy_ice_freezing_p
[ unitless ], the derivative of
Conservative Temperature with respect to potential temperature. (Note that the second
quantity is denoted pot_enthalpy_ice_freezing_P
in the documentation for the Matlab function.)
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pot_enthalpy_ice_freezing_first_derivatives_poly.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_pot_enthalpy_ice_freezing_first_derivatives_poly(SA, p) stopifnot(all.equal(r$pot_enthalpy_ice_freezing_SA/1e2, c(-1.183498006918154, -1.184135169530602, -1.184626138334419, -1.184032656542549, -1.183727371435808, -1.183805326863513))) stopifnot(all.equal(r$pot_enthalpy_ice_freezing_p/1e-3, c(-0.202934280214689, -0.203136950111241, -0.203515960539503, -0.204145112153220, -0.205898365024147, -0.207885289186464)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_pot_enthalpy_ice_freezing_first_derivatives_poly(SA, p) stopifnot(all.equal(r$pot_enthalpy_ice_freezing_SA/1e2, c(-1.183498006918154, -1.184135169530602, -1.184626138334419, -1.184032656542549, -1.183727371435808, -1.183805326863513))) stopifnot(all.equal(r$pot_enthalpy_ice_freezing_p/1e-3, c(-0.202934280214689, -0.203136950111241, -0.203515960539503, -0.204145112153220, -0.205898365024147, -0.207885289186464)))
Potential Enthalpy of Ice at Freezing Point (Polynomial version)
gsw_pot_enthalpy_ice_freezing_poly(SA, p, saturation_fraction = 1)
gsw_pot_enthalpy_ice_freezing_poly(SA, p, saturation_fraction = 1)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
potential enthalpy [ J/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pot_enthalpy_ice_freezing_poly.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction = 1 e <- gsw_pot_enthalpy_ice_freezing_poly(SA, p, saturation_fraction) stopifnot(all.equal(e/1e5, c(-3.373370858777002, -3.374395733068549, -3.376079507278181, -3.378416106344322, -3.385460970578123, -3.393731732645173)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction = 1 e <- gsw_pot_enthalpy_ice_freezing_poly(SA, p, saturation_fraction) stopifnot(all.equal(e/1e5, c(-3.373370858777002, -3.374395733068549, -3.376079507278181, -3.378416106344322, -3.385460970578123, -3.393731732645173)))
Potential density
gsw_pot_rho_t_exact(SA, t, p, p_ref)
gsw_pot_rho_t_exact(SA, t, p, p_ref)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
p_ref |
reference pressure [ dbar ] |
potential density [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pot_rho_t_exact.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 0 prho <- gsw_pot_rho_t_exact(SA,t,p,p_ref) stopifnot(all.equal(prho/1e3, c(1.021798145811089, 1.022052484416980, 1.023893583651958, 1.026667621124443, 1.027107230868492, 1.027409631264134)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 0 prho <- gsw_pot_rho_t_exact(SA,t,p,p_ref) stopifnot(all.equal(prho/1e3, c(1.021798145811089, 1.022052484416980, 1.023893583651958, 1.026667621124443, 1.027107230868492, 1.027409631264134)))
Pressure Coefficient for Ice
gsw_pressure_coefficient_ice(t, p)
gsw_pressure_coefficient_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
specific internal energy [ Pa/degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pressure_coefficient_ice.html
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) pc <- gsw_pressure_coefficient_ice(t, p) stopifnot(all.equal(pc/1e6, c(1.333098059787838, 1.326359005133730, 1.327354133828322, 1.327793888831923, 1.328549609231685, 1.331416733490227)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) pc <- gsw_pressure_coefficient_ice(t, p) stopifnot(all.equal(pc/1e6, c(1.333098059787838, 1.326359005133730, 1.327354133828322, 1.327793888831923, 1.328549609231685, 1.331416733490227)))
Pressure at which Seawater Freezes
gsw_pressure_freezing_CT(SA, CT, saturation_fraction = 1)
gsw_pressure_freezing_CT(SA, CT, saturation_fraction = 1)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
saturation_fraction |
fraction of air in water [unitless] |
pressure at which freezing will occur [ dbar ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pressure_freezing_CT.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( -1.8996, -1.9407, -2.0062, -2.0923, -2.3593, -2.6771) saturation_fraction <- c( 1, 0.8, 0.6, 0.5, 0.4, 0) p <- gsw_pressure_freezing_CT(SA, CT, saturation_fraction) stopifnot(all.equal(p/1e3, c(0.009890530270710, 0.050376026585933, 0.125933117050624, 0.251150973076077, 0.601441775836021, 1.002273338145043)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( -1.8996, -1.9407, -2.0062, -2.0923, -2.3593, -2.6771) saturation_fraction <- c( 1, 0.8, 0.6, 0.5, 0.4, 0) p <- gsw_pressure_freezing_CT(SA, CT, saturation_fraction) stopifnot(all.equal(p/1e3, c(0.009890530270710, 0.050376026585933, 0.125933117050624, 0.251150973076077, 0.601441775836021, 1.002273338145043)))
First Derivatives of Potential Temperature
gsw_pt_first_derivatives(SA, CT)
gsw_pt_first_derivatives(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
A list containing pt_SA
[ K/(g/kg) ], the derivative of
potential temperature with respect to Absolute Salinity,
and pt_CT
[ unitless ], the derivative of potential temperature
with respect to Conservative Temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pt_first_derivatives.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) r <- gsw_pt_first_derivatives(SA, CT) stopifnot(all.equal(r$pt_SA, c(0.041863223165431, 0.041452303483011, 0.034682095247246, 0.018711079068408, 0.014079958329844, 0.010577326129948))) stopifnot(all.equal(r$pt_CT, c(0.997192967140242, 0.997451686508335, 0.998357568277750, 0.999996224076267, 1.000283719083268, 1.000525947028218)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) r <- gsw_pt_first_derivatives(SA, CT) stopifnot(all.equal(r$pt_SA, c(0.041863223165431, 0.041452303483011, 0.034682095247246, 0.018711079068408, 0.014079958329844, 0.010577326129948))) stopifnot(all.equal(r$pt_CT, c(0.997192967140242, 0.997451686508335, 0.998357568277750, 0.999996224076267, 1.000283719083268, 1.000525947028218)))
Potential temperature from Conservative Temperature
gsw_pt_from_CT(SA, CT)
gsw_pt_from_CT(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
potential temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pt_from_CT.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) pt <- gsw_pt_from_CT(SA, CT) stopifnot(all.equal(pt, c(28.783177048624573, 28.420955597191984, 22.784953468087107, 10.230534394434429, 6.829216587061605, 4.324534835990236)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) pt <- gsw_pt_from_CT(SA, CT) stopifnot(all.equal(pt, c(28.783177048624573, 28.420955597191984, 22.784953468087107, 10.230534394434429, 6.829216587061605, 4.324534835990236)))
Potential Temperature from Entropy
gsw_pt_from_entropy(SA, entropy)
gsw_pt_from_entropy(SA, entropy)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
entropy |
specific entropy [ J/(degC*kg) ] |
potential temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pt_from_entropy.html
Other things related to entropy:
gsw_CT_from_entropy()
,
gsw_entropy_first_derivatives()
,
gsw_entropy_from_pt()
,
gsw_entropy_from_t()
,
gsw_entropy_ice()
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) entropy <- c(400.3892, 395.4378, 319.8668, 146.7910, 98.6471, 62.7919) pt <- gsw_pt_from_entropy(SA, entropy) stopifnot(all.equal(pt, c(28.783179828078666, 28.420954825949291, 22.784952736245351, 10.230532066931868, 6.829213325916900, 4.324537782985845)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) entropy <- c(400.3892, 395.4378, 319.8668, 146.7910, 98.6471, 62.7919) pt <- gsw_pt_from_entropy(SA, entropy) stopifnot(all.equal(pt, c(28.783179828078666, 28.420954825949291, 22.784952736245351, 10.230532066931868, 6.829213325916900, 4.324537782985845)))
Potential Temperature from Potential Enthalpy of Ice
gsw_pt_from_pot_enthalpy_ice(pot_enthalpy_ice)
gsw_pt_from_pot_enthalpy_ice(pot_enthalpy_ice)
pot_enthalpy_ice |
potential enthalpy of ice [ J/kg ] |
potential temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pt_from_pot_enthalpy_ice.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
pot_enthalpy_ice <- c(-3.5544e5, -3.6033e5, -3.5830e5, -3.5589e5, -3.4948e5, -3.4027e5) pt <- gsw_pt_from_pot_enthalpy_ice(pot_enthalpy_ice) stopifnot(all.equal(pt, c(-10.733087588125384, -13.167397822300588, -12.154205899172704, -10.956202704066083, -7.794963180206421, -3.314905214262531)))
pot_enthalpy_ice <- c(-3.5544e5, -3.6033e5, -3.5830e5, -3.5589e5, -3.4948e5, -3.4027e5) pt <- gsw_pt_from_pot_enthalpy_ice(pot_enthalpy_ice) stopifnot(all.equal(pt, c(-10.733087588125384, -13.167397822300588, -12.154205899172704, -10.956202704066083, -7.794963180206421, -3.314905214262531)))
Potential Temperature from Potential Enthalpy of Ice (Polynomial version)
gsw_pt_from_pot_enthalpy_ice_poly(pot_enthalpy_ice)
gsw_pt_from_pot_enthalpy_ice_poly(pot_enthalpy_ice)
pot_enthalpy_ice |
potential enthalpy of ice [ J/kg ] |
potential temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pt_from_pot_enthalpy_ice_poly.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_specvol_first_derivatives()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
pot_enthalpy_ice <- c(-3.5544e5, -3.6033e5, -3.5830e5, -3.5589e5, -3.4948e5, -3.4027e5) pt <- gsw_pt_from_pot_enthalpy_ice_poly(pot_enthalpy_ice) stopifnot(all.equal(pt, c(-10.733085986035007, -13.167396204945987, -12.154204137867396, -10.956201046447006, -7.794963341294590, -3.314907552013722)))
pot_enthalpy_ice <- c(-3.5544e5, -3.6033e5, -3.5830e5, -3.5589e5, -3.4948e5, -3.4027e5) pt <- gsw_pt_from_pot_enthalpy_ice_poly(pot_enthalpy_ice) stopifnot(all.equal(pt, c(-10.733085986035007, -13.167396204945987, -12.154204137867396, -10.956201046447006, -7.794963341294590, -3.314907552013722)))
Potential Temperature from in-situ Temperature
gsw_pt_from_t(SA, t, p, p_ref = 0)
gsw_pt_from_t(SA, t, p, p_ref = 0)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
p_ref |
reference pressure [ dbar ] |
potential temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pt_from_t.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 0 pt <- gsw_pt_from_t(SA, t, p, p_ref) stopifnot(all.equal(pt, c(28.783196819670632, 28.420983342398962, 22.784930399117108, 10.230523661095731, 6.829230224409661, 4.324510571845719)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 0 pt <- gsw_pt_from_t(SA, t, p, p_ref) stopifnot(all.equal(pt, c(28.783196819670632, 28.420983342398962, 22.784930399117108, 10.230523661095731, 6.829230224409661, 4.324510571845719)))
Potential Temperature of Ice from in-situ Temperature
gsw_pt_from_t_ice(t, p, p_ref = 0)
gsw_pt_from_t_ice(t, p, p_ref = 0)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
p_ref |
reference pressure [ dbar ] |
potential temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pt_from_t_ice.html
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 0 # not actually needed, since 0 is the default pt <- gsw_pt_from_t_ice(t, p, p_ref) stopifnot(all.equal(pt, c(-10.787787898205272, -13.443730926050661, -12.837427056999676, -12.314321615760921, -11.017040858094234, -8.622907355083147)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) p_ref <- 0 # not actually needed, since 0 is the default pt <- gsw_pt_from_t_ice(t, p, p_ref) stopifnot(all.equal(pt, c(-10.787787898205272, -13.443730926050661, -12.837427056999676, -12.314321615760921, -11.017040858094234, -8.622907355083147)))
Second Derivatives of Potential Temperature
gsw_pt_second_derivatives(SA, CT)
gsw_pt_second_derivatives(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
A list containing pt_SA_SA
[ K/(g/kg)^2 ], the second derivative of
potential temperature with respect to Absolute Salinity at constant
potential temperature, and pt_SA_pt
[ 1/(g/kg) ], the derivative of
potential temperature with respect to Conservative Temperature and
Absolute Salinity, and pt_pt_pt
[ 1/degC ], the second derivative of
potential temperature with respect to Conservative Temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pt_second_derivatives.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) r <- gsw_pt_second_derivatives(SA, CT) stopifnot(all.equal(r$pt_SA_SA/1e-3, c(0.160307058371208, 0.160785497957769, 0.168647220588324, 0.198377949876584, 0.210181899321236, 0.220018966513329))) stopifnot(all.equal(r$pt_SA_CT, c(0.001185581323691, 0.001187068518686, 0.001217629686266, 0.001333254154015, 0.001379674342678, 0.001418371539325))) stopifnot(all.equal(r$pt_CT_CT/1e-3, c(-0.121979811279463, -0.123711264754503, -0.140136818504977, -0.140645384127949, -0.113781055410824, -0.082417269009484)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) r <- gsw_pt_second_derivatives(SA, CT) stopifnot(all.equal(r$pt_SA_SA/1e-3, c(0.160307058371208, 0.160785497957769, 0.168647220588324, 0.198377949876584, 0.210181899321236, 0.220018966513329))) stopifnot(all.equal(r$pt_SA_CT, c(0.001185581323691, 0.001187068518686, 0.001217629686266, 0.001333254154015, 0.001379674342678, 0.001418371539325))) stopifnot(all.equal(r$pt_CT_CT/1e-3, c(-0.121979811279463, -0.123711264754503, -0.140136818504977, -0.140645384127949, -0.113781055410824, -0.082417269009484)))
Potential temperature referenced to the surface
gsw_pt0_from_t(SA, t, p)
gsw_pt0_from_t(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
potential temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pt0_from_t.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) pt0 <- gsw_pt0_from_t(SA, t, p) stopifnot(all.equal(pt0, c(28.783196819670632, 28.420983342398962, 22.784930399117108, 10.230523661095731, 6.829230224409661, 4.324510571845719)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) pt0 <- gsw_pt0_from_t(SA, t, p) stopifnot(all.equal(pt0, c(28.783196819670632, 28.420983342398962, 22.784930399117108, 10.230523661095731, 6.829230224409661, 4.324510571845719)))
Potential Temperature of Ice Referenced to the Surface
gsw_pt0_from_t_ice(t, p)
gsw_pt0_from_t_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
potential temperature [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_pt0_from_t_ice.html
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) pt0 <- gsw_pt0_from_t_ice(t, p) stopifnot(all.equal(pt0, c(-10.787787898205298, -13.443730926050607, -12.837427056999708, -12.314321615760905, -11.017040858094250, -8.622907355083088)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) pt0 <- gsw_pt0_from_t_ice(t, p) stopifnot(all.equal(pt0, c(-10.787787898205298, -13.443730926050607, -12.837427056999708, -12.314321615760905, -11.017040858094250, -8.622907355083088)))
In-situ density, using the 75-term equation for specific volume.
gsw_rho(SA, CT, p)
gsw_rho(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
in-situ density [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_rho.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) rho <- gsw_rho(SA,CT,p) stopifnot(all.equal(rho/1e3, c(1.021839935738108, 1.022262457966867, 1.024427195413316, 1.027790152759127, 1.029837779000189, 1.032002453224572)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) rho <- gsw_rho(SA,CT,p) stopifnot(all.equal(rho/1e3, c(1.021839935738108, 1.022262457966867, 1.024427195413316, 1.027790152759127, 1.029837779000189, 1.032002453224572)))
Calculate the in-situ density, the expansion coefficient (with respect to Conservative Temperature) and the haline contraction coefficient (with respect to Absolute Salinity), using the 75-term equation.
gsw_rho_alpha_beta(SA, CT, p)
gsw_rho_alpha_beta(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing in-situ density rho
[ kg/m^3 ], thermal expansion
coefficient alpha
[ 1/degC ], and haline contraction coefficient
beta
[ kg/g ].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_rho_alpha_beta.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_rho_alpha_beta(SA, CT, p) stopifnot(all.equal(r$rho/1000, c(1.021839935738108, 1.022262457966867, 1.024427195413316, 1.027790152759127, 1.029837779000189, 1.032002453224572))) stopifnot(all.equal(r$alpha*1000, c(0.324638934509245, 0.322655537959731, 0.281145723210171, 0.173199716344780, 0.146289673594824, 0.129414845334599))) stopifnot(all.equal(r$beta*1000, c(0.717483987596135, 0.717647512290095, 0.726211643644768, 0.750500751749777, 0.755052064788492, 0.757050813384370)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_rho_alpha_beta(SA, CT, p) stopifnot(all.equal(r$rho/1000, c(1.021839935738108, 1.022262457966867, 1.024427195413316, 1.027790152759127, 1.029837779000189, 1.032002453224572))) stopifnot(all.equal(r$alpha*1000, c(0.324638934509245, 0.322655537959731, 0.281145723210171, 0.173199716344780, 0.146289673594824, 0.129414845334599))) stopifnot(all.equal(r$beta*1000, c(0.717483987596135, 0.717647512290095, 0.726211643644768, 0.750500751749777, 0.755052064788492, 0.757050813384370)))
Density First Derivatives wrt SA, CT and p (75-term equation)
gsw_rho_first_derivatives(SA, CT, p)
gsw_rho_first_derivatives(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
list containing drho_dSA [ kg^2/(g m^3) ], drho_dCT [ kg/(K m^3) ] and drho_dp [ kg/(Pa m^3) ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_rho_first_derivatives.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_rho_first_derivatives(SA, CT, p) stopifnot(all.equal(r$drho_dSA, c(0.733153791778356, 0.733624109867480, 0.743950957375504, 0.771357282286743, 0.777581141431288, 0.781278296628328))) stopifnot(all.equal(r$drho_dCT, c(-0.331729027977015, -0.329838643311336, -0.288013324730644, -0.178012962919839, -0.150654632545556, -0.133556437868984))) stopifnot(all.equal(r$drho_dp, 1e-6*c(0.420302360738476, 0.420251070273888, 0.426773054953941, 0.447763615252861, 0.452011501791479, 0.454118117103094)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_rho_first_derivatives(SA, CT, p) stopifnot(all.equal(r$drho_dSA, c(0.733153791778356, 0.733624109867480, 0.743950957375504, 0.771357282286743, 0.777581141431288, 0.781278296628328))) stopifnot(all.equal(r$drho_dCT, c(-0.331729027977015, -0.329838643311336, -0.288013324730644, -0.178012962919839, -0.150654632545556, -0.133556437868984))) stopifnot(all.equal(r$drho_dp, 1e-6*c(0.420302360738476, 0.420251070273888, 0.426773054953941, 0.447763615252861, 0.452011501791479, 0.454118117103094)))
Density First Derivatives wrt enthalpy (75-term equation)
gsw_rho_first_derivatives_wrt_enthalpy(SA, CT, p)
gsw_rho_first_derivatives_wrt_enthalpy(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing rho_SA_wrt_h
[ (kg/m^3)/(g/kg) ]
and rho_h
[ (kg/m^3)/(J/kg) ].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_rho_first_derivatives_wrt_enthalpy.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_rho_first_derivatives_wrt_enthalpy(SA, CT, p) stopifnot(all.equal(r$rho_SA_wrt_h, c(0.733147960400929, 0.733595114830609, 0.743886977148835, 0.771275693831993, 0.777414200397148, 0.781030546357425))) stopifnot(all.equal(r$rho_h*1e4, c(-0.831005413475887, -0.826243794873652, -0.721438289309903, -0.445892608094272, -0.377326924646647, -0.334475962698187)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_rho_first_derivatives_wrt_enthalpy(SA, CT, p) stopifnot(all.equal(r$rho_SA_wrt_h, c(0.733147960400929, 0.733595114830609, 0.743886977148835, 0.771275693831993, 0.777414200397148, 0.781030546357425))) stopifnot(all.equal(r$rho_h*1e4, c(-0.831005413475887, -0.826243794873652, -0.721438289309903, -0.445892608094272, -0.377326924646647, -0.334475962698187)))
In-situ density of ice [kg/m^3]
gsw_rho_ice(t, p)
gsw_rho_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
in-situ density [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_rho_ice.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) rho <- gsw_rho_ice(t, p) stopifnot(all.equal(rho, c(918.2879969148962, 918.7043487325120, 918.6962796312690, 918.7513732275766, 918.9291139833307, 919.0032237449378)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) rho <- gsw_rho_ice(t, p) stopifnot(all.equal(rho, c(918.2879969148962, 918.7043487325120, 918.6962796312690, 918.7513732275766, 918.9291139833307, 919.0032237449378)))
Second Derivatives of Density
gsw_rho_second_derivatives(SA, CT, p)
gsw_rho_second_derivatives(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing rho_SA_SA
[ (kg/m^3)/(g/kg)^2 ], the second derivative of
density with respect to Absolute Salinity,
rho_SA_CT
[ (g/kg)/(g/kg)/degC ], the derivative of
density with respect to Absolute Salinity and Conservative Temperature,
and rho_CT_CT
[ (kg/m^3)/degC^2 ], the second derivative of
density with respect to Conservative Temperature.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_rho_second_derivatives.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_rho_second_derivatives(SA, CT, p) stopifnot(all.equal(r$rho_SA_SA/1e-3, c(0.207364734477357, 0.207415414547223, 0.192903197286004, 0.135809142211237, 0.122627562106076, 0.114042431905783))) stopifnot(all.equal(r$rho_SA_CT, c(-0.001832856561477, -0.001837354806146, -0.001988065808078, -0.002560181494807, -0.002708939446458, -0.002798484050141))) stopifnot(all.equal(r$rho_CT_CT, c(-0.007241243828334, -0.007267807914635, -0.007964270843331, -0.010008164822017, -0.010572200761984, -0.010939294762200))) all.equal(r$rho_SA_p, 1e-9*c(-0.617330965378778, -0.618403843947729, -0.655302447133274, -0.764800777480716, -0.792168044875350, -0.810125648949170)) all.equal(r$rho_CT_p, 1e-8*c(-0.116597992537549, -0.117744271236102, -0.141712549466964, -0.214414626736539, -0.237704139801551, -0.255296606034074))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_rho_second_derivatives(SA, CT, p) stopifnot(all.equal(r$rho_SA_SA/1e-3, c(0.207364734477357, 0.207415414547223, 0.192903197286004, 0.135809142211237, 0.122627562106076, 0.114042431905783))) stopifnot(all.equal(r$rho_SA_CT, c(-0.001832856561477, -0.001837354806146, -0.001988065808078, -0.002560181494807, -0.002708939446458, -0.002798484050141))) stopifnot(all.equal(r$rho_CT_CT, c(-0.007241243828334, -0.007267807914635, -0.007964270843331, -0.010008164822017, -0.010572200761984, -0.010939294762200))) all.equal(r$rho_SA_p, 1e-9*c(-0.617330965378778, -0.618403843947729, -0.655302447133274, -0.764800777480716, -0.792168044875350, -0.810125648949170)) all.equal(r$rho_CT_p, 1e-8*c(-0.116597992537549, -0.117744271236102, -0.141712549466964, -0.214414626736539, -0.237704139801551, -0.255296606034074))
Second Derivatives of Density wrt Enthalpy
gsw_rho_second_derivatives_wrt_enthalpy(SA, CT, p)
gsw_rho_second_derivatives_wrt_enthalpy(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing rho_SA_SA
[ (kg/m^3)/(g/kg)^2 ], the second derivative of
density with respect to Absolute Salinity,
rho_SA_h
[ (g/kg)/(g/kg)/(J/kg)], the derivative of
density with respect to Absolute Salinity and enthalpy,
and rho_h_h
[ (kg/m^3)/(J/kg)^2 ], the second derivative of
density with respect to enthalpy.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_rho_second_derivatives_wrt_enthalpy.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_rho_second_derivatives_wrt_enthalpy(SA, CT, p) stopifnot(all.equal(r$rho_SA_SA/1e-3, c(0.207325714908677, 0.207131960039965, 0.192001360206293, 0.133399974356615, 0.116504845152129, 0.103433221305694))) stopifnot(all.equal(r$rho_SA_h/1e-6, c(-0.459053080088382, -0.460370569872258, -0.498605615416296, -0.642833108550133, -0.682091962941161, -0.706793055445909))) stopifnot(all.equal(r$rho_h_h/1e-9, c(-0.454213854637790, -0.455984900239309, -0.499870030989387, -0.628337767293403, -0.664021595759308, -0.687367088752173)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_rho_second_derivatives_wrt_enthalpy(SA, CT, p) stopifnot(all.equal(r$rho_SA_SA/1e-3, c(0.207325714908677, 0.207131960039965, 0.192001360206293, 0.133399974356615, 0.116504845152129, 0.103433221305694))) stopifnot(all.equal(r$rho_SA_h/1e-6, c(-0.459053080088382, -0.460370569872258, -0.498605615416296, -0.642833108550133, -0.682091962941161, -0.706793055445909))) stopifnot(all.equal(r$rho_h_h/1e-9, c(-0.454213854637790, -0.455984900239309, -0.499870030989387, -0.628337767293403, -0.664021595759308, -0.687367088752173)))
In-situ Density of Seawater
gsw_rho_t_exact(SA, t, p)
gsw_rho_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
in-situ density [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_rho_t_exact.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) rho <- gsw_rho_t_exact(SA, t, p) stopifnot(all.equal(rho/1e3, c(1.021840173185531, 1.022262689926782, 1.024427715941676, 1.027790201811623, 1.029837714725961, 1.032002404116447)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) rho <- gsw_rho_t_exact(SA, t, p) stopifnot(all.equal(rho/1e3, c(1.021840173185531, 1.022262689926782, 1.024427715941676, 1.027790201811623, 1.029837714725961, 1.032002404116447)))
Compute Absolute Salinity at Freezing Conservative Temperature
gsw_SA_freezing_from_CT(CT, p, saturation_fraction = 1)
gsw_SA_freezing_from_CT(CT, p, saturation_fraction = 1)
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
Absolute Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SA_freezing_from_CT.html
CT <- c(-0.11901, -0.15608, -0.72138, -1.97738, -2.31728, -2.56764) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 SA <- gsw_SA_freezing_from_CT(CT, p, saturation_fraction) stopifnot(all.equal(SA, c(2.280500648179144, 2.416867651098550, 11.973503162175106, 32.868973869711390, 34.017513292374431, 32.859871943514150)))
CT <- c(-0.11901, -0.15608, -0.72138, -1.97738, -2.31728, -2.56764) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 SA <- gsw_SA_freezing_from_CT(CT, p, saturation_fraction) stopifnot(all.equal(SA, c(2.280500648179144, 2.416867651098550, 11.973503162175106, 32.868973869711390, 34.017513292374431, 32.859871943514150)))
Compute Absolute Salinity at Freezing Point (Polynomial version)
gsw_SA_freezing_from_CT_poly(CT, p, saturation_fraction = 1)
gsw_SA_freezing_from_CT_poly(CT, p, saturation_fraction = 1)
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
Absolute Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SA_freezing_from_CT_poly.html
CT <- c(-0.11901, -0.15608, -0.72138, -1.97738, -2.31728, -2.56764) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 SA <- gsw_SA_freezing_from_CT_poly(CT, p, saturation_fraction) stopifnot(all.equal(SA, c(2.281810267792954, 2.418134292641376, 11.971996354752958, 32.867931280363138, 34.015087798162732, 32.856434894818825)))
CT <- c(-0.11901, -0.15608, -0.72138, -1.97738, -2.31728, -2.56764) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 SA <- gsw_SA_freezing_from_CT_poly(CT, p, saturation_fraction) stopifnot(all.equal(SA, c(2.281810267792954, 2.418134292641376, 11.971996354752958, 32.867931280363138, 34.015087798162732, 32.856434894818825)))
Compute Absolute Salinity at Freezing in-situ Temperature
gsw_SA_freezing_from_t(t, p, saturation_fraction = 1)
gsw_SA_freezing_from_t(t, p, saturation_fraction = 1)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
Absolute Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SA_freezing_from_t.html
t <- c(-0.11901, -0.15608, -0.72138, -1.97738, -2.31728, -2.56764) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 SA <- gsw_SA_freezing_from_t(t, p, saturation_fraction) stopifnot(all.equal(SA, c(2.015798440008186, 2.150742019102164, 11.679080083422074, 32.844196564019278, 34.138949682974413, 33.100945437175568)))
t <- c(-0.11901, -0.15608, -0.72138, -1.97738, -2.31728, -2.56764) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 SA <- gsw_SA_freezing_from_t(t, p, saturation_fraction) stopifnot(all.equal(SA, c(2.015798440008186, 2.150742019102164, 11.679080083422074, 32.844196564019278, 34.138949682974413, 33.100945437175568)))
Compute Absolute Salinity at Freezing in-situ Temperature (Polynomial version)
gsw_SA_freezing_from_t_poly(t, p, saturation_fraction = 1)
gsw_SA_freezing_from_t_poly(t, p, saturation_fraction = 1)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
Absolute Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SA_freezing_from_t_poly.html
t <- c(-0.11901, -0.15608, -0.72138, -1.97738, -2.31728, -2.56764) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 SA <- gsw_SA_freezing_from_t_poly(t, p, saturation_fraction) stopifnot(all.equal(SA, c(2.017072489768256, 2.151989342038462, 11.677649626115608, 32.843128114999026, 34.136459306273451, 33.097427522625182)))
t <- c(-0.11901, -0.15608, -0.72138, -1.97738, -2.31728, -2.56764) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 SA <- gsw_SA_freezing_from_t_poly(t, p, saturation_fraction) stopifnot(all.equal(SA, c(2.017072489768256, 2.151989342038462, 11.677649626115608, 32.843128114999026, 34.136459306273451, 33.097427522625182)))
Compute Absolute Salinity from Density, etc
gsw_SA_from_rho(rho, CT, p)
gsw_SA_from_rho(rho, CT, p)
rho |
seawater density [ kg/m^3 ] |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Absolute Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SA_from_rho.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
rho <- c(1021.8482, 1022.2647, 1024.4207, 1027.7841, 1029.8287, 1031.9916) CT <-c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) SA <- gsw_SA_from_rho(rho, CT, p) stopifnot(all.equal(SA, c(34.712080120418108, 34.891723808488869, 35.026202257609505, 34.847160842234572, 34.736398269039945, 34.732228881079742)))
rho <- c(1021.8482, 1022.2647, 1024.4207, 1027.7841, 1029.8287, 1031.9916) CT <-c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) SA <- gsw_SA_from_rho(rho, CT, p) stopifnot(all.equal(SA, c(34.712080120418108, 34.891723808488869, 35.026202257609505, 34.847160842234572, 34.736398269039945, 34.732228881079742)))
Calculate Absolute Salinity from Practical Salinity, pressure, longitude, and latitude.
gsw_SA_from_SP(SP, p, longitude, latitude)
gsw_SA_from_SP(SP, p, longitude, latitude)
SP |
Practical Salinity (PSS-78) [ unitless ]. The valid range for most 'gsw' functions is from 2 to 42. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
If SP is a matrix and if its dimensions correspond to the
lengths of longitude and latitude, then the latter are
converted to analogous matrices with expand.grid
.
Absolute Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SA_from_SP.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
SP <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) p <- c( 10, 50, 125, 250, 600, 1000) lat <- c( 4, 4, 4, 4, 4, 4) long <- c( 188, 188, 188, 188, 188, 188) SA <- gsw_SA_from_SP(SP, p, long, lat) stopifnot(all.equal(SA, c(34.711778344814114, 34.891522618230098, 35.025544862476920, 34.847229026189588, 34.736628474576051, 34.732363065590846)))
SP <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) p <- c( 10, 50, 125, 250, 600, 1000) lat <- c( 4, 4, 4, 4, 4, 4) long <- c( 188, 188, 188, 188, 188, 188) SA <- gsw_SA_from_SP(SP, p, long, lat) stopifnot(all.equal(SA, c(34.711778344814114, 34.891522618230098, 35.025544862476920, 34.847229026189588, 34.736628474576051, 34.732363065590846)))
Calculate Absolute Salinity from Practical Salinity, pressure, longitude, and latitude.
gsw_SA_from_SP_Baltic(SP, longitude, latitude)
gsw_SA_from_SP_Baltic(SP, longitude, latitude)
SP |
Practical Salinity (PSS-78) [ unitless ]. The valid range for most 'gsw' functions is from 2 to 42. |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
If SP is a matrix and if its dimensions correspond to the
lengths of longitude and latitude, then the latter are
converted to analogous matrices with expand.grid
.
Absolute Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SA_from_SP_Baltic.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
SP <- c( 6.5683, 6.6719, 6.8108, 7.2629, 7.4825, 10.2796) lon <- c( 20, 20, 20, 20, 20, 20) lat <- c( 59, 59, 59, 59, 59, 59) SA <- gsw_SA_from_SP_Baltic(SP, lon, lat) stopifnot(all.equal(SA, c(6.669945432342856, 6.773776430742856, 6.912986138057142, 7.366094191885713, 7.586183837142856, 10.389520570971428)))
SP <- c( 6.5683, 6.6719, 6.8108, 7.2629, 7.4825, 10.2796) lon <- c( 20, 20, 20, 20, 20, 20) lat <- c( 59, 59, 59, 59, 59, 59) SA <- gsw_SA_from_SP_Baltic(SP, lon, lat) stopifnot(all.equal(SA, c(6.669945432342856, 6.773776430742856, 6.912986138057142, 7.366094191885713, 7.586183837142856, 10.389520570971428)))
Calculate Absolute Salinity from Preformed Salinity, pressure, longitude, and latitude.
gsw_SA_from_Sstar(Sstar, p, longitude, latitude)
gsw_SA_from_Sstar(Sstar, p, longitude, latitude)
Sstar |
Preformed Salinity [ g/kg ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
If Sstar is a matrix and if its dimensions correspond to the
lengths of longitude and latitude, then the latter are
converted to analogous matrices with expand.grid
.
Absolute Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SA_from_Sstar.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
Sstar <- c(34.7115, 34.8912, 35.0247, 34.8436, 34.7291, 34.7197) p <- c( 10, 50, 125, 250, 600, 1000) lat <- c( 4, 4, 4, 4, 4, 4) long <- c( 188, 188, 188, 188, 188, 188) SA <- gsw_SA_from_Sstar(Sstar, p, long, lat) stopifnot(all.equal(SA, c(34.711724663585905, 34.891561223296009, 35.025594598699882, 34.847235885385913, 34.736694493054166, 34.732387111902753)))
Sstar <- c(34.7115, 34.8912, 35.0247, 34.8436, 34.7291, 34.7197) p <- c( 10, 50, 125, 250, 600, 1000) lat <- c( 4, 4, 4, 4, 4, 4) long <- c( 188, 188, 188, 188, 188, 188) SA <- gsw_SA_from_Sstar(Sstar, p, long, lat) stopifnot(all.equal(SA, c(34.711724663585905, 34.891561223296009, 35.025594598699882, 34.847235885385913, 34.736694493054166, 34.732387111902753)))
Absolute Salinity Anomaly Ratio
gsw_SAAR(p, longitude, latitude)
gsw_SAAR(p, longitude, latitude)
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
a list containing SAAR
, which is
the (unitless) Absolute Salinity Anomaly Ratio, and in_ocean
is set to 1 if SAAR
is nonzero, or to 0 otherwise.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
The definition of in_ocean
is incorrect, because the C function named
gsw_saar
, which is called by the present R function, does not calculate
in_ocean
, as the base Matlab function named gsw_SAAR
does. However,
examination of the Matlab code shows that in_ocean
is set to 0 along
with SAAR
, whenever the original estimate of the latter is nonfinite.
Thus, points that would be signalled as being on the land by the Matlab code
are indicated in the same way with the present R function. However, other points
may also be indicated as being on land, if SAAR
is simply zero in the
first calculation. Whether this poses a problem in practice is an open question,
since it seems likely that this function would only be called with oceanic
locations, anyway. If problems arise for users, a patch can be written to
improve things.
http://www.teos-10.org/pubs/gsw/html/gsw_SAAR.html
p <- c(10, 50, 125, 250, 600, 1000) longitude <- c(188, 188, 188, 188, 188, 188) latitude <- c(4, 4, 4, 4, 4, 4) SAAR <- gsw_SAAR(p, longitude, latitude) stopifnot(all.equal(1e3*SAAR$SAAR, c(0.004794295602143, 0.007668755837570, 0.018919828449091, 0.077293264028981, 0.161974583039298, 0.270652408428964))) stopifnot(all.equal(SAAR$in_ocean, rep(1, 6)))
p <- c(10, 50, 125, 250, 600, 1000) longitude <- c(188, 188, 188, 188, 188, 188) latitude <- c(4, 4, 4, 4, 4, 4) SAAR <- gsw_SAAR(p, longitude, latitude) stopifnot(all.equal(1e3*SAAR$SAAR, c(0.004794295602143, 0.007668755837570, 0.018919828449091, 0.077293264028981, 0.161974583039298, 0.270652408428964))) stopifnot(all.equal(SAAR$in_ocean, rep(1, 6)))
Sea ice Fraction to Cool Seawater to Freezing
gsw_seaice_fraction_to_freeze_seawater(SA, CT, p, SA_seaice, t_seaice)
gsw_seaice_fraction_to_freeze_seawater(SA, CT, p, SA_seaice, t_seaice)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
SA_seaice |
Absolute Salinity of sea ice [ g/kg ] |
t_seaice |
initial temperature of sea ice [ degC ] |
a list containing SA_freeze
, CT_freeze
and w_Ih
.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_seaice_fraction_to_freeze_seawater.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( -1.7856, -1.4329, -1.8103, -1.2600, -0.6886, 0.4403) p <- c( 10, 50, 125, 250, 600, 1000) SA_seaice <- c( 5, 4.8, 3.5, 2.5, 1, 0.4) t_seaice <- c(-5.7856, -4.4329, -3.8103, -4.2600, -3.8863, -3.4036) r <- gsw_seaice_fraction_to_freeze_seawater(SA, CT, p, SA_seaice, t_seaice) stopifnot(all.equal(r$SA_freeze, c(34.671271207148074, 34.703449677481224, 34.950192062047861, 34.525277379661880, 34.077349518029997, 33.501836583274191))) stopifnot(all.equal(r$CT_freeze, c(-1.895419711000293, -1.927935638317893, -1.999943183939312, -2.071677444370745, -2.318866154643864, -2.603185031462614))) stopifnot(all.equal(r$w_seaice, c(0.001364063868629, 0.006249283768465, 0.002391958850970, 0.009952101583387, 0.019541106156815, 0.035842627277027)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c( -1.7856, -1.4329, -1.8103, -1.2600, -0.6886, 0.4403) p <- c( 10, 50, 125, 250, 600, 1000) SA_seaice <- c( 5, 4.8, 3.5, 2.5, 1, 0.4) t_seaice <- c(-5.7856, -4.4329, -3.8103, -4.2600, -3.8863, -3.4036) r <- gsw_seaice_fraction_to_freeze_seawater(SA, CT, p, SA_seaice, t_seaice) stopifnot(all.equal(r$SA_freeze, c(34.671271207148074, 34.703449677481224, 34.950192062047861, 34.525277379661880, 34.077349518029997, 33.501836583274191))) stopifnot(all.equal(r$CT_freeze, c(-1.895419711000293, -1.927935638317893, -1.999943183939312, -2.071677444370745, -2.318866154643864, -2.603185031462614))) stopifnot(all.equal(r$w_seaice, c(0.001364063868629, 0.006249283768465, 0.002391958850970, 0.009952101583387, 0.019541106156815, 0.035842627277027)))
This uses the 75-term density equation, and returns potential density referenced to a pressure of 0 dbar, minus 1000 kg/m^3.
gsw_sigma0(SA, CT)
gsw_sigma0(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
potential density anomaly [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_sigma0.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) sigma0 <- gsw_sigma0(SA,CT) stopifnot(all.equal(sigma0, c(21.797900819337656, 22.052215404397316, 23.892985307893923, 26.667608665972011, 27.107380455119710, 27.409748977090885)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) sigma0 <- gsw_sigma0(SA,CT) stopifnot(all.equal(sigma0, c(21.797900819337656, 22.052215404397316, 23.892985307893923, 26.667608665972011, 27.107380455119710, 27.409748977090885)))
This uses the 75-term density equation, and returns potential density referenced to a pressure of 1000 dbar, minus 1000 kg/m^3.
gsw_sigma1(SA, CT)
gsw_sigma1(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
potential density anomaly [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_sigma1.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) sigma1 <- gsw_sigma1(SA,CT) stopifnot(all.equal(sigma1, c(25.955618850310202, 26.213131422420247, 28.125423775188438, 31.120360038882382, 31.637724222733368, 32.002453224572037)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) sigma1 <- gsw_sigma1(SA,CT) stopifnot(all.equal(sigma1, c(25.955618850310202, 26.213131422420247, 28.125423775188438, 31.120360038882382, 31.637724222733368, 32.002453224572037)))
This uses the 75-term density equation, and returns potential density referenced to a pressure of 2000 dbar, minus 1000 kg/m^3.
gsw_sigma2(SA, CT)
gsw_sigma2(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
potential density anomaly [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_sigma2.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) sigma2 <- gsw_sigma2(SA,CT) stopifnot(all.equal(sigma2, c(30.023152223799116, 30.283783336283477, 32.265556840289719, 35.474550881051073, 36.067289438047737, 36.492606494879510)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) sigma2 <- gsw_sigma2(SA,CT) stopifnot(all.equal(sigma2, c(30.023152223799116, 30.283783336283477, 32.265556840289719, 35.474550881051073, 36.067289438047737, 36.492606494879510)))
This uses the 75-term density equation, and returns potential density referenced to a pressure of 3000 dbar, minus 1000 kg/m^3.
gsw_sigma3(SA, CT)
gsw_sigma3(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
potential density anomaly with reference pressure 3000 dbar [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_sigma3.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) sigma3 <- gsw_sigma3(SA,CT) stopifnot(all.equal(sigma3, c(34.003747849903675, 34.267409891564057, 36.316415829697917, 39.732367693977039, 40.397934186745033, 40.881795690566832)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) sigma3 <- gsw_sigma3(SA,CT) stopifnot(all.equal(sigma3, c(34.003747849903675, 34.267409891564057, 36.316415829697917, 39.732367693977039, 40.397934186745033, 40.881795690566832)))
This uses the 75-term density equation, and returns potential density referenced to a pressure of 4000 dbar, minus 1000 kg/m^3.
gsw_sigma4(SA, CT)
gsw_sigma4(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
potential density anomaly with reference pressure 4000 dbar [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_sigma4.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) sigma4 <- gsw_sigma4(SA,CT) stopifnot(all.equal(sigma4, c(37.900374609834898, 38.166979617032439, 40.280876075282549, 43.896091033421953, 44.631677245327637, 45.171817312020039)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) sigma4 <- gsw_sigma4(SA,CT) stopifnot(all.equal(sigma4, c(37.900374609834898, 38.166979617032439, 40.280876075282549, 43.896091033421953, 44.631677245327637, 45.171817312020039)))
Speed of sound in seawater, using the 75-term equation for specific volume.
gsw_sound_speed(SA, CT, p)
gsw_sound_speed(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
sound speed [ m/s ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_sound_speed.html
Other things related to sound:
gsw_sound_speed_ice()
,
gsw_sound_speed_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) speed <- gsw_sound_speed(SA,CT,p) stopifnot(all.equal(speed/1e3, c(1.542426412426373, 1.542558891663385, 1.530801535436184, 1.494551099295314, 1.487622786765276, 1.484271672296205)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) speed <- gsw_sound_speed(SA,CT,p) stopifnot(all.equal(speed/1e3, c(1.542426412426373, 1.542558891663385, 1.530801535436184, 1.494551099295314, 1.487622786765276, 1.484271672296205)))
Speed of sound in ice.
gsw_sound_speed_ice(t, p)
gsw_sound_speed_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
sound speed [ m/s ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_sound_speed_ice.html
Other things related to sound:
gsw_sound_speed()
,
gsw_sound_speed_t_exact()
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) speed <- gsw_sound_speed_ice(t, p) stopifnot(all.equal(speed/1e3, c(3.111311360346254, 3.116492565497544, 3.115833462003452, 3.115637032488204, 3.115377253092692, 3.113321384499191)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) speed <- gsw_sound_speed_ice(t, p) stopifnot(all.equal(speed/1e3, c(3.111311360346254, 3.116492565497544, 3.115833462003452, 3.115637032488204, 3.115377253092692, 3.113321384499191)))
Sound Speed in Seawater
gsw_sound_speed_t_exact(SA, t, p)
gsw_sound_speed_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
sound speed [ m/s ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_sound_speed_t_exact.html
Other things related to sound:
gsw_sound_speed()
,
gsw_sound_speed_ice()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) sound_speed <- gsw_sound_speed_t_exact(SA,CT,p) stopifnot(all.equal(sound_speed/1e3, c(1.542615803587414, 1.542703534065789, 1.530844979136360, 1.494409996920661, 1.487377102518027, 1.483934609078705)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) sound_speed <- gsw_sound_speed_t_exact(SA,CT,p) stopifnot(all.equal(sound_speed/1e3, c(1.542615803587414, 1.542703534065789, 1.530844979136360, 1.494409996920661, 1.487377102518027, 1.483934609078705)))
Convert from Electrical Conductivity to Practical Salinity
gsw_SP_from_C(C, t, p)
gsw_SP_from_C(C, t, p)
C |
conductivity [ mS/cm ] |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Practical Salinity (PSS-78) [ unitless ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SP_from_C.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
Other things related to conductivity:
gsw_C_from_SP()
C <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) SP <- gsw_SP_from_C(C,t,p) stopifnot(all.equal(SP, c(20.009869599086951, 20.265511864874270, 22.981513062527689, 31.204503263727982, 34.032315787432829, 36.400308494388170)))
C <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) t <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) SP <- gsw_SP_from_C(C,t,p) stopifnot(all.equal(SP, c(20.009869599086951, 20.265511864874270, 22.981513062527689, 31.204503263727982, 34.032315787432829, 36.400308494388170)))
Calculate Practical Salinity from Absolute Salinity, pressure, longitude, and latitude.
gsw_SP_from_SA(SA, p, longitude, latitude)
gsw_SP_from_SA(SA, p, longitude, latitude)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
If SP is a matrix and if its dimensions correspond to the
lengths of longitude and latitude, then the latter are
converted to analogous matrices with expand.grid
.
Note: unlike the corresponding Matlab function, this does not return a flag indicating whether the location is in the ocean.
Practical Salinity (PSS-78) [ unitless ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SP_from_SA.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) lat <- c( 4, 4, 4, 4, 4, 4) long <- c( 188, 188, 188, 188, 188, 188) SP <- gsw_SP_from_SA(SA,p,long,lat) stopifnot(all.equal(SP, c(34.548721553448317, 34.727477488096639, 34.860554877708005, 34.680971112271791, 34.567971663653388, 34.560036751118204)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) lat <- c( 4, 4, 4, 4, 4, 4) long <- c( 188, 188, 188, 188, 188, 188) SP <- gsw_SP_from_SA(SA,p,long,lat) stopifnot(all.equal(SP, c(34.548721553448317, 34.727477488096639, 34.860554877708005, 34.680971112271791, 34.567971663653388, 34.560036751118204)))
Calculate Practical Salinity from Knudsen Salinity
gsw_SP_from_SK(SK)
gsw_SP_from_SK(SK)
SK |
Knudsen Salinity [ parts per thousand, ppt ] |
Practical Salinity (PSS-78) [ unitless ]
http://www.teos-10.org/pubs/gsw/html/gsw_SP_from_SK.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
SK <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) SP <- gsw_SP_from_SK(SK) stopifnot(all.equal(SP, c(34.548342096952908, 34.727295637119113, 34.860409847645435, 34.680755706371187, 34.567658670360110, 34.559651800554022)))
SK <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) SP <- gsw_SP_from_SK(SK) stopifnot(all.equal(SP, c(34.548342096952908, 34.727295637119113, 34.860409847645435, 34.680755706371187, 34.567658670360110, 34.559651800554022)))
Calculate Practical Salinity from Reference Salinity
gsw_SP_from_SR(SR)
gsw_SP_from_SR(SR)
SR |
Reference Salinity [ g/kg ] |
Practical Salinity (PSS-78) [ unitless ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SP_from_SR.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
SR <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) SP <- gsw_SP_from_SR(SR) stopifnot(all.equal(SP, c(34.386552667080714, 34.564513505458834, 34.696889296869848, 34.518231743800094, 34.405762086435850, 34.397799632817147)))
SR <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) SP <- gsw_SP_from_SR(SR) stopifnot(all.equal(SP, c(34.386552667080714, 34.564513505458834, 34.696889296869848, 34.518231743800094, 34.405762086435850, 34.397799632817147)))
Practical Salinity from Preformed Salinity
gsw_SP_from_Sstar(Sstar, p, longitude, latitude)
gsw_SP_from_Sstar(Sstar, p, longitude, latitude)
Sstar |
Preformed Salinity [ g/kg ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
Practical Salinity (PSS-78) [ unitless ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SP_from_Sstar.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
Sstar <- c(34.7115, 34.8912, 35.0247, 34.8436, 34.7291, 34.7197) p <- c( 10, 50, 125, 250, 600, 1000) longitude <- 188 latitude <- 4 SP <- gsw_SP_from_Sstar(Sstar, p, longitude, latitude) stopifnot(all.equal(SP, c(34.548646570969929, 34.727538423586189, 34.860549501859502, 34.681006826476434, 34.568065697992346, 34.560023926979518)))
Sstar <- c(34.7115, 34.8912, 35.0247, 34.8436, 34.7291, 34.7197) p <- c( 10, 50, 125, 250, 600, 1000) longitude <- 188 latitude <- 4 SP <- gsw_SP_from_Sstar(Sstar, p, longitude, latitude) stopifnot(all.equal(SP, c(34.548646570969929, 34.727538423586189, 34.860549501859502, 34.681006826476434, 34.568065697992346, 34.560023926979518)))
Calculate Practical Salinity from salinometer readings of conductivity ratio and bath temperature.
gsw_SP_salinometer(ratio, temperature)
gsw_SP_salinometer(ratio, temperature)
ratio |
Conductivity ratio [ unitless ].
(This is called |
temperature |
Bath temperature [ degC ].
(This is called |
Practical salinity on the PSS-77 scale [ unitless ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SP_salinometer.html
ratio <- c( 0.9345, 0.95123, 0.91807, 0.8886, 0.8169, 0.6687) temperature <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) SP <- gsw_SP_salinometer(ratio, temperature) stopifnot(all.equal(SP, c(32.431728787558541, 33.085035719966307, 31.800791917322833, 30.692490757036179, 27.979281308696116, 22.474597460508491)))
ratio <- c( 0.9345, 0.95123, 0.91807, 0.8886, 0.8169, 0.6687) temperature <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) SP <- gsw_SP_salinometer(ratio, temperature) stopifnot(all.equal(SP, c(32.431728787558541, 33.085035719966307, 31.800791917322833, 30.692490757036179, 27.979281308696116, 22.474597460508491)))
Specific Volume of Seawater
gsw_specvol(SA, CT, p)
gsw_specvol(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Specific volume (1/density)
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_specvol.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) specvol <- gsw_specvol(SA, CT, p) stopifnot(all.equal(specvol*1e3, c(0.978626852431313, 0.978222365701325, 0.976155264597929, 0.972961258011157, 0.971026719344908, 0.968989944622149)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) specvol <- gsw_specvol(SA, CT, p) stopifnot(all.equal(specvol*1e3, c(0.978626852431313, 0.978222365701325, 0.976155264597929, 0.972961258011157, 0.971026719344908, 0.968989944622149)))
Specific Volume, alpha, and beta
gsw_specvol_alpha_beta(SA, CT, p)
gsw_specvol_alpha_beta(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
a list holding specvol
, the specific volume [ m^3/kg ], alpha
,
the thermal expansion coefficient [ 1/degC ], and beta
, the haline contraction
coefficient [ kg/g ].
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_specvol_alpha_beta.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_specvol_alpha_beta(SA, CT, p) stopifnot(all.equal(r$specvol/1e-3, c(0.978626852431313, 0.978222365701325, 0.976155264597929, 0.972961258011157, 0.971026719344908, 0.968989944622149))) stopifnot(all.equal(r$alpha/1e-3, c(0.324638934509245, 0.322655537959731, 0.281145723210171, 0.173199716344780, 0.146289673594824, 0.129414845334599))) stopifnot(all.equal(r$beta/1e-3, c(0.717483987596135, 0.717647512290095, 0.726211643644768, 0.750500751749777, 0.755052064788492, 0.757050813384370)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_specvol_alpha_beta(SA, CT, p) stopifnot(all.equal(r$specvol/1e-3, c(0.978626852431313, 0.978222365701325, 0.976155264597929, 0.972961258011157, 0.971026719344908, 0.968989944622149))) stopifnot(all.equal(r$alpha/1e-3, c(0.324638934509245, 0.322655537959731, 0.281145723210171, 0.173199716344780, 0.146289673594824, 0.129414845334599))) stopifnot(all.equal(r$beta/1e-3, c(0.717483987596135, 0.717647512290095, 0.726211643644768, 0.750500751749777, 0.755052064788492, 0.757050813384370)))
Note that the TEOS function named specific_volume_anomaly
is not
provided in the C library, so it is not provided in R, either.
gsw_specvol_anom_standard(SA, CT, p)
gsw_specvol_anom_standard(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Specific volume anomaly [ m^3/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_specvol_anom_standard.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_ice()
,
gsw_specvol_t_exact()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) a <- gsw_specvol_anom_standard(SA, CT, p) stopifnot(all.equal(a*1e5, c(0.601051894897400, 0.578609769250563, 0.405600538950092, 0.142190453761838, 0.104335535578967, 0.076383389577725)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) a <- gsw_specvol_anom_standard(SA, CT, p) stopifnot(all.equal(a*1e5, c(0.601051894897400, 0.578609769250563, 0.405600538950092, 0.142190453761838, 0.104335535578967, 0.076383389577725)))
First Derivatives of Specific Volume
gsw_specvol_first_derivatives(SA, CT, p)
gsw_specvol_first_derivatives(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing v_SA
[ (m^3/kg)/(g/kg) ], the derivative of
specific volume with respect to Absolute Salinity, v_CT
[ (m^3/kg)/degC],
the derivative of specific volume with respect to Conservative Temperature, and
v_p
[ (m^3/kg)/dbar ], the derivative of specific volume with respect
to pressure. (Note that the last quantity is denoted v_P
in the
documentation for the Matlab function.)
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_specvol_first_derivatives.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives_wrt_enthalpy()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_specvol_first_derivatives(SA, CT, p) stopifnot(all.equal(r$v_SA/1e-6, c(-0.702149096451073, -0.702018847212088, -0.708895319156155, -0.730208155560782, -0.733175729406169, -0.733574625737474))) stopifnot(all.equal(r$v_CT/1e-6, c(0.317700378655437, 0.315628863649601, 0.274441877830800, 0.168516613901993, 0.142051181824820, 0.125401683814057))) stopifnot(all.equal(r$v_p/1e-12, c(-0.402527990904794, -0.402146232553089, -0.406663124765787, -0.423877042622481, -0.426198431093548, -0.426390351853055)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_specvol_first_derivatives(SA, CT, p) stopifnot(all.equal(r$v_SA/1e-6, c(-0.702149096451073, -0.702018847212088, -0.708895319156155, -0.730208155560782, -0.733175729406169, -0.733574625737474))) stopifnot(all.equal(r$v_CT/1e-6, c(0.317700378655437, 0.315628863649601, 0.274441877830800, 0.168516613901993, 0.142051181824820, 0.125401683814057))) stopifnot(all.equal(r$v_p/1e-12, c(-0.402527990904794, -0.402146232553089, -0.406663124765787, -0.423877042622481, -0.426198431093548, -0.426390351853055)))
First Derivatives of Specific Volume wrt Enthalpy
gsw_specvol_first_derivatives_wrt_enthalpy(SA, CT, p)
gsw_specvol_first_derivatives_wrt_enthalpy(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing v_SA_wrt_h
[ (m^3/kg)/(g/kg) ] and v_h
.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_specvol_first_derivatives_wrt_enthalpy.html
Other things related to enthalpy:
gsw_CT_from_enthalpy()
,
gsw_dynamic_enthalpy()
,
gsw_enthalpy()
,
gsw_enthalpy_CT_exact()
,
gsw_enthalpy_diff()
,
gsw_enthalpy_first_derivatives()
,
gsw_enthalpy_first_derivatives_CT_exact()
,
gsw_enthalpy_ice()
,
gsw_enthalpy_t_exact()
,
gsw_frazil_properties_potential()
,
gsw_frazil_properties_potential_poly()
,
gsw_pot_enthalpy_from_pt_ice()
,
gsw_pot_enthalpy_from_pt_ice_poly()
,
gsw_pot_enthalpy_ice_freezing()
,
gsw_pot_enthalpy_ice_freezing_poly()
,
gsw_pt_from_pot_enthalpy_ice()
,
gsw_pt_from_pot_enthalpy_ice_poly()
,
gsw_specvol_first_derivatives()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_specvol_first_derivatives_wrt_enthalpy(SA, CT, p) stopifnot(all.equal(r$v_SA_wrt_h/1e-6, c(-0.702143511679586, -0.701991101310494, -0.708834353735310, -0.730130919555592, -0.733018321892082, -0.733342002723321))) stopifnot(all.equal(r$v_h/1e-10, c(0.795862623587769, 0.790648383268264, 0.687443468257647, 0.422105846942233, 0.355778874334799, 0.314053366403993)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_specvol_first_derivatives_wrt_enthalpy(SA, CT, p) stopifnot(all.equal(r$v_SA_wrt_h/1e-6, c(-0.702143511679586, -0.701991101310494, -0.708834353735310, -0.730130919555592, -0.733018321892082, -0.733342002723321))) stopifnot(all.equal(r$v_h/1e-10, c(0.795862623587769, 0.790648383268264, 0.687443468257647, 0.422105846942233, 0.355778874334799, 0.314053366403993)))
Specific Volume of Ice
gsw_specvol_ice(t, p)
gsw_specvol_ice(t, p)
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Specific volume [ m^3/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_specvol_ice.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_t_exact()
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) v <- gsw_specvol_ice(t, p) stopifnot(all.equal(v, c(0.001088982980677, 0.001088489459509, 0.001088499019939, 0.001088433747301, 0.001088223220685, 0.001088135464776)))
t <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) v <- gsw_specvol_ice(t, p) stopifnot(all.equal(v, c(0.001088982980677, 0.001088489459509, 0.001088499019939, 0.001088433747301, 0.001088223220685, 0.001088135464776)))
Second Derivatives of Specific Volume
gsw_specvol_second_derivatives(SA, CT, p)
gsw_specvol_second_derivatives(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing specvol_SA_SA
[ (m^3/kg)/(g/kg)^2 ], the second derivative of
specific volume with respect to Absolute Salinity,
specvol_SA_CT
[ (m^3/kg)/(g/kg)/degC ], the derivative of
specific volume with respect to Absolute Salinity and Conservative Temperature,
specvol_CT_CT
[ (m^3/kg)/degC^2 ], the second derivative of
specific volume with respect to Conservative Temperature,
specvol_SA_p
[ (m^3/kg)/(g/kg)/Pa ], the derivative of specific volume with respect to Absolute
Salinity and pressure, and specvol_CT_p
[ (m^3/kg)/K/dbar ], the derivative of specific
volume with respect to Conservative Temperature and pressure.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_specvol_second_derivatives.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_specvol_second_derivatives(SA, CT, p) stopifnot(all.equal(r$specvol_SA_SA/1e-8, c(0.080906777599140, 0.080915086639384, 0.084568844270812, 0.096725108896007, 0.099111765836648, 0.100302277946072))) stopifnot(all.equal(r$specvol_SA_CT/1e-8, c(0.129965332117084, 0.130523053162130, 0.149555815430615, 0.217023290441810, 0.233892039070486, 0.243659989480325))) stopifnot(all.equal(r$specvol_CT_CT/1e-7, c(0.071409582006642, 0.071582962051991, 0.077436153664104, 0.095329736274850, 0.100105336953738, 0.103044572835472))) stopifnot(all.equal(r$specvol_SA_p/1e-14, c(0.116889015000936, 0.116897424150385, 0.121500614193893, 0.136008673596132, 0.139023051292893, 0.140581903529772))) stopifnot(all.equal(r$specvol_CT_p/1e-14, c(0.085542828707964, 0.086723632576213, 0.112156562396990, 0.188269893599500, 0.211615556759369, 0.228609575049911)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_specvol_second_derivatives(SA, CT, p) stopifnot(all.equal(r$specvol_SA_SA/1e-8, c(0.080906777599140, 0.080915086639384, 0.084568844270812, 0.096725108896007, 0.099111765836648, 0.100302277946072))) stopifnot(all.equal(r$specvol_SA_CT/1e-8, c(0.129965332117084, 0.130523053162130, 0.149555815430615, 0.217023290441810, 0.233892039070486, 0.243659989480325))) stopifnot(all.equal(r$specvol_CT_CT/1e-7, c(0.071409582006642, 0.071582962051991, 0.077436153664104, 0.095329736274850, 0.100105336953738, 0.103044572835472))) stopifnot(all.equal(r$specvol_SA_p/1e-14, c(0.116889015000936, 0.116897424150385, 0.121500614193893, 0.136008673596132, 0.139023051292893, 0.140581903529772))) stopifnot(all.equal(r$specvol_CT_p/1e-14, c(0.085542828707964, 0.086723632576213, 0.112156562396990, 0.188269893599500, 0.211615556759369, 0.228609575049911)))
Second Derivatives of Specific Volume wrt Enthalpy
gsw_specvol_second_derivatives_wrt_enthalpy(SA, CT, p)
gsw_specvol_second_derivatives_wrt_enthalpy(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
A list containing specvol_SA_SA
[ (m^3/kg)/(g/kg)^2 ], the second derivative of
specific volume with respect to Absolute Salinity,
specvol_SA_h
[ (m^3/kg)/(g/kg)/(J/kg) ], the derivative of
specific volume with respect to Absolute Salinity and enthalpy,
and specvol_h_h
[ (m^3/kg)/(J/kg)^2 ], the second derivative of
specific volume with respect to enthalpy.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_specvol_second_derivatives_wrt_enthalpy.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_specvol_second_derivatives_wrt_enthalpy(SA, CT, p) stopifnot(all.equal(r$specvol_SA_SA/1e-8, c(0.080898741086877, 0.080931595349498, 0.084648485333225, 0.096952812049233, 0.099684475381589, 0.101288447077547))) stopifnot(all.equal(r$specvol_SA_h/1e-12, c(0.325437133570796, 0.327060462851431, 0.375273569184178, 0.545188833073084, 0.589424881889351, 0.616101548209175))) stopifnot(all.equal(r$specvol_h_h/1e-15, c(0.447949998681476, 0.449121446914278, 0.485998151346315, 0.598480711660961, 0.628708349875318, 0.647433212216398)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_specvol_second_derivatives_wrt_enthalpy(SA, CT, p) stopifnot(all.equal(r$specvol_SA_SA/1e-8, c(0.080898741086877, 0.080931595349498, 0.084648485333225, 0.096952812049233, 0.099684475381589, 0.101288447077547))) stopifnot(all.equal(r$specvol_SA_h/1e-12, c(0.325437133570796, 0.327060462851431, 0.375273569184178, 0.545188833073084, 0.589424881889351, 0.616101548209175))) stopifnot(all.equal(r$specvol_h_h/1e-15, c(0.447949998681476, 0.449121446914278, 0.485998151346315, 0.598480711660961, 0.628708349875318, 0.647433212216398)))
Specific Volume of Seawater
gsw_specvol_t_exact(SA, t, p)
gsw_specvol_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
Specific volume [ m^3/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_specvol_t_exact.html
Other things related to density:
gsw_CT_from_rho()
,
gsw_CT_maxdensity()
,
gsw_SA_from_rho()
,
gsw_alpha()
,
gsw_alpha_on_beta()
,
gsw_alpha_wrt_t_exact()
,
gsw_alpha_wrt_t_ice()
,
gsw_beta()
,
gsw_beta_const_t_exact()
,
gsw_infunnel()
,
gsw_pot_rho_t_exact()
,
gsw_rho()
,
gsw_rho_alpha_beta()
,
gsw_rho_first_derivatives()
,
gsw_rho_first_derivatives_wrt_enthalpy()
,
gsw_rho_ice()
,
gsw_rho_t_exact()
,
gsw_sigma0()
,
gsw_sigma1()
,
gsw_sigma2()
,
gsw_sigma3()
,
gsw_sigma4()
,
gsw_specvol()
,
gsw_specvol_alpha_beta()
,
gsw_specvol_anom_standard()
,
gsw_specvol_ice()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) v <- gsw_specvol_t_exact(SA, t, p) stopifnot(all.equal(v*1e3, c(0.978626625025472, 0.978222143734527, 0.976154768597586, 0.972961211575438, 0.971026779948624, 0.968989990731808)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) v <- gsw_specvol_t_exact(SA, t, p) stopifnot(all.equal(v*1e3, c(0.978626625025472, 0.978222143734527, 0.976154768597586, 0.972961211575438, 0.971026779948624, 0.968989990731808)))
Calculate seawater spiciness referenced to 0 dbar (i.e. the surface).
gsw_spiciness0(SA, CT)
gsw_spiciness0(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
spiciness [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_spiciness0.html
Other things related to spiciness:
gsw_spiciness1()
,
gsw_spiciness2()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) spiciness <- gsw_spiciness0(SA, CT) stopifnot(all.equal(spiciness, c(5.728998558542941, 5.749940496782486, 4.163547112671111, 1.069362556641764, 0.426428274444305, 0.089725188494086)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) spiciness <- gsw_spiciness0(SA, CT) stopifnot(all.equal(spiciness, c(5.728998558542941, 5.749940496782486, 4.163547112671111, 1.069362556641764, 0.426428274444305, 0.089725188494086)))
Calculate seawater spiciness referenced to 1000 dbar.
gsw_spiciness1(SA, CT)
gsw_spiciness1(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
spiciness [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_spiciness1.html
Other things related to spiciness:
gsw_spiciness0()
,
gsw_spiciness2()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) spiciness <- gsw_spiciness1(SA, CT) stopifnot(all.equal(spiciness, c(6.311038322123224, 6.326411175472160, 4.667218659743284, 1.351722468726905, 0.628494082166029, 0.224779784908478)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) spiciness <- gsw_spiciness1(SA, CT) stopifnot(all.equal(spiciness, c(6.311038322123224, 6.326411175472160, 4.667218659743284, 1.351722468726905, 0.628494082166029, 0.224779784908478)))
Calculate seawater spiciness referenced to 2000 dbar.
gsw_spiciness2(SA, CT)
gsw_spiciness2(SA, CT)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
spiciness [ kg/m^3 ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_spiciness2.html
Other things related to spiciness:
gsw_spiciness0()
,
gsw_spiciness1()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) spiciness <- gsw_spiciness2(SA, CT) stopifnot(all.equal(spiciness, c(6.874671751873180, 6.884616399155135, 5.154458892387083, 1.624327800598636, 0.823490797424952, 0.355069307641827)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) spiciness <- gsw_spiciness2(SA, CT) stopifnot(all.equal(spiciness, c(6.874671751873180, 6.884616399155135, 5.154458892387083, 1.624327800598636, 0.823490797424952, 0.355069307641827)))
Calculate Reference Salinity from Practical Salinity
gsw_SR_from_SP(SP)
gsw_SR_from_SP(SP)
SP |
Practical Salinity (PSS-78) [ unitless ]. The valid range for most 'gsw' functions is from 2 to 42. |
Reference Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_SR_from_SP.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_Sstar_from_SA()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
SP <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) SR <- gsw_SR_from_SP(SP) stopifnot(all.equal(SR, c(34.711611927085727, 34.891255045714303, 35.024882197714305, 34.844535778285724, 34.731002934857159, 34.722965211428587)))
SP <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) SR <- gsw_SR_from_SP(SP) stopifnot(all.equal(SR, c(34.711611927085727, 34.891255045714303, 35.024882197714305, 34.844535778285724, 34.731002934857159, 34.722965211428587)))
Calculate Preformed Salinity from Absolute Salinity, pressure, longitude, and latitude.
gsw_Sstar_from_SA(SA, p, longitude, latitude)
gsw_Sstar_from_SA(SA, p, longitude, latitude)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
If SA is a matrix and if its dimensions correspond to the
lengths of longitude and latitude, then the latter are
converted to analogous matrices with expand.grid
.
Preformed Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_Sstar_from_SA.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SP()
,
gsw_deltaSA_from_SP()
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) lat <- c( 4, 4, 4, 4, 4, 4) long <- c( 188, 188, 188, 188, 188, 188) Sstar <- gsw_Sstar_from_SA(SA,p,long,lat) stopifnot(all.equal(Sstar, c(34.711575335926490, 34.891138777337822, 35.024705401162166, 34.843564118358302, 34.729005527604883, 34.719712883389462)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) lat <- c( 4, 4, 4, 4, 4, 4) long <- c( 188, 188, 188, 188, 188, 188) Sstar <- gsw_Sstar_from_SA(SA,p,long,lat) stopifnot(all.equal(Sstar, c(34.711575335926490, 34.891138777337822, 35.024705401162166, 34.843564118358302, 34.729005527604883, 34.719712883389462)))
Calculate Preformed Salinity from Practical Salinity, pressure, longitude, and latitude.
gsw_Sstar_from_SP(SP, p, longitude, latitude)
gsw_Sstar_from_SP(SP, p, longitude, latitude)
SP |
Practical Salinity (PSS-78) [ unitless ]. The valid range for most 'gsw' functions is from 2 to 42. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
longitude |
longitude in decimal degrees, positive to the east of Greenwich. (This
is called |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
If SP is a matrix and if its dimensions correspond to the
lengths of longitude and latitude, then the latter are
converted to analogous matrices with expand.grid
.
Preformed Salinity [ g/kg ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_Sstar_from_SP.html
Other things related to salinity:
gsw_C_from_SP()
,
gsw_SA_from_SP()
,
gsw_SA_from_SP_Baltic()
,
gsw_SA_from_Sstar()
,
gsw_SP_from_C()
,
gsw_SP_from_SA()
,
gsw_SP_from_SK()
,
gsw_SP_from_SR()
,
gsw_SP_from_Sstar()
,
gsw_SR_from_SP()
,
gsw_Sstar_from_SA()
,
gsw_deltaSA_from_SP()
SP <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) p <- c( 10, 50, 125, 250, 600, 1000) lat <- c( 4, 4, 4, 4, 4, 4) long <- c( 188, 188, 188, 188, 188, 188) Sstar <- gsw_Sstar_from_SP(SP,p,long,lat) stopifnot(all.equal(Sstar, c(34.711553680880769, 34.891161395333754, 35.024650265047370, 34.843593141519356, 34.729033995955525, 34.719675962471783)))
SP <- c(34.5487, 34.7275, 34.8605, 34.6810, 34.5680, 34.5600) p <- c( 10, 50, 125, 250, 600, 1000) lat <- c( 4, 4, 4, 4, 4, 4) long <- c( 188, 188, 188, 188, 188, 188) Sstar <- gsw_Sstar_from_SP(SP,p,long,lat) stopifnot(all.equal(Sstar, c(34.711553680880769, 34.891161395333754, 35.024650265047370, 34.843593141519356, 34.729033995955525, 34.719675962471783)))
Derivative of Chemical Potential of Water in Seawater wrt Temperature
gsw_t_deriv_chem_potential_water_t_exact(SA, t, p)
gsw_t_deriv_chem_potential_water_t_exact(SA, t, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
t |
in-situ temperature (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
derivative [ J/(g*degC) ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_t_deriv_chem_potential_water_t_exact.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) d <- gsw_t_deriv_chem_potential_water_t_exact(SA, t, p) stopifnot(all.equal(d, c(-0.428798278908442, -0.423860344327343, -0.345277821010421, -0.164446485487145, -0.114228046736087, -0.076990819658255)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) t <- c( 28.7856, 28.4329, 22.8103, 10.2600, 6.8863, 4.4036) p <- c( 10, 50, 125, 250, 600, 1000) d <- gsw_t_deriv_chem_potential_water_t_exact(SA, t, p) stopifnot(all.equal(d, c(-0.428798278908442, -0.423860344327343, -0.345277821010421, -0.164446485487145, -0.114228046736087, -0.076990819658255)))
This uses the C function named gsw_t_freezing_exact
, because the
C function named gsw_t_freezing
does not produce check values that
match the Matlab function called gsw_t_freezing
(see references
for those test values).
gsw_t_freezing(SA, p, saturation_fraction = 1)
gsw_t_freezing(SA, p, saturation_fraction = 1)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
in-situ freezing temperature (ITS-90) [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_t_freezing.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 tf <- gsw_t_freezing(SA, p, saturation_fraction) stopifnot(all.equal(tf, c(-1.902730710149803, -1.942908619287183, -2.006861069199743, -2.090985086875259, -2.351293130342102, -2.660498762776720)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- 1 tf <- gsw_t_freezing(SA, p, saturation_fraction) stopifnot(all.equal(tf, c(-1.902730710149803, -1.942908619287183, -2.006861069199743, -2.090985086875259, -2.351293130342102, -2.660498762776720)))
Derivatives of Freezing Water Properties
gsw_t_freezing_first_derivatives(SA, p, saturation_fraction = 1)
gsw_t_freezing_first_derivatives(SA, p, saturation_fraction = 1)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
a list containing tfreezing_SA
[ K/(g/kg) ], the derivative of freezing
temperature with Absolute Salinity and
tfreezing_p
[ K/dbar ], the derivative with respect to pressure.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_t_freezing_first_derivatives.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- c( 1, 0.8, 0.6, 0.5, 0.4, 0) derivs <- gsw_t_freezing_first_derivatives(SA, p, saturation_fraction) stopifnot(all.equal(derivs$tfreezing_SA, c(-0.056811800705787, -0.056856999671114, -0.056903079789292, -0.056904020028541, -0.056974588411844, -0.057082363270642))) stopifnot(all.equal(derivs$tfreezing_p/1e-7, c(-0.748468312442338, -0.749793159537290, -0.752225023995510, -0.756170965034610, -0.767279572670040, -0.779936552091913)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- c( 1, 0.8, 0.6, 0.5, 0.4, 0) derivs <- gsw_t_freezing_first_derivatives(SA, p, saturation_fraction) stopifnot(all.equal(derivs$tfreezing_SA, c(-0.056811800705787, -0.056856999671114, -0.056903079789292, -0.056904020028541, -0.056974588411844, -0.057082363270642))) stopifnot(all.equal(derivs$tfreezing_p/1e-7, c(-0.748468312442338, -0.749793159537290, -0.752225023995510, -0.756170965034610, -0.767279572670040, -0.779936552091913)))
Derivatives of Freezing Water Properties (Polynomial version)
gsw_t_freezing_first_derivatives_poly(SA, p, saturation_fraction = 1)
gsw_t_freezing_first_derivatives_poly(SA, p, saturation_fraction = 1)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
saturation_fraction |
fraction of air in water [unitless] |
a list containing tfreezing_SA
[ K/(g/kg) ], the derivative of freezing
temperature with Absolute Salinity and
tfreezing_p
[ K/dbar ], the derivative with respect to pressure.
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_t_freezing_first_derivatives.html
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- c( 1, 0.8, 0.6, 0.5, 0.4, 0) derivs <- gsw_t_freezing_first_derivatives_poly(SA, p, saturation_fraction) stopifnot(all.equal(derivs$tfreezing_SA, c(-0.056810211094078, -0.056855567524973, -0.056901968693345, -0.056903498206432, -0.056975157476629, -0.057083526206200))) stopifnot(all.equal(derivs$tfreezing_p/1e-7, c(-0.748987354878138, -0.750288853857513, -0.752676389629787, -0.756549680608529, -0.767482625710990, -0.779985619685683)))
SA <- c( 34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) p <- c( 10, 50, 125, 250, 600, 1000) saturation_fraction <- c( 1, 0.8, 0.6, 0.5, 0.4, 0) derivs <- gsw_t_freezing_first_derivatives_poly(SA, p, saturation_fraction) stopifnot(all.equal(derivs$tfreezing_SA, c(-0.056810211094078, -0.056855567524973, -0.056901968693345, -0.056903498206432, -0.056975157476629, -0.057083526206200))) stopifnot(all.equal(derivs$tfreezing_p/1e-7, c(-0.748987354878138, -0.750288853857513, -0.752676389629787, -0.756549680608529, -0.767482625710990, -0.779985619685683)))
In situ temperature from Conservative Temperature
gsw_t_from_CT(SA, CT, p)
gsw_t_from_CT(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
in-situ temperature (ITS-90) [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_t_from_CT.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) t <- gsw_t_from_CT(SA, CT, p) stopifnot(all.equal(t, c(28.785580227725703, 28.432872246163946, 22.810323087627076, 10.260010752788906, 6.886286301029376, 4.403624452383043)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) t <- gsw_t_from_CT(SA, CT, p) stopifnot(all.equal(t, c(28.785580227725703, 28.432872246163946, 22.810323087627076, 10.260010752788906, 6.886286301029376, 4.403624452383043)))
In situ Temperature from Potential Temperature at 0dbar
gsw_t_from_pt0_ice(pt0_ice, p)
gsw_t_from_pt0_ice(pt0_ice, p)
pt0_ice |
potential temperature of ice (ITS-90) [ degC ] |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
in-situ temperature (ITS-90) [ degC ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_t_from_pt0_ice.html
pt0_ice <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) t <- gsw_t_from_pt0_ice(pt0_ice, p) stopifnot(all.equal(t, c(-10.783412084414074, -13.422068638139141, -12.783170223330448, -12.205667526492039, -10.755496924674144, -8.184121042593350)))
pt0_ice <- c(-10.7856, -13.4329, -12.8103, -12.2600, -10.8863, -8.4036) p <- c( 10, 50, 125, 250, 600, 1000) t <- gsw_t_from_pt0_ice(pt0_ice, p) stopifnot(all.equal(t, c(-10.783412084414074, -13.422068638139141, -12.783170223330448, -12.205667526492039, -10.755496924674144, -8.184121042593350)))
Thermobaric coefficient (75-term equation)
gsw_thermobaric(SA, CT, p)
gsw_thermobaric(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
thermobaric coefficient wrt Conservative Temperature [ 1/(K Pa) ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_thermobaric.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) tb <- gsw_thermobaric(SA, CT, p) stopifnot(all.equal(tb*1e11, c(0.141342632944971, 0.142352284525832, 0.163216280125501, 0.226030772122855, 0.246185239871747, 0.261474794884197)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) tb <- gsw_thermobaric(SA, CT, p) stopifnot(all.equal(tb*1e11, c(0.141342632944971, 0.142352284525832, 0.163216280125501, 0.226030772122855, 0.246185239871747, 0.261474794884197)))
This uses the 75-term density equation. The values of Turner Angle
Tu and density ratio Rrho are calculated at mid-point pressures, p_mid
.
gsw_Turner_Rsubrho(SA, CT, p)
gsw_Turner_Rsubrho(SA, CT, p)
SA |
Absolute Salinity [ g/kg ]. The valid range for most 'gsw' functions is 0 to 42 g/kg. |
CT |
Conservative Temperature [ degC ]. |
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
List containing Tu
[ degrees ], Rsubrho
[ unitless ], and p_mid
[ dbar ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
http://www.teos-10.org/pubs/gsw/html/gsw_Turner_Rsubrho.html
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_Turner_Rsubrho(SA, CT, p) stopifnot(all.equal(r$Tu, c(-2.063858905281147, 41.758435216784427, 47.606966981687535, 53.710351151706369, 45.527063858211527))) stopifnot(all.equal(r$Rsubrho, 100*c(-0.009304335069039, -0.176564834348709, 0.219627771740757, 0.065271424662002, 1.087044054679743))) stopifnot(all.equal(r$p_mid, 100*c(0.300, 0.875, 1.875, 4.250, 8.000)))
SA <- c(34.7118, 34.8915, 35.0256, 34.8472, 34.7366, 34.7324) CT <- c(28.8099, 28.4392, 22.7862, 10.2262, 6.8272, 4.3236) p <- c( 10, 50, 125, 250, 600, 1000) r <- gsw_Turner_Rsubrho(SA, CT, p) stopifnot(all.equal(r$Tu, c(-2.063858905281147, 41.758435216784427, 47.606966981687535, 53.710351151706369, 45.527063858211527))) stopifnot(all.equal(r$Rsubrho, 100*c(-0.009304335069039, -0.176564834348709, 0.219627771740757, 0.065271424662002, 1.087044054679743))) stopifnot(all.equal(r$p_mid, 100*c(0.300, 0.875, 1.875, 4.250, 8.000)))
Computation of height (above sea level) from pressure, using the 75-term equation for specific volume.
gsw_z_from_p(p, latitude, geo_strf_dyn_height, sea_surface_geopotential)
gsw_z_from_p(p, latitude, geo_strf_dyn_height, sea_surface_geopotential)
p |
sea pressure [dbar], i.e. absolute pressure [dbar] minus 10.1325 dbar |
latitude |
latitude in decimal degrees, positive to the north of the equator. (This
is called |
geo_strf_dyn_height |
vector of same length as |
sea_surface_geopotential |
vector of same length as |
height [ m ]
This R function uses a wrapper to a C function contained within the GSW-C system as updated 2022-10-11 at https://github.com/TEOS-10/GSW-C with git commit '657216dd4f5ea079b5f0e021a4163e2d26893371'.
The C function uses data from the library/gsw_data_v3_0.mat
file provided in the GSW-Matlab source code, version 3.06-11.
Unfortunately, this version of the mat file is no longer displayed on the
TEOS-10.org website. Therefore, in the interests of making GSW-R be
self-contained, a copy was downloaded from
http://www.teos-10.org/software/gsw_matlab_v3_06_11.zip on 2022-05-25,
the .mat file was stored in the developer/create_data directory of
https://github.com/TEOS-10/GSW-R, and then the dataset used in GSW-R
was created based on that .mat file.
Please consult http://www.teos-10.org to learn more about the various TEOS-10 software systems.
The geo_strf_dyn_height
and sea_surface_geopotential
parameters were added in GSW-R version 1.0-6.
http://www.teos-10.org/pubs/gsw/html/gsw_z_from_p.html
Other things related to depth:
gsw_p_from_z()
z <- gsw_z_from_p(c(10, 50, 125, 250, 600,1000), 4) stopifnot(all.equal(z/1e2, c(-0.099445834469453, -0.497180897012550, -1.242726219409978, -2.484700576548589, -5.958253480356214, -9.920919060719987)))
z <- gsw_z_from_p(c(10, 50, 125, 250, 600,1000), 4) stopifnot(all.equal(z/1e2, c(-0.099445834469453, -0.497180897012550, -1.242726219409978, -2.484700576548589, -5.958253480356214, -9.920919060719987)))
This dataset is not intended for users, but rather for internal use
within the gsw
package. The dataset stores the 1.4M lookup
table defined in the 8.3M file src/gsw_saar_data.c
in the C
library. (The .c file exceeds CRAN limitations on size.)
The data are designed to replace C elements defined as below
in src/gsw_saar_data.c
:
static int gsw_nx=91, gsw_ny=45, gsw_nz=45; static double longs_ref[91]; static double lats_ref[45]; static double p_ref[45]; static double ndepth_ref[4095]; static double saar_ref[184275]; static double delta_sa_ref[184275];
R storage is in a list named saar
, with elements named
as in the C code, i.e. gsw_nx
etc.
C storage for these variables is allocated as needed,
and the data are inserted, when gsw
is launched.
Thus, the existing C library code "knows" about the data
as local storage, which keeps alterations to the C library to
a minimum.
The saar
dataset was created by the following R code. The
netcdf file used in this code comes from the GSW-Fortran
repository (at commit baa0c09ffc7ed1f74972a1a2902d8754caa5b4cb
)
and its md5 value is dacb3f981e8e710ac2e83477701b3905
.
library(ncdf4) nc <- nc_open("~/git/GSW-Fortran/test/gsw_data_v3_0.nc") ## Use as.vector() since these will all get handed into C, which does not understand matrices. p_ref <- as.vector(ncvar_get(nc, "p_ref")) lats_ref <- as.vector(ncvar_get(nc, "lats_ref")) longs_ref <- as.vector(ncvar_get(nc, "longs_ref")) ndepth_ref <- as.vector(ncvar_get(nc, "ndepth_ref")) ndepth_ref[!is.finite(ndepth_ref)] <- -9e99 saar_ref <- as.vector(ncvar_get(nc, "SAAR_ref")) saar_ref[!is.finite(saar_ref)] <- -9e99 delta_sa_ref <- as.vector(ncvar_get(nc, "deltaSA_ref")) delta_sa_ref[!is.finite(delta_sa_ref)] <- -9e99 saar <- list(gsw_nx=gsw_nx, gsw_ny=gsw_ny, gsw_nz=gsw_nz, longs_ref=longs_ref, lats_ref=lats_ref, p_ref=p_ref, ndepth_ref=ndepth_ref, saar_ref=saar_ref, delta_sa_ref=delta_sa_ref) save(saar, file="saar.rda") tools::resaveRdaFiles("saar.rda") nc_close(nc)