Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ repos:
- id: check-added-large-files
# Code formatting with black
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.12.0
rev: 26.1.0
hooks:
- id: black
1 change: 0 additions & 1 deletion I_ForcingFiles/Atmos/make_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from pathlib import Path
import re


NBVIEWER = "https://nbviewer.org/github"
GITHUB_ORG = "SalishSeaCast"
REPO_NAME = "tools"
Expand Down
1 change: 0 additions & 1 deletion I_ForcingFiles/Atmos/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
observations from the Salish Sea Model.
"""


import datetime
import netCDF4 as NC
import numpy as np
Expand Down
5 changes: 1 addition & 4 deletions I_ForcingFiles/Initial/make_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import os
import re


nbviewer = "https://nbviewer.org/urls"
repo = "github.com/SalishSeaCast/tools/blob/main"
repo_dir = "I_ForcingFiles/Initial"
Expand Down Expand Up @@ -66,9 +65,7 @@
They are licensed under the Apache License, Version 2.0.
https://www.apache.org/licenses/LICENSE-2.0
Please see the LICENSE file for details of the license.
""".format(
this_year=datetime.date.today().year
)
""".format(this_year=datetime.date.today().year)
with open("README.md", "wt") as f:
f.writelines(readme)
f.writelines(license)
5 changes: 1 addition & 4 deletions I_ForcingFiles/LookAtOthersFiles/make_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import os
import re


nbviewer = "https://nbviewer.org/urls"
repo = "github.com/SalishSeaCast/tools/blob/main"
repo_dir = "I_ForcingFiles/LookAtOthersFiles"
Expand Down Expand Up @@ -65,9 +64,7 @@
They are licensed under the Apache License, Version 2.0.
https://www.apache.org/licenses/LICENSE-2.0
Please see the LICENSE file for details of the license.
""".format(
this_year=datetime.date.today().year
)
""".format(this_year=datetime.date.today().year)
with open("README.md", "wt") as f:
f.writelines(readme)
f.writelines(license)
5 changes: 1 addition & 4 deletions I_ForcingFiles/OBC/make_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import os
import re


nbviewer = "https://nbviewer.org/urls"
repo = "github.com/SalishSeaCast/tools/blob/main"
repo_dir = "I_ForcingFiles/OBC"
Expand Down Expand Up @@ -69,9 +68,7 @@
They are licensed under the Apache License, Version 2.0.
https://www.apache.org/licenses/LICENSE-2.0
Please see the LICENSE file for details of the license.
""".format(
this_year=datetime.date.today().year
)
""".format(this_year=datetime.date.today().year)
with open("README.md", "wt") as f:
f.writelines(readme)
f.writelines(license)
5 changes: 1 addition & 4 deletions I_ForcingFiles/Rivers/make_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import os
import re


nbviewer = "https://nbviewer.org/urls"
repo = "github.com/SalishSeaCast/tools/blob/main"
repo_dir = "I_ForcingFiles/Rivers"
Expand Down Expand Up @@ -65,9 +64,7 @@
They are licensed under the Apache License, Version 2.0.
https://www.apache.org/licenses/LICENSE-2.0
Please see the LICENSE file for details of the license.
""".format(
this_year=datetime.date.today().year
)
""".format(this_year=datetime.date.today().year)
with open("README.md", "wt") as f:
f.writelines(readme)
f.writelines(license)
5 changes: 1 addition & 4 deletions I_ForcingFiles/Tides/make_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import os
import re


nbviewer = "https://nbviewer.org/urls"
repo = "github.com/SalishSeaCast/tools/blob/main"
repo_dir = "I_ForcingFiles/Tides"
Expand Down Expand Up @@ -65,9 +64,7 @@
They are licensed under the Apache License, Version 2.0.
https://www.apache.org/licenses/LICENSE-2.0
Please see the LICENSE file for details of the license.
""".format(
this_year=datetime.date.today().year
)
""".format(this_year=datetime.date.today().year)
with open("README.md", "wt") as f:
f.writelines(readme)
f.writelines(license)
5 changes: 1 addition & 4 deletions SalishSeaTools/notebooks/visualisations/make_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import os
import re


nbviewer = "https://nbviewer.org/urls"
repo = "github.com/SalishSeaCast/tools/blob/main"
repo_dir = "SalishSeaTools/notebooks/visualisations"
Expand Down Expand Up @@ -69,9 +68,7 @@
They are licensed under the Apache License, Version 2.0.
https://www.apache.org/licenses/LICENSE-2.0
Please see the LICENSE file for details of the license.
""".format(
this_year=datetime.date.today().year
)
""".format(this_year=datetime.date.today().year)
with open("README.md", "wt") as f:
f.writelines(readme)
f.writelines(license)
1 change: 0 additions & 1 deletion SalishSeaTools/salishsea_tools/bathy_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
netCDF bathymetry files.
"""


from matplotlib.colors import BoundaryNorm
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
Expand Down
1 change: 1 addition & 0 deletions SalishSeaTools/salishsea_tools/bio_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

"""Functions for working with geographical data and model results."""

import numpy as np
import f90nml
import os
Expand Down
1 change: 1 addition & 0 deletions SalishSeaTools/salishsea_tools/data_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

"""Functions for loading and processing observational data"""

import datetime as dtm
import ftplib
import functools
Expand Down
1 change: 0 additions & 1 deletion SalishSeaTools/salishsea_tools/diagnosis_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import netCDF4 as nc
from salishsea_tools import nc_tools


__all__ = ["pcourantu", "pcourantv", "pcourantw"]


Expand Down
2 changes: 1 addition & 1 deletion SalishSeaTools/salishsea_tools/evaltools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2734,7 +2734,7 @@ def load_ONC_node_ERDDAP(datelims):
},
inplace=True,
)
(obs_pd["j"], obs_pd["i"]) = places.PLACES[node]["NEMO grid ji"]
obs_pd["j"], obs_pd["i"] = places.PLACES[node]["NEMO grid ji"]
obs_pd["k"] = places.PLACES[node]["NEMO grid k"]

obs_tot.append(obs_pd)
Expand Down
1 change: 1 addition & 0 deletions SalishSeaTools/salishsea_tools/geo_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

"""Functions for working with geographical data and model results."""

import numpy as np
import xarray as xr

Expand Down
1 change: 0 additions & 1 deletion SalishSeaTools/salishsea_tools/gsw_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import numpy as np


logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())

Expand Down
2 changes: 0 additions & 2 deletions SalishSeaTools/salishsea_tools/hg_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
and modules developed for the SalishSeaCast project.
"""


import subprocess


__all__ = [
"commit",
"default_url",
Expand Down
1 change: 0 additions & 1 deletion SalishSeaTools/salishsea_tools/nc_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
netCDF file
"""


from collections import namedtuple, OrderedDict
from datetime import datetime, timedelta
from resource import getrlimit, RLIMIT_NOFILE
Expand Down
2 changes: 1 addition & 1 deletion SalishSeaTools/salishsea_tools/onc_sog_adcps.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# limitations under the License.

"""Ocean Networks Canada Strait of Georgia ADCPs Metadata."""

from collections import namedtuple

import arrow


adcp = namedtuple("ADCP", "device_id, sensor_id")
adcps = {
# Keys are instrument serial numbers
Expand Down
1 change: 0 additions & 1 deletion SalishSeaTools/salishsea_tools/places.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
'salishsea_tools.places.PLACES: {}'.format(e))
"""


#: Information about geographic places used in the analysis and
#: presentation of Salish Sea NEMO model results.
PLACES = {
Expand Down
1 change: 1 addition & 0 deletions SalishSeaTools/salishsea_tools/river_sss150.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

For sss150 Grid and Bathymetry
"""

prop_dict = {}

# Note that sum is slightly less than 1 as three rivers in the Howe Sound watershed do not enter SSS150
Expand Down
1 change: 1 addition & 0 deletions SalishSeaTools/salishsea_tools/rivertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""A collections of functions for working with river flow forcing data
for the SalishSeaCast NEMO model.
"""

import netCDF4 as NC
import numpy as np

Expand Down
1 change: 0 additions & 1 deletion SalishSeaTools/salishsea_tools/stormtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

"""A collection of tools for storm surge results from the Salish Sea Model."""


import csv
import datetime
from io import BytesIO
Expand Down
2 changes: 0 additions & 2 deletions SalishSeaTools/salishsea_tools/teos_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
See https://www.teos-10.org/.
"""


import numpy as np


#: Conversion factor from practical salinity units (psu)
#: to TEOS-10 reference salinity
PSU_TEOS = 35.16504 / 35 # g/kg
Expand Down
1 change: 0 additions & 1 deletion SalishSeaTools/salishsea_tools/tidetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Salish Sea NEMO model
"""


import cmath
import collections
import csv
Expand Down
2 changes: 0 additions & 2 deletions SalishSeaTools/salishsea_tools/unit_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

"""Salish Sea NEMO model unit conversion functions and constants."""


import numpy as np

# For convenience we import the TEOS-10 salinity conversion factors
Expand All @@ -28,7 +27,6 @@
teos_psu,
)


__all__ = [
"PSU_TEOS",
"TEOS_PSU",
Expand Down
1 change: 1 addition & 0 deletions SalishSeaTools/salishsea_tools/visualisations.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

"""Functions for common model visualisations"""

import datetime

import matplotlib.pyplot as plt
Expand Down
1 change: 0 additions & 1 deletion SalishSeaTools/salishsea_tools/viz_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
plotting and visualization.
"""


import netCDF4 as nc
import numpy as np
from salishsea_tools import geo_tools
Expand Down
2 changes: 0 additions & 2 deletions SalishSeaTools/salishsea_tools/wind_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
data.
"""


from collections import namedtuple
from pathlib import Path
from datetime import datetime
Expand All @@ -40,7 +39,6 @@
bearing_heading,
)


__all__ = [
"calc_wind_avg_at_point",
"M_PER_S__KM_PER_HR",
Expand Down
1 change: 1 addition & 0 deletions SalishSeaTools/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

"""Pytest fixtures for the salishsea_tools package."""

import os

import netCDF4 as nc
Expand Down
1 change: 0 additions & 1 deletion SalishSeaTools/tests/test_bathy_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

"""Unit tests for bathy_tools."""


import os
import netCDF4 as nc
import numpy as np
Expand Down
Loading
Loading