diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4a8d15b5..3ce42585 100755 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -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. diff --git a/.github/ISSUE_TEMPLATE/documentation_improvement.yaml b/.github/ISSUE_TEMPLATE/documentation_improvement.yaml index 0bd57cfb..4b83e1cf 100644 --- a/.github/ISSUE_TEMPLATE/documentation_improvement.yaml +++ b/.github/ISSUE_TEMPLATE/documentation_improvement.yaml @@ -10,7 +10,7 @@ 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 @@ -18,7 +18,7 @@ body: 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 diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 51ca902e..73e56aa8 100755 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -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? diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index d5df4c2f..4db5485b 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -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 @@ -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 diff --git a/CITATION.cff b/CITATION.cff index 786dc66d..5b6988bf 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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 diff --git a/Dockerfile b/Dockerfile index 8aa78cb1..56e4ad5d 100755 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/Dockerfile.lambda b/Dockerfile.lambda index 2e319103..6daebddb 100755 --- a/Dockerfile.lambda +++ b/Dockerfile.lambda @@ -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"] diff --git a/README.rst b/README.rst index 77b3ae3a..8e10a2ac 100755 --- a/README.rst +++ b/README.rst @@ -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 @@ -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) -`_. Refer to the `NREL -website `_ and the original `journal article +`_. Refer to the `NLR +website `_ and the original `journal article `_ for more information on the NSRDB. For details on NSRDB variable units, datatypes, interpolation methods, and other attributes, see the `NSRDB variable meta data -`_ and +`_ and `NSRDB variable descriptions -`_. +`_. The PXS All-Sky Irradiance Model ================================ The PXS All-Sky `Irradiance Model -`_ is the main physics +`_ is the main physics package that calculates surface irradiance variables. The NSRDB Data Model ==================== The NSRDB `Data Model -`_ is the data +`_ is the data aggregation framework that sources, processes, and prepares data for input to All-Sky. The MLClouds Model ================== -The `MLClouds Model `_ is used to predict +The `MLClouds Model `_ is used to predict missing cloud properties (a.k.a. Gap Fill). The NSRDB interface with MLClouds -can be found `here `_. +can be found `here `_. Installation ============ @@ -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: @@ -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 @@ -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 diff --git a/docs/source/conf.py b/docs/source/conf.py index 344157de..ffcbae16 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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/", diff --git a/nsrdb/config/README.rst b/nsrdb/config/README.rst index a41b0fb2..b5dbe1b4 100644 --- a/nsrdb/config/README.rst +++ b/nsrdb/config/README.rst @@ -1,8 +1,8 @@ NSRDB Dataset Config / Meta Data --------------------------------- -This `config directory `_ +This `config directory `_ 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 `_ file in this directory. \ No newline at end of file +`nsrdb_vars.csv `_ file in this directory. \ No newline at end of file diff --git a/nsrdb/data_model/nrel_data.py b/nsrdb/data_model/nrel_data.py index fbe7a091..99814a70 100755 --- a/nsrdb/data_model/nrel_data.py +++ b/nsrdb/data_model/nrel_data.py @@ -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). """ @@ -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): """ @@ -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 diff --git a/nsrdb/data_model/variable_factory.py b/nsrdb/data_model/variable_factory.py index e7c32204..bb706e81 100755 --- a/nsrdb/data_model/variable_factory.py +++ b/nsrdb/data_model/variable_factory.py @@ -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 @@ -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) ) diff --git a/nsrdb/solar_position/solpos.py b/nsrdb/solar_position/solpos.py index 77990145..8b37665e 100755 --- a/nsrdb/solar_position/solpos.py +++ b/nsrdb/solar_position/solpos.py @@ -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): diff --git a/pyproject.toml b/pyproject.toml index 84490b51..0f662827 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" @@ -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", @@ -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 @@ -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"] @@ -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/ ." }