Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add gsw_t_from_pt0(SA,pt0,p) #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions gsw_oceanographic_toolbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -10866,6 +10866,30 @@ gsw_t_from_ct(double sa, double ct, double p)
pt0 = gsw_pt_from_ct(sa,ct);
return (gsw_pt_from_t(sa,pt0,p0,p));
}

/*
! =========================================================================
elemental function gsw_t_from_pt0 (sa, pt0, p)
! =========================================================================
!
! Calculates in-situ temperature from potential temperature
! with reference pressure, p_ref, of 0 dbar (the surface), and the
! in-situ pressure.
!
! pt0 = potential temperature with reference pressure of
! zero dbar (ITS-90) [ deg C ]
! p = sea pressure [ dbar ]
! ( i.e. absolute pressure - 10.1325 dbar )
!--------------------------------------------------------------------------
*/
double
gsw_t_from_pt0(double sa, double pt0, double p)
{
double p0 = 0.0;

return (gsw_pt_from_t(sa,pt0,p0,p));
}

/*
! =========================================================================
elemental function gsw_t_from_pt0_ice (pt0_ice, p)
Expand Down