From 2ad1b19207cc0da65680a7f2b5cde7527f9ef948 Mon Sep 17 00:00:00 2001 From: Romain Caneill Date: Tue, 8 Mar 2022 09:35:41 +0100 Subject: [PATCH 1/4] Correct Nsquarred unit --- gsw/stability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsw/stability.py b/gsw/stability.py index 76189a2..8436542 100644 --- a/gsw/stability.py +++ b/gsw/stability.py @@ -47,7 +47,7 @@ def Nsquared(SA, CT, p, lat=None, axis=0): Returns ------- N2 : array - Buoyancy frequency-squared at pressure midpoints, 1/s. + Buoyancy frequency-squared at pressure midpoints, 1/s^2. The shape along the pressure axis dimension is one less than that of the inputs. p_mid : array From 6c1c63ceabe795e21b76dca7628f6b35d5b0e06d Mon Sep 17 00:00:00 2001 From: Romain Caneill Date: Thu, 19 May 2022 09:35:04 +0200 Subject: [PATCH 2/4] Update N2 unit, copying from matlab doc --- gsw/stability.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gsw/stability.py b/gsw/stability.py index 8436542..f777d57 100644 --- a/gsw/stability.py +++ b/gsw/stability.py @@ -47,9 +47,12 @@ def Nsquared(SA, CT, p, lat=None, axis=0): Returns ------- N2 : array - Buoyancy frequency-squared at pressure midpoints, 1/s^2. + Buoyancy frequency-squared at pressure midpoints, rad^2/s^2. The shape along the pressure axis dimension is one less than that of the inputs. + The units of N2 are radians2 s-2 however in may textbooks this is + abreviated to s-2 as radians does not have a unit. To convert the + frequency to hertz, cycles sec-1, divide the frequency by 2π, ie N/(2π). p_mid : array Pressure at midpoints of p, dbar. The array shape matches N2. From 802b6e4126ee4a970745465b418f1f3f23456dca Mon Sep 17 00:00:00 2001 From: Romain Caneill Date: Thu, 19 May 2022 09:38:24 +0200 Subject: [PATCH 3/4] correct typo --- gsw/stability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsw/stability.py b/gsw/stability.py index f777d57..de5c5a4 100644 --- a/gsw/stability.py +++ b/gsw/stability.py @@ -51,7 +51,7 @@ def Nsquared(SA, CT, p, lat=None, axis=0): The shape along the pressure axis dimension is one less than that of the inputs. The units of N2 are radians2 s-2 however in may textbooks this is - abreviated to s-2 as radians does not have a unit. To convert the + abbreviated to s-2 as radians does not have a unit. To convert the frequency to hertz, cycles sec-1, divide the frequency by 2π, ie N/(2π). p_mid : array Pressure at midpoints of p, dbar. From 802a0ca711bc2b28c298699d0e8c1e1d1dc5b070 Mon Sep 17 00:00:00 2001 From: Romain Caneill Date: Fri, 20 May 2022 10:04:32 +0200 Subject: [PATCH 4/4] Shorten docstring --- gsw/stability.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gsw/stability.py b/gsw/stability.py index de5c5a4..c4acbb0 100644 --- a/gsw/stability.py +++ b/gsw/stability.py @@ -47,12 +47,10 @@ def Nsquared(SA, CT, p, lat=None, axis=0): Returns ------- N2 : array - Buoyancy frequency-squared at pressure midpoints, rad^2/s^2. + Buoyancy frequency-squared at pressure midpoints, 1/s^2. The shape along the pressure axis dimension is one less than that of the inputs. - The units of N2 are radians2 s-2 however in may textbooks this is - abbreviated to s-2 as radians does not have a unit. To convert the - frequency to hertz, cycles sec-1, divide the frequency by 2π, ie N/(2π). + (Frequency N is in radians per second.) p_mid : array Pressure at midpoints of p, dbar. The array shape matches N2.