Skip to content

Commit abce99f

Browse files
NeoKishhaileyajohnson
authored andcommitted
Fixed trailing whitespaces and blank lines
1 parent ae14352 commit abce99f

2 files changed

Lines changed: 16 additions & 22 deletions

File tree

cdippy/cdipnc.py

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ def __init__(self, data_dir: str = None, deployment: int = None):
110110
or a URL to a THREDDS server. Examples: '/project/WNC' or THREDDS URL.
111111
deployment (int, optional): Station deployment number (>=1) to access specific data.
112112
"""
113-
114113
self.nc = None
115114
self.data_dir = data_dir
116115
self.deployment = deployment
@@ -472,7 +471,7 @@ def get_var(self, var_name: str):
472471
473472
Returns:
474473
netCDF4.Variable or None: Variable object or None.
475-
"""
474+
"""
476475
if self.nc is None or var_name not in self.nc.variables:
477476
return None
478477
return self.nc.variables[var_name]
@@ -544,41 +543,38 @@ def set_dataset_info(
544543
which can be an actual path to the nc file or a URL to a THREDDS DODS service.
545544
546545
Args:
547-
stn (str): Station identifier. Can be in 3-char (e.g., "028") or
548-
5-char (e.g., "028p2") format for org="cdip".
546+
stn (str): Station identifier. Can be in 3-char (e.g., "028") or 5-char (e.g., "028p2") format for org="cdip".
549547
org (str): Organization. Values are "cdip", "ww3", or "external".
550-
dataset_name (str): Dataset name. Values include:
551-
"realtime", "historic", "archive", "realtimexy", "archivexy",
552-
"predeploy", "moored", "offsite", "recovered".
553-
deployment (int, optional): Supply this to access specific station deployment data.
554-
Must be >= 1.
548+
dataset_name (str): Dataset name. Values include: "realtime", "historic", "archive", "realtimexy", "archivexy",
549+
"predeploy", "moored", "offsite", "recovered".
550+
deployment (int, optional): Supply this to access specific station deployment data. Must be >= 1.
555551
556552
Notes:
557553
Paths:
558-
- <top_dir>/EXTERNAL/WW3/<filename>
554+
- <top_dir>/EXTERNAL/WW3/<filename>
559555
[filename = <stn>_<org_dir>_<dataset_name>.nc] (CDIP station like 192w3)
560-
- <top_dir>/REALTIME/<filename>
556+
- <top_dir>/REALTIME/<filename>
561557
[filename = <stn><p1>_rt.nc]
562-
- <top_dir>/REALTIME/<filename>
558+
- <top_dir>/REALTIME/<filename>
563559
[filename = <stn><p1>_xy.nc]
564-
- <top_dir>/ARCHIVE/<stn>/<filename>
560+
- <top_dir>/ARCHIVE/<stn>/<filename>
565561
[filename = <stn3><p1>_<deployment>.nc]
566-
- <top_dir>/PREDEPLOY/<stn>/<filename>
562+
- <top_dir>/PREDEPLOY/<stn>/<filename>
567563
[filename = <stn3><pX>_<deployment>_rt.nc]
568-
- <top_dir>/PREDEPLOY/<stn>/<filename>
564+
- <top_dir>/PREDEPLOY/<stn>/<filename>
569565
[filename = <stn3><pX>_<deployment>_xy.nc]
570566
571-
Active deployment directories are PREDEPLOY (p0), MOORED (p1), OFFSITE (p2), and RECOVERED (p3).
567+
Active deployment directories are PREDEPLOY (p0), MOORED (p1), OFFSITE (p2), and RECOVERED (p3).
572568
Here, pX = p0|p1|p2|p3; deployment = dXX (e.g., d01).
573569
574570
URLs:
575-
- http://thredds.cdip.ucsd/thredds/dodsC/<org1>/<org_dir>/<filename>
571+
- http://thredds.cdip.ucsd/thredds/dodsC/<org1>/<org_dir>/<filename>
576572
[org1 = external|cdip, org_dir = WW3|OWI etc]
577573
- http://thredds.cdip.ucsd/thredds/dodsC/<org1>/<dataset_name>/<filename>
578574
579575
Note:
580-
Since adding `dataset_name`, we no longer need the 5-char station ID
581-
for org="cdip" datasets. The `p_val` will be "p1" for every dataset except
576+
Since adding `dataset_name`, we no longer need the 5-char station ID
577+
for org="cdip" datasets. The `p_val` will be "p1" for every dataset except
582578
active datasets in buoy states: predeploy (p0), offsite (p2), and recovered (p3).
583579
"""
584580
ext = ".nc"
@@ -668,7 +664,6 @@ def __init__(self, data_dir: str = None):
668664
Args:
669665
data_dir (str, optional): Local path or THREDDS URL.
670666
"""
671-
672667
CDIPnc.__init__(self, data_dir)
673668
self.labels = [] # - Holds stn labels, e.g. '100p1' for this instance
674669
# Set latest timespan (Latest_3day goes up to 30 minutes beyond now)
@@ -705,7 +700,7 @@ def metaSiteLabels(self) -> list:
705700
706701
Returns:
707702
list: Site labels.
708-
"""
703+
"""
709704
if self.nc is None:
710705
return None
711706
for label_arr in self.nc.variables["metaSiteLabel"]:

cdippy/stndata.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ def get_series(
255255
Returns:
256256
dict: Dictionary of requested variable arrays.
257257
"""
258-
259258
if vrs is None:
260259
vrs = self.parameter_vars
261260
prefix = self.get_var_prefix(vrs[0])

0 commit comments

Comments
 (0)