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 .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ If applicable, add screenshots to help explain your problem.
Add any other context about the problem here.

**Charge code**
If you are at NREL and fixing this bug is urgent, please provide a charge code for our time.
If you are at NLR and fixing this bug is urgent, please provide a charge code for our time.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/documentation_improvement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ body:
options:
- label: >
I have checked that the issue still exists on the latest versions of the docs
on `main` [here](https://nrel.github.io/nsrdb/)
on `main` [here](https://natlabrockies.github.io/nsrdb/)
required: true
- type: textarea
id: location
attributes:
label: Location of the documentation
description: >
Please provide the location of the documentation,
placeholder: https://nrel.github.io/pipes_config/_autosummary/pipes_config.cli.html#pipes_config.cli
placeholder: https://natlabrockies.github.io/pipes_config/_autosummary/pipes_config.cli.html#pipes_config.cli
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A clear and concise description of any alternative solutions or features you've
Add any other context or screenshots about the feature request here.

**Charge code**
If you are at NREL, please provide a task number for the developers to implement this feature.
If you are at NLR, please provide a task number for the developers to implement this feature.

**Urgency / Timeframe**
When do you need this feature by? How urgent is it related to other feature requests you've made?
8 changes: 3 additions & 5 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
fetch-tags: true
- name: Set up Python
Expand All @@ -24,11 +23,10 @@ jobs:
- name: Install dependencies and Build
run: |
python -m pip install --upgrade pip
pip install setuptools build
python -m build --wheel --outdir dist/ .
python -m pip install setuptools build twine
python -m build --sdist --wheel --outdir dist/ .
- name: Check distribution files
run: |
pip install twine
twine check dist/*
python -m twine check dist/*
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
12 changes: 6 additions & 6 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ type: software
authors:
- family-names: Buster
given-names: Grant
affiliation: NREL
affiliation: NLR
orcid: "https://orcid.org/0000-0001-8616-8100"
- family-names: Benton
given-names: Brandon
affiliation: NREL
affiliation: NLR
orcid: "https://orcid.org/0009-0008-9931-2050"
- family-names: Rossol
given-names: Michael
affiliation: NREL
affiliation: NLR
- family-names: Bannister
given-names: Michael
affiliation: NREL
affiliation: NLR
- family-names: Xie
given-names: Yu
affiliation: NREL
affiliation: NLR
identifiers:
- type: doi
value: 10.5281/zenodo.10471523
repository-code: 'https://github.com/NREL/nsrdb'
repository-code: 'https://github.com/NatLabRockies/nsrdb'
abstract: >-
The National Solar Radiation Database (NSRDB) software contains all elements
of the processing pipeline, from satellite data injestion to surface
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts

# Install dependencies
RUN pip install --no-cache-dir --upgrade pip
RUN --mount=type=ssh,id=github_ssh_key pip install --no-cache-dir git+ssh://git@github.com/NREL/rest2.git
RUN --mount=type=ssh,id=github_ssh_key pip install --no-cache-dir git+ssh://git@github.com/NatLabRockies/rest2.git
RUN pip install --no-cache-dir -e .
RUN --mount=type=ssh,id=github_ssh_key pip install --no-cache-dir git+ssh://git@github.com/NREL/mlclouds.git
RUN --mount=type=ssh,id=github_ssh_key pip install --no-cache-dir git+ssh://git@github.com/NatLabRockies/mlclouds.git

ENTRYPOINT ["nsrdb"]
4 changes: 2 additions & 2 deletions Dockerfile.lambda
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts

# Install dependencies
RUN pip install --no-cache-dir --upgrade pip
RUN --mount=type=ssh,id=github_ssh_key pip install --no-cache-dir git+ssh://git@github.com/NREL/rest2.git
RUN --mount=type=ssh,id=github_ssh_key pip install --no-cache-dir git+ssh://git@github.com/NatLabRockies/rest2.git
RUN pip install --no-cache-dir -e .
RUN --mount=type=ssh,id=github_ssh_key pip install --no-cache-dir git+ssh://git@github.com/NREL/mlclouds.git
RUN --mount=type=ssh,id=github_ssh_key pip install --no-cache-dir git+ssh://git@github.com/NatLabRockies/mlclouds.git

CMD ["lambda_handler.handler"]
48 changes: 24 additions & 24 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ Welcome to the National Solar Radiation Data Base (NSRDB)!
##########################################################
|Docs| |Tests| |Linter| |PyPi| |PythonV| |Codecov| |Zenodo|

.. |Docs| image:: https://github.com/NREL/nsrdb/workflows/Documentation/badge.svg
:target: https://nrel.github.io/nsrdb/
.. |Docs| image:: https://github.com/NatLabRockies/nsrdb/workflows/Documentation/badge.svg
:target: https://natlabrockies.github.io/nsrdb/

.. |Tests| image:: https://github.com/NREL/nsrdb/workflows/Pytests/badge.svg
:target: https://github.com/NREL/nsrdb/actions?query=workflow%3A%22Pytests%22
.. |Tests| image:: https://github.com/NatLabRockies/nsrdb/workflows/Pytests/badge.svg
:target: https://github.com/NatLabRockies/nsrdb/actions?query=workflow%3A%22Pytests%22

.. |Linter| image:: https://github.com/NREL/nsrdb/workflows/Lint%20Code%20Base/badge.svg
:target: https://github.com/NREL/nsrdb/actions?query=workflow%3A%22Lint+Code+Base%22
.. |Linter| image:: https://github.com/NatLabRockies/nsrdb/workflows/Lint%20Code%20Base/badge.svg
:target: https://github.com/NatLabRockies/nsrdb/actions?query=workflow%3A%22Lint+Code+Base%22

.. |PyPi| image:: https://img.shields.io/pypi/pyversions/NREL-nsrdb.svg
:target: https://pypi.org/project/NREL-nsrdb/
.. |PyPi| image:: https://img.shields.io/pypi/pyversions/NLR-nsrdb.svg
:target: https://pypi.org/project/NLR-nsrdb/

.. |PythonV| image:: https://badge.fury.io/py/NREL-nsrdb.svg
:target: https://badge.fury.io/py/NREL-nsrdb
.. |PythonV| image:: https://badge.fury.io/py/NLR-nsrdb.svg
:target: https://badge.fury.io/py/NLR-nsrdb

.. |Codecov| image:: https://codecov.io/gh/nrel/nsrdb/branch/main/graph/badge.svg
:target: https://codecov.io/gh/nrel/nsrdb
.. |Codecov| image:: https://codecov.io/gh/NatLabRockies/nsrdb/branch/main/graph/badge.svg
:target: https://codecov.io/gh/NatLabRockies/nsrdb

.. |Zenodo| image:: https://zenodo.org/badge/340209614.svg
:target: https://zenodo.org/badge/latestdoi/340209614
Expand All @@ -30,34 +30,34 @@ Welcome to the National Solar Radiation Data Base (NSRDB)!
The National Solar Radiation Database (NSRDB) software includes all the methods
for the irradiance data processing pipeline. To get started, check out the
NSRDB command line interface `(CLI)
<https://nrel.github.io/nsrdb/_cli/nsrdb.html#nsrdb>`_. Refer to the `NREL
website <https://nsrdb.nrel.gov/>`_ and the original `journal article
<https://natlabrockies.github.io/nsrdb/_cli/nsrdb.html#nsrdb>`_. Refer to the `NLR
website <https://nsrdb.natlabrockies.gov/>`_ and the original `journal article
<https://www.sciencedirect.com/science/article/pii/S136403211830087X>`_ for
more information on the NSRDB. For details on NSRDB variable units,
datatypes, interpolation methods, and other attributes, see the `NSRDB
variable meta data
<https://github.com/NREL/nsrdb/tree/main/nsrdb/config/nsrdb_vars.csv>`_ and
<https://github.com/NatLabRockies/nsrdb/tree/main/nsrdb/config/nsrdb_vars.csv>`_ and
`NSRDB variable descriptions
<https://github.com/NREL/nsrdb/tree/main/nsrdb/config/var_descriptions.csv>`_.
<https://github.com/NatLabRockies/nsrdb/tree/main/nsrdb/config/var_descriptions.csv>`_.

The PXS All-Sky Irradiance Model
================================
The PXS All-Sky `Irradiance Model
<https://github.com/NREL/nsrdb/tree/main/nsrdb/all_sky>`_ is the main physics
<https://github.com/NatLabRockies/nsrdb/tree/main/nsrdb/all_sky>`_ is the main physics
package that calculates surface irradiance variables.

The NSRDB Data Model
====================
The NSRDB `Data Model
<https://github.com/NREL/nsrdb/tree/main/nsrdb/data_model>`_ is the data
<https://github.com/NatLabRockies/nsrdb/tree/main/nsrdb/data_model>`_ is the data
aggregation framework that sources, processes, and prepares data for input to
All-Sky.

The MLClouds Model
==================
The `MLClouds Model <https://github.com/NREL/mlclouds.git>`_ is used to predict
The `MLClouds Model <https://github.com/NatLabRockies/mlclouds.git>`_ is used to predict
missing cloud properties (a.k.a. Gap Fill). The NSRDB interface with MLClouds
can be found `here <https://github.com/NREL/nsrdb/tree/main/nsrdb/gap_fill>`_.
can be found `here <https://github.com/NatLabRockies/nsrdb/tree/main/nsrdb/gap_fill>`_.

Installation
============
Expand All @@ -73,12 +73,12 @@ Option 1: Install from PIP (recommended for analysts):

2. Activate environment: ``conda activate nsrdb``

3. Install nsrdb: ``pip install NREL-nsrdb``
3. Install nsrdb: ``pip install NLR-nsrdb``

Option 2: Clone repo (recommended for developers)
-------------------------------------------------

1. Run ``git clone git@github.com:NREL/nsrdb.git``
1. Run ``git clone git@github.com:NatLabRockies/nsrdb.git``
2. ``cd nsrdb``.
3. Make sure the branch is correct (install from main!)
4. If you are using conda, create and activate a new environment:
Expand Down Expand Up @@ -201,7 +201,7 @@ NSRDB Versions
- Initial release of PSM v2 (use of FARMS, downscaling of ancillary data
introduced to account for elevation, NSRDB website distribution
developed)
- Clear sky: REST2, Cloudy sky: NREL FARMS model and DISC model
- Clear sky: REST2, Cloudy sky: NLR FARMS model and DISC model
- Climate Forecast System Reanalysis (CFSR) is used for ancillary data
- Monthly 0.5º aerosol optical depth (AOD) for 1998-2014 using
satellite and ground-based measurements. Monthly results interpolated
Expand All @@ -222,7 +222,7 @@ Update with current version and DOI:

Grant Buster, Brandon Benton, Mike Bannister, Yu Xie, Aron Habte, Galen
Maclaurin, Manajit Sengupta. National Solar Radiation Database (NSRDB).
https://github.com/NREL/nsrdb (version v4.0.0), 2023. DOI:
https://github.com/NatLabRockies/nsrdb (version v4.0.0), 2023. DOI:
10.5281/zenodo.10471523

Acknowledgments
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

html_context = {
"display_github": True,
"github_user": "nrel",
"github_user": "NatLabRockies",
"github_repo": "nsrdb",
"github_version": "main",
"conf_py_path": "/docs/source/",
Expand Down
4 changes: 2 additions & 2 deletions nsrdb/config/README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
NSRDB Dataset Config / Meta Data
---------------------------------
This `config directory <https://github.com/NREL/nsrdb/tree/main/nsrdb/config/>`_
This `config directory <https://github.com/NatLabRockies/nsrdb/tree/main/nsrdb/config/>`_
contains the default configuration for processing each NSRDB variable. Each NSRDB
variable has default scaling factors, data types, physical ranges, etc... The path
specification for this dataset config will be found in the NSRDB code under the `var_meta` kwarg.
If this kwarg is set to None (default), the NSRDB will point to the
`nsrdb_vars.csv <https://github.com/NREL/nsrdb/tree/main/nsrdb/config/nsrdb_vars.csv>`_ file in this directory.
`nsrdb_vars.csv <https://github.com/NatLabRockies/nsrdb/tree/main/nsrdb/config/nsrdb_vars.csv>`_ file in this directory.
6 changes: 3 additions & 3 deletions nsrdb/data_model/nrel_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""A framework for handling source data in the NREL resource format: .h5 source
"""A framework for handling source data in the NLR resource format: .h5 source
files with meta and time_index datasets, all data is (n_time, n_sites).
"""

Expand All @@ -14,7 +14,7 @@


class NrelVar(AncillaryVarHandler):
"""Framework for NREL source data extraction."""
"""Framework for NLR source data extraction."""

def __init__(self, name, var_meta, date, **kwargs):
"""
Expand Down Expand Up @@ -87,7 +87,7 @@ def row_mask(self):

@property
def time_index(self):
"""Get the NREL source file native time index masked for the
"""Get the NLR source file native time index masked for the
day of interest.

Returns
Expand Down
11 changes: 6 additions & 5 deletions nsrdb/data_model/variable_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ def get_instance(cls, var_name, *args, **kwargs):
try:
instance = HandlerClass(*args, **kwargs)
except Exception as e:
m = 'Received an exception trying to instantiate "{}":\n{}'.format(
var_name, e
m = (
'Received an exception trying to instantiate "{}" with '
'HandlerClass {} with args: {} and kwargs: {}\n{}'.format(
var_name, HandlerClass, args, kwargs, e
)
)
logger.exception(m)
raise RuntimeError(m) from e
Expand Down Expand Up @@ -308,7 +311,5 @@ def get_cloud_handler(fpath, dsets=None, **kwargs):
if fpath.endswith('.nc'):
return CloudVarSingleNC(fpath, dsets=dsets, **kwargs)
raise TypeError(
'Did not recognize cloud file type as .nc or ' '.h5: {}'.format(
fpath
)
'Did not recognize cloud file type as .nc or .h5: {}'.format(fpath)
)
2 changes: 1 addition & 1 deletion nsrdb/solar_position/solpos.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SolPos:
"""
Class to compute solar position for time(s) and site(s)
Based off of SAM Solar Position Function:
https://github.com/NREL/ssc/blob/develop/shared/lib_irradproc.cpp
https://github.com/NatLabRockies/ssc/blob/develop/shared/lib_irradproc.cpp
"""

def __init__(self, time_index, lat_lon):
Expand Down
24 changes: 13 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ requires = [
build-backend = "setuptools.build_meta"

[project]
name = "NREL-nsrdb"
name = "NLR-nsrdb"
dynamic = ["version"]
description = "National Solar Radiation Database (NSRDB) Software"
keywords = ["nsrdb", "NREL"]
keywords = ["nsrdb", "NLR"]
readme = "README.rst"
authors = [
{name = "Brandon Benton", email = "brandon.benton@nrel.gov"},
{name = "Brandon Benton", email = "brandon.benton@nlr.gov"},
]
license = {text = "BSD-3-Clause"}
requires-python = ">= 3.9"
Expand All @@ -26,11 +26,11 @@ classifiers=[
"Programming Language :: Python :: 3.11",
]
dependencies = [
"NREL-gaps>=0.6.14,<0.8.0",
"NREL-cloud_fs>=0.0.8",
"NREL-farms>1.0.6",
"NREL-rest2>=1.0.2",
"NREL-mlclouds>=0.0.5",
"NREL-gaps>=0.6.14,<0.8.0",
"NLR-farms>=1.0.8",
"NLR-rest2>=1.0.3",
"NLR-mlclouds>=0.0.6",
"netCDF4>=1.5.8,<1.7",
"scikit-learn>=1.0",
"matplotlib>=3.1",
Expand Down Expand Up @@ -60,9 +60,9 @@ test = [
]

[project.urls]
homepage = "https://github.com/NREL/nsrdb"
documentation = "https://nrel.github.io/nsrdb/"
repository = "https://github.com/NREL/nsrdb"
homepage = "https://github.com/NatLabRockies/nsrdb"
documentation = "https://natlabrockies.github.io/nsrdb/"
repository = "https://github.com/NatLabRockies/nsrdb"

[tool.ruff]
line-length = 79
Expand Down Expand Up @@ -180,6 +180,8 @@ packages = ["nsrdb"]

[tool.setuptools_scm]
version_file = "nsrdb/_version.py"
version_scheme = "guess-next-dev"
fallback_version = "4.1.3"

[tool.pixi.workspace]
channels = ["conda-forge", "anaconda", "main"]
Expand All @@ -202,7 +204,7 @@ matplotlib = ">=3.1"
numpy = ">=1.22,<1.24"

[tool.pixi.pypi-dependencies]
NREL-nsrdb = { path = ".", editable = true }
NLR-nsrdb = { path = ".", editable = true }

[tool.pixi.feature.build.tasks]
build-wheels = { cmd = "uv build --sdist --wheel --out-dir dist/ ." }
Expand Down
Loading