diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e088219d..df1b6ce4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,46 +1,59 @@ -name: deploy-book +# This file was created automatically with `jupyter-book init --gh-pages` 🪄 💚 +# Ensure your GitHub Pages settings for this repository are set to deploy with **GitHub Actions**. -# Only run this when the master branch changes +name: Jupyter Book (via myst) GitHub Pages Deploy on: push: - branches: - - main - # If your git repository has the Jupyter Book within some-subfolder next to - # unrelated files, you can make this run only if a file within that specific - # folder has been modified. - # - # paths: - # - some-subfolder/** + # Runs on pushes targeting the default branch + branches: [main] +env: + # `BASE_URL` determines, relative to the root of the domain, the URL that your site is served from. + # E.g., if your site lives at `https://mydomain.org/myproject`, set `BASE_URL=/myproject`. + # If, instead, your site lives at the root of the domain, at `https://mydomain.org`, set `BASE_URL=''`. + BASE_URL: /${{ github.event.repository.name }} -# This job installs dependencies, build the book, and pushes it to `gh-pages` +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: 'pages' + cancel-in-progress: false jobs: - deploy-book: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - # Install dependencies - - name: Set up Python 3.12 - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Install dependencies - run: | - pip install -r docs/requirements.txt - - # Build the book - - name: Build the book - env: # Set secret environment variables - BSRN_FTP_USERNAME: ${{ secrets.BSRN_FTP_USERNAME }} - BSRN_FTP_PASSWORD: ${{ secrets.BSRN_FTP_PASSWORD }} - run: | - jupyter-book build docs/. - - # Push the book's HTML to github-pages - - name: GitHub Pages action - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/_build/html - cname: SolarStations.Org + - uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v3 + - uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install dependencies + run: pip install -r docs/requirements.txt + - name: Install mystmd + run: npm install -g mystmd + - name: Build HTML Assets + env: # Set secret environment variables + BSRN_FTP_USERNAME: ${{ secrets.BSRN_FTP_USERNAME }} + BSRN_FTP_PASSWORD: ${{ secrets.BSRN_FTP_PASSWORD }} + run: cd docs && myst build --html --execute + - name: Add CNAME + run: echo 'SolarStations.org' > ./docs/_build/html/CNAME + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './docs/_build/html' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index 47aaf344..de950276 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,11 @@ -docs/_build/* +# MyST build outputs +docs/_build docs/station-listing.csv # auto-generated by docs build .ipynb_checkpoints .DS_Store __pycache__/ SolarStationsOrg-station-catalog.csv + + +# MyST build outputs +_build diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c643cf58..b23485d5 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,18 +5,18 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.12" - jobs: - pre_build: - # Generate the Sphinx configuration for this Jupyter Book so it builds. - - "jupyter-book config sphinx docs/" - -python: - install: - - requirements: docs/requirements.txt - -# Build documentation in the "docs/" directory with Sphinx -sphinx: - configuration: docs/_config.yml - builder: html - fail_on_warning: true + python: "3.13" + nodejs: "22" + commands: + # Install Python dependencies + - pip install -r docs/requirements.txt + # Install mystmd + - npm install -g mystmd + # Build the site (myst.yml lives in docs/, so build from there) + # --execute re-runs notebook code cells instead of using their stored outputs. + - cd docs && myst build --html --execute + # Copy the output to Read the Docs expected location + - mkdir -p $READTHEDOCS_OUTPUT/html/ + - cp -r docs/_build/html/. "$READTHEDOCS_OUTPUT/html" + # Clean up build artifacts + - rm -rf docs/_build diff --git a/README.md b/README.md index 68f262f5..1a0b4331 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Solar Stations A catalog of multi-component solar irradiance monitoring stations. -An interactive map and catalog of the stations can be found at [SolarStations.Org](https://SolarStations.Org). +An interactive map and catalog of the stations can be found at [SolarStations.org](https://SolarStations.org). Pull requests with new stations or updates are highly welcome! diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index a388bc3d..00000000 --- a/docs/_config.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Book settings -# Learn more at https://jupyterbook.org/customize/config.html - -title: SolarStations.Org -author: Adam R. Jensen, Ioannis Sifnaios, Kevin Anderson -copyright: "2022" -logo: graphics/solarstationsorg_logo_padded.png - -# Force re-execution of notebooks on each build. -# See https://jupyterbook.org/content/execute.html -execute: - execute_notebooks: force - timeout: 240 # When to timeout each notebook in seconds - allow_errors: false - -# Define the name of the latex output file for PDF builds -latex: - latex_documents: - targetname: book.tex - -# Information about where the book exists on the web -repository: - url: https://github.com/assessingsolar/solarstations # Online location of your book - branch: main # Which branch of the repository should be used when creating links (optional) - -# Add GitHub buttons to your book -# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository -html: - use_issues_button: true - use_repository_button: true - favicon: graphics/solarstationsorg_favicon.ico # A path to a favicon image - baseurl : https://SolarStations.Org - analytics: - google_analytics_id : G-6KXSD7FTJM diff --git a/docs/_toc.yml b/docs/_toc.yml deleted file mode 100644 index a021b52b..00000000 --- a/docs/_toc.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Table of contents -# Learn more at https://jupyterbook.org/customize/toc.html - -root: intro -format: jb-book - -parts: -- caption: - chapters: - - file: station_catalog - - file: station_requirements - title: Station requirements - - file: station_metadata - - file: station_statistics - title: Statistics - -- caption: Networks - chapters: - - file: station_network_bsrn - title: BSRN - - file: station_network_esmap - title: ESMAP - - file: station_network_midc - title: NREL MIDC - - file: station_network_solrad - title: SOLRAD - - file: station_network_srml - title: SRML - - file: station_network_surfrad - title: SURFRAD - -- caption: Other data sources - chapters: - - file: station_network_pvlive - - file: station_network_eye2sky - title: Eye2sky - - file: geba_network - - file: other_data_sources - title: Miscellaneous - -- caption: Appendix - chapters: - - file: contributing - - title: AssessingSolar.org - url: https://assessingsolar.org - external: true - - title: IEA PVPS Task 16 - url: https://iea-pvps.org/research-tasks/solar-resource-for-high-penetration-and-large-scale-applications/ - external: true diff --git a/docs/intro.ipynb b/docs/intro.ipynb index 293a429f..98303a8b 100644 --- a/docs/intro.ipynb +++ b/docs/intro.ipynb @@ -28,7 +28,6 @@ "id": "6a1101b1-fdf8-4389-a1ce-a7f997cd3b4a", "metadata": { "tags": [ - "hide-input", "remove-input" ] }, diff --git a/docs/myst.yml b/docs/myst.yml new file mode 100644 index 00000000..670c15a8 --- /dev/null +++ b/docs/myst.yml @@ -0,0 +1,70 @@ +# See docs at: https://mystmd.org/guide/frontmatter +version: 1 +project: + id: 38f67f99-53eb-411b-bbf0-4734d647712d + title: SolarStations.org + authors: + - name: Adam R. Jensen + email: arajen@dtu.dk + corresponding: true + - name: Ioannis Sifnaios + - name: Kevin Anderson + copyright: "2022" + open_access: true + license: BSD-3-Clause + # doi: + # description: + # keywords: [] + github: https://github.com/AssessingSolar/ + + settings: + output_matplotlib_strings: remove + + toc: + - file: intro.ipynb + - file: station_catalog.ipynb + - file: station_requirements.md + title: Station requirements + - file: station_metadata.md + - file: station_statistics.ipynb + title: Statistics + + - title: Networks + children: + - file: station_network_bsrn.ipynb + title: BSRN + - file: station_network_esmap.ipynb + title: ESMAP + - file: station_network_midc.ipynb + title: NREL MIDC + - file: station_network_solrad.ipynb + title: SOLRAD + - file: station_network_srml.ipynb + title: SRML + - file: station_network_surfrad.ipynb + title: SURFRAD + + - title: Other data sources + children: + - file: station_network_pvlive.ipynb + - file: station_network_eye2sky.ipynb + title: Eye2sky + - file: geba_network.md + - file: other_data_sources.md + title: Miscellaneous + + - title: Appendix + children: + - file: contributing.md + - title: pvlib iotools + url: https://assessingsolar.org + - title: IEA PVPS Task 16 + url: https://iea-pvps.org/research-tasks/solar-resource-for-high-penetration-and-large-scale-applications/ + +site: + template: book-theme + options: + favicon: graphics/solarstationsorg_favicon.ico + logo: graphics/solarstationsorg_logo_padded.png + analytics_google: G-6KXSD7FTJM + hide_authors: true diff --git a/docs/other_data_sources.md b/docs/other_data_sources.md index 814ceae4..986c6d3c 100644 --- a/docs/other_data_sources.md +++ b/docs/other_data_sources.md @@ -10,8 +10,6 @@ This page provides information about alternative sources for obtaining irradianc * [CANSIM](https://pubs.aip.org/aip/acp/article/1881/1/090002/794031/Deployment-and-early-results-from-the-CanSIM) is a Canadian network with 7 stations measuring spectral irradiance using Spectrafy sensors. -* Eye2Sky ([link_1](https://www.dlr.de/en/images/2019/4/the-eye2sky-measurement-network-will-comprise-34-stations-when-complete), [link_2](https://www.dlr.de/en/ve/research-and-transfer/research-infrastructure/laboratories-infrastructures/eye2sky)) is a network of all-sky cameras near Oldenburg, Germany. A third of the stations are equipped with a rotating shadowband irradiometer (RSI) for measuring solar irradiance. - * [Oklahoma Mesonet](https://www.mesonet.org/weather/solar-radiation-satellite/solar-radiation) is a network of weather stations equipped with LI-COR pyranometers. Information about this network is also given [here](https://journals.ametsoc.org/view/journals/atot/17/4/1520-0426_2000_017_0474_qapito_2_0_co_2.xml). * [German Weather Services - Deutscher Wetterdienst (DWD)](https://www.dwd.de/DE/leistungen/solarenergie/Strahlungsmessnetz.html?nn=495490) operates a network of 120 sites measuring global horizontal irradiance and diffuse irradiance with thermopile pyranometers with a resolution of 10 minutes. Data can be downloaded from [here](https://cdc.dwd.de/portal/) diff --git a/docs/requirements.txt b/docs/requirements.txt index af3b6d73..080843c3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,20 +1,12 @@ -folium==0.17.0 -ipykernel==6.29.5 -ipython==8.28.0 +folium==0.20.0 itables==2.2.2 -jupyter-book==1.0.3 +jupyter-book==2.1.6 kgcpy==1.1.8 -lxml==5.3.0 -matplotlib==3.9.2 -myst-nb==1.1.2 -numpy==2.1.2 -pandas==2.2.3 -pvlib==0.11.1 -pyarrow==17.0.0 -pydata-sphinx-theme==0.15.4 -Sphinx==7.4.7 -sphinx-book-theme==1.1.3 -unidecode==1.3.8 -xarray==2024.5.0 +matplotlib==3.11.1 +numpy==2.5.1 +pandas==3.0.3 +pvlib==0.15.2 +unidecode==1.4.0 openpyxl==3.1.5 -h5netcdf==1.5.0 +xarray==2026.7.0 +h5netcdf==1.8.1 diff --git a/docs/station_catalog.ipynb b/docs/station_catalog.ipynb index d0a0ee55..7153ffb3 100644 --- a/docs/station_catalog.ipynb +++ b/docs/station_catalog.ipynb @@ -5,14 +5,7 @@ "metadata": { "tags": [] }, - "source": [ - "# Station catalog\n", - "\n", - "This site provides an overview of available solar irradiance monitoring stations worldwide and metadata of the stations.\n", - "The metadata fields are further described in the [metadata](station_metadata) section.\n", - "\n", - "The table is also available to download in CSV form: {download}`SolarStationsOrg-station-catalog.csv`" - ] + "source": "# Station catalog\n\nThis site provides an overview of available solar irradiance monitoring stations worldwide and metadata of the stations.\nThe metadata fields are further described in the [metadata](station_metadata) section.\n\nThe table is also available to download in CSV form: {download}`SolarStationsOrg-station-catalog.csv `" }, { "cell_type": "code", @@ -436,4 +429,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} +} \ No newline at end of file diff --git a/docs/station_metadata.md b/docs/station_metadata.md index 78e7d69b..3d525aac 100644 --- a/docs/station_metadata.md +++ b/docs/station_metadata.md @@ -1,6 +1,6 @@ # Metadata -The central part of the catalog is the list of stations and their metadata which is displayed on the SolarStations.Org [station catalog page](station_catalog). The metadata for each station includes: +The central part of the catalog is the list of stations and their metadata which is displayed on the SolarStations.org [station catalog page](station_catalog). The metadata for each station includes: * Station name * Station abbreviation * Country and state/region diff --git a/docs/station_network_bsrn.ipynb b/docs/station_network_bsrn.ipynb index f9e116b2..bcd3ae7a 100644 --- a/docs/station_network_bsrn.ipynb +++ b/docs/station_network_bsrn.ipynb @@ -12,7 +12,7 @@ "According to the [World Radiation Monitoring Center (WRMC)](https://bsrn.awi.de/project/objectives/):\n", "> The data [from the BSRN stations] are of primary importance in supporting the validation and confirmation of satellite and computer model estimates of these quantities. At a small number of stations (currently 74 in total, 58 active) in contrasting climatic zones, covering a latitude range from 80°N to 90°S, solar and atmospheric radiation is measured with instruments of the highest available accuracy and with high time resolution.\n", "\n", - "A list of active, inactive, and candidate BSRN stations can be retrieved from the SolarStations.Org [station catalog](../station_catalog) and are shown on the map below." + "A list of active, inactive, and candidate BSRN stations can be retrieved from the SolarStations.org [station catalog](../station_catalog) and are shown on the map below." ] }, { @@ -2998,7 +2998,7 @@ "## References\n", "\n", "* A. Driemel, J. Augustine, K. Behrens, S. Colle, C. Cox, E. Cuevas-Agulló, F. M. Denn, T. Duprat, M. Fukuda, H. Grobe, M. Haeffelin, G. Hodges, N. Hyett, O. Ijima, A. Kallis, W. Knap, V. Kustov, C. N. Long, D. Longenecker, A. Lupi, M. Maturilli, M. Mimouni, L. Ntsangwane, H. Ogihara, X. Olano, M. Olefs, M. Omori, L. Passamani, E. B. Pereira, H. Schmithüsen, S. Schumacher, R. Sieger, J. Tamlyn, R. Vogt, L. Vuilleumier, X. Xia, A. Ohmura, and G. König-Langlo. Baseline surface radiation network (BSRN): structure and data description (1992–2017). Earth System Science Data, 10(3):1491–1501, 2018. doi: [10.5194/essd-10-1491-2018](https://doi.org/10.5194/essd-10-1491-2018).\n", - "\r", + "\n", "* Adam R. Jensen, Kevin S. Anderson, William F. Holmgren, Mark A. Mikofski, Clifford W. Hansen, Leland J. Boeman, and Roel Loonen. Pvlib iotools—open-source python functions for seamless access to solar irradiance data. Solar Energy, 266:112092, 2023. doi: [10.1016/j.solener.2023.112092](https://doi.org/10.1016/j.solener.2023.112092).." ] }, diff --git a/docs/station_network_midc.ipynb b/docs/station_network_midc.ipynb index 0dc08b92..9b1d0428 100644 --- a/docs/station_network_midc.ipynb +++ b/docs/station_network_midc.ipynb @@ -15,7 +15,7 @@ "\n", "The [Measurement and Instrumentation Data Center (MIDC)](https://midcdmz.nrel.gov/) is operated by NREL and provides irradiance and meteorological data from a number of ground stations in the U.S. The stations vary in quality, with some stations measuring all three components with high-quality instruments and other stations featuring a rotating shadow band pyranometer.\n", "\n", - "Note, the MIDC includes several inactive stations. Also, several of the active stations are no longer cleaned or calibrated frequently. For these reasons, the SolarStations.Org catalog only includes the SRRL BMS, SOLARTAC, and Flatirons M2 sites, as these measures all three irradiance components and are active. See the map below for the locations of the stations." + "Note, the MIDC includes several inactive stations. Also, several of the active stations are no longer cleaned or calibrated frequently. For these reasons, the SolarStations.org catalog only includes the SRRL BMS, SOLARTAC, and Flatirons M2 sites, as these measures all three irradiance components and are active. See the map below for the locations of the stations." ] }, { diff --git a/docs/station_network_pvlive.ipynb b/docs/station_network_pvlive.ipynb index 403c3701..72b7d7e0 100644 --- a/docs/station_network_pvlive.ipynb +++ b/docs/station_network_pvlive.ipynb @@ -1628,7 +1628,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "id": "fbb997a0-9ae9-46b5-ae71-4fe99c9401be", "metadata": {}, "outputs": [ @@ -1656,7 +1656,7 @@ } ], "source": [ - "df[['Gg_pyr', 'Gg_si_south', 'Gg_si_east', 'Gg_si_west']].resample('1h').mean().resample('1w').sum().plot.bar()" + "df[['Gg_pyr', 'Gg_si_south', 'Gg_si_east', 'Gg_si_west']].resample('1h').mean().resample('1W').sum().plot.bar()" ] }, { diff --git a/docs/station_network_srml.ipynb b/docs/station_network_srml.ipynb index a7f42f4d..485386fb 100644 --- a/docs/station_network_srml.ipynb +++ b/docs/station_network_srml.ipynb @@ -14,7 +14,7 @@ "\n", "The [Solar Radiation Monitoring Laboratory (SRML)](http://solardata.uoregon.edu/index.html) at the University of Oregon has been providing [solar irradiance data](http://solardata.uoregon.edu/SolarData.html) for the Northeastern United States since 1975. The SRML monitoring station network consists of both high-quality stations that measure all three irradiance components at a 1-minute resolution, as well as stations with low-quality instruments that only log measurements hourly. A full list of the 42 stations (including discontinued stations) can be found at the [SRML website](http://solardata.uoregon.edu/MonitoringStations.html).\n", "\n", - "Only the high-quality SRML stations are included in the SolarStations.Org' [station catalog](../station_catalog); however, all active stations are shown below.\n", + "Only the high-quality SRML stations are included in the SolarStations.org' [station catalog](../station_catalog); however, all active stations are shown below.\n", "\n", "```{admonition} Help support the SRML\n", "If you find the data useful, please consider donating to [support the SRML](http://solardata.uoregon.edu/Donate.html).\n", diff --git a/docs/station_statistics.ipynb b/docs/station_statistics.ipynb index 6d467ca7..d061d107 100644 --- a/docs/station_statistics.ipynb +++ b/docs/station_statistics.ipynb @@ -13,7 +13,7 @@ "source": [ "# Statistics\n", "\n", - "This page presents statistics of solar irradiance monitoring stations using data from SolarStations.Org." + "This page presents statistics of solar irradiance monitoring stations using data from SolarStations.org." ] }, {