@@ -839,8 +839,8 @@ def num_levels(self):
839839 @property
840840 def num_layers (self ):
841841 return len (self .s_rho )
842-
843- def get_s_coord (self , points , time , data_shape = None , _hash = None , ** kwargs ):
842+
843+ def get_s_coordinate (self , points , time , data_shape = None , _hash = None , ** kwargs ):
844844 """
845845 :param points: array of points to interpolate to
846846 :type points: numpy array of shape (n, 3)
@@ -860,8 +860,8 @@ def get_s_coord(self, points, time, data_shape=None, _hash=None, **kwargs):
860860
861861 s_c = self .s_rho if data_shape [0 ] == self .num_layers else self .s_w
862862 C_s = self .Cs_r if data_shape [0 ] == self .num_layers else self .Cs_w
863- h = self .bathymetry .at (points , time , unmask = False , _hash = _hash , ** kwargs )
864- zeta = self .zeta .at (points , time , unmask = False , _hash = _hash , ** kwargs )
863+ h = self .bathymetry .at (points , time , _hash = _hash , ** kwargs )
864+ zeta = self .zeta .at (points , time , _hash = _hash , ** kwargs )
865865 hc = self .hc
866866 hCs = h * C_s [np .newaxis , :]
867867 if self .vtransform == 1 :
@@ -871,6 +871,10 @@ def get_s_coord(self, points, time, data_shape=None, _hash=None, **kwargs):
871871 S = ((hc * s_c ) + hCs ) / (hc + h )
872872 s_coord = - (zeta + (zeta + h ) * S )
873873 return s_coord
874+
875+ def get_transect (self , points , time , data_shape = None , _hash = None , ** kwargs ):
876+ zeta = self .zeta .at (points , time , _hash = _hash , ** kwargs )
877+ return self .get_s_coordinate (points , time , data_shape = data_shape , _hash = _hash , ** kwargs ) + zeta
874878
875879
876880class FVCOM_Depth (S_Depth ):
0 commit comments