Skip to content

Commit 6d0f100

Browse files
authored
Merge pull request #181 from NREL/gb/bias_nc
Gb/bias nc
2 parents 62c3c44 + 90e44b6 commit 6d0f100

18 files changed

+674
-377
lines changed

docs/source/conf.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
"sphinx.ext.napoleon",
5858
"sphinx_rtd_theme",
5959
'sphinx_click.ext',
60+
"sphinx_tabs.tabs",
61+
"sphinx_copybutton",
6062
]
6163

6264
intersphinx_mapping = {
@@ -81,7 +83,7 @@
8183
#
8284
# This is also used if you do content translation via gettext catalogs.
8385
# Usually you set "language" from the command line for these cases.
84-
language = None
86+
language = 'en'
8587

8688
# List of patterns, relative to source directory, that match files and
8789
# directories to ignore when looking for source files.
@@ -140,7 +142,7 @@
140142
# -- Options for HTMLHelp output ---------------------------------------------
141143

142144
# Output file base name for HTML help builder.
143-
htmlhelp_basename = 'rexdoc'
145+
htmlhelp_basename = 'sup3rdoc'
144146

145147
# -- Options for LaTeX output ------------------------------------------------
146148

sup3r/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"""Super Resolving Renewable Energy Resource Data (SUP3R)"""
33
import os
44
from sup3r.version import __version__
5-
import sup3r.cli # import sets up CLI commands
5+
# Next import sets up CLI commands
6+
# This line could be "import sup3r.cli" but that breaks sphinx as of 12/11/2023
7+
from sup3r.cli import main
68

79
__author__ = """Brandon Benton"""
810
__email__ = "[email protected]"

sup3r/bias/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
"""Bias calculation and correction modules."""
33
from .bias_transforms import (global_linear_bc, local_linear_bc,
44
monthly_local_linear_bc)
5-
from .bias_calc import LinearCorrection, MonthlyLinearCorrection
5+
from .bias_calc import (LinearCorrection, MonthlyLinearCorrection,
6+
SkillAssessment)

sup3r/bias/bias_calc.py

+250-105
Large diffs are not rendered by default.

sup3r/bias/bias_correct_means.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import numpy as np
1515
import pandas as pd
16-
import rioxarray
1716
import xarray as xr
1817
from rex import Resource
1918
from scipy.interpolate import interp1d
@@ -116,6 +115,11 @@ def convert_month_height_tif(self, month, height):
116115
os.remove(outfile)
117116

118117
if not os.path.exists(outfile) or self.overwrite:
118+
try:
119+
import rioxarray
120+
except ImportError as e:
121+
msg = 'Need special installation of "rioxarray" to run this!'
122+
raise ImportError(msg) from e
119123
tmp = rioxarray.open_rasterio(infile)
120124
ds = tmp.to_dataset("band")
121125
ds = ds.rename(

0 commit comments

Comments
 (0)