From 4d009a59425e54ea3c9a6b030bf604243f808899 Mon Sep 17 00:00:00 2001 From: Edward Hartnett <38856240+edwardhartnett@users.noreply.github.com> Date: Wed, 29 May 2024 04:27:59 +0200 Subject: [PATCH 1/3] fixed version problem (#340) --- src/tocgrib2super/tocgrib2super.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tocgrib2super/tocgrib2super.F90 b/src/tocgrib2super/tocgrib2super.F90 index d6a78d4..d20566a 100755 --- a/src/tocgrib2super/tocgrib2super.F90 +++ b/src/tocgrib2super/tocgrib2super.F90 @@ -232,6 +232,7 @@ end subroutine getgb2p2 ! ! Read and return packed GRIB field ! + idxver = 2 CALL GETGB2P2(lugb,lugi,jrew,DSCPL,IDS,PDTN,PDT, & GDTN,GDT,extract,idxver,KREW,gribm,itot8,iret) itot = int(itot8, kind(4)) From b84e877a62efe6695546a4b7a02e7adb6e1ece25 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Tue, 28 May 2024 20:23:48 -0700 Subject: [PATCH 2/3] Fix Spack.yml CI (needs +tests variant for g2c dep) (#341) Co-authored-by: Edward Hartnett <38856240+edwardhartnett@users.noreply.github.com> --- .github/workflows/Spack.yml | 53 ++++++++++++++++++++ .github/workflows/Spack.yml.old | 88 --------------------------------- 2 files changed, 53 insertions(+), 88 deletions(-) create mode 100644 .github/workflows/Spack.yml delete mode 100644 .github/workflows/Spack.yml.old diff --git a/.github/workflows/Spack.yml b/.github/workflows/Spack.yml new file mode 100644 index 0000000..665c0cd --- /dev/null +++ b/.github/workflows/Spack.yml @@ -0,0 +1,53 @@ +# This is a CI workflow for the NCEPLIBS-grib_util project. +# +# This workflow builds grib_util with Spack, including installing with the "--test +# root" option to run the CTest suite. It also has a one-off job that validates +# the recipe by ensuring that every CMake option that should be set in the +# Spack recipe is so set. +# +# Alex Richert, Sep 2023 +name: Spack +on: + push: + branches: + - develop + pull_request: + branches: + - develop + +jobs: + # This job builds with Spack using every combination of variants and runs the CTest suite each time + Spack: + + strategy: + matrix: + os: ["ubuntu-latest"] + openmp: ["+openmp", "~openmp"] + ip_spec: ["^ip@5.0.0", "^ip@4.2.0 ^sp@2.4.0"] + runs-on: ${{ matrix.os }} + + steps: + + - name: "Build Spack package" + uses: NOAA-EMC/ci-test-spack-package@develop + with: + package-name: grib-util + package-variants: +tests ${{ matrix.openmp }} ^bacio@2.6.0 ^w3emc@2.10.0 ^g2@develop ^g2c@develop +utils +build_v2_api ${{ matrix.ip_spec }} + custom-recipe: spack/package.py + use-repo-cache: true + spack-compiler: gcc + repo-cache-key-suffix: ${{ matrix.os }}-${{ matrix.openmp }}-${{ matrix.ip_spec }}-1 + + + # This job validates the Spack recipe by making sure each cmake build option is represented + recipe-check: + runs-on: ubuntu-latest + + steps: + + - name: recipe-check + uses: NOAA-EMC/ci-check-spack-recipe@develop + with: + recipe-file: package/spack/package.py + cmakelists-txt: package/CMakeLists.txt + ignore-list: ENABLE_DOCS,FTP_TEST_FILES,FTP_LARGE_TEST_FILES,FTP_EXTRA_TEST_FILES diff --git a/.github/workflows/Spack.yml.old b/.github/workflows/Spack.yml.old deleted file mode 100644 index 9fd3910..0000000 --- a/.github/workflows/Spack.yml.old +++ /dev/null @@ -1,88 +0,0 @@ -# This is a CI workflow for the NCEPLIBS-grib_util project. -# -# This workflow builds grib_util with Spack, including installing with the "--test -# root" option to run the CTest suite. It also has a one-off job that validates -# the recipe by ensuring that every CMake option that should be set in the -# Spack recipe is so set. -# -# Alex Richert, Sep 2023 -name: Spack -on: - push: - branches: - - develop - pull_request: - branches: - - develop - -jobs: - # This job builds with Spack using every combination of variants and runs the CTest suite each time - Spack: - - strategy: - matrix: - os: ["ubuntu-latest"] - openmp: ["+openmp", "~openmp"] - ip_spec: ["^ip@5.0.0", "^ip@4.2.0 ^sp@2.4.0"] - runs-on: ${{ matrix.os }} - - steps: - - - name: checkout-grib-util - uses: actions/checkout@v4 - with: - path: grib-util - - - name: cache-spack - id: cache-spack - uses: actions/cache@v3 - with: - path: ~/spack-build-cache - key: spack-build-cache-${{ matrix.os }}-${{ matrix.ip_spec }}-1 - - - name: spack-build-and-test - run: | - git clone -c feature.manyFiles=true https://github.com/spack/spack - . spack/share/spack/setup-env.sh - spack env create grib-util-env - spack env activate grib-util-env - cp $GITHUB_WORKSPACE/grib-util/spack/package.py $SPACK_ROOT/var/spack/repos/builtin/packages/grib-util/package.py - spack develop --no-clone --path $GITHUB_WORKSPACE/grib-util grib-util@develop - spack add grib-util@develop%gcc@11 ${{ matrix.openmp }} ^bacio@2.6.0 ^w3emc@2.10.0 ^g2@develop ^g2c@develop +utils +build_v2_api ${{ matrix.ip_spec }} - spack external find cmake gmake - spack mirror add spack-build-cache ~/spack-build-cache - spack concretize - # Run installation and run CTest suite - spack install --fail-fast --no-check-signature --test root - # Print test results - cat $(spack location -i grib-util)/.spack/install-time-test-log.txt - # Run 'spack load' to check for obvious errors in setup_run_environment - echo "Loading grib-util through Spack..." - spack load grib-util - spack buildcache push --only dependencies --unsigned ~/spack-build-cache grib-util - - - name: Upload test results - uses: actions/upload-artifact@v3 - if: ${{ failure() }} - with: - name: spackci-ctest-output-${{ matrix.os }}-${{ matrix.openmp }} - path: ${{ github.workspace }}/grib-util/spack-build-*/Testing/Temporary/LastTest.log - - # This job validates the Spack recipe by making sure each cmake build option is represented - recipe-check: - runs-on: ubuntu-latest - - steps: - - - name: checkout-grib-util - uses: actions/checkout@v4 - with: - path: grib-util - - - name: recipe-check - run: | - echo "If this jobs fails, look at the most recently output CMake option below and make sure that option appears in spack/package.py" - for opt in $(grep -ioP '^option\(\K(?!(ENABLE_DOCS|FTP_TEST_FILES|FTP_LARGE_TEST_FILES|FTP_EXTRA_TEST_FILES))[^ ]+' $GITHUB_WORKSPACE/grib-util/CMakeLists.txt) ; do - echo "Checking for presence of '$opt' CMake option in package.py" - grep -cP "define.+\b${opt}\b" $GITHUB_WORKSPACE/grib-util/spack/package.py - done From 5750b2be132c2650198cf7209a02fb819757d0b8 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Tue, 4 Jun 2024 12:57:08 -0700 Subject: [PATCH 3/3] List applications using tocgrib2/super (#343) * List tocgrib2 users * list tocgrib2super users * add urls for tocgrib2 models * add urls to models for tocgrib2super --- src/tocgrib2/docs/user_guide.md | 22 +++++++++++++++++++++- src/tocgrib2super/docs/user_guide.md | 5 +++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/tocgrib2/docs/user_guide.md b/src/tocgrib2/docs/user_guide.md index cb5db77..a348092 100644 --- a/src/tocgrib2/docs/user_guide.md +++ b/src/tocgrib2/docs/user_guide.md @@ -1,4 +1,4 @@ -# tocgri2 +# tocgrib2 # Introduction @@ -15,6 +15,26 @@ they want the entire GRIB2 message containing the requested field field (extract=.true.). Both options return the same message if the requested field is the only field in the GRIB2 message. +This program is used by a number of operational applications, +including: + - ECMWF + - [Extra-Tropical Storm Surge (ETSS)](https://slosh.nws.noaa.gov/etsurge/) + - [Global Ensemble Forecast System (GEFS)](https://www.ncei.noaa.gov/products/weather-climate-models/global-ensemble-forecast) + - [Global Forecast System (GFS)](https://www.ncei.noaa.gov/products/weather-climate-models/global-forecast) + - [Gridded LAMP (GLMP)](https://vlab.noaa.gov/web/mdl/gridded-lamp) + - [Great Lakes Wave model (GLWU)](https://polar.ncep.noaa.gov/waves/index.php) + - [High-Resolution Window Forecast System (HiResW)](https://www.nco.ncep.noaa.gov/pmb/products/hiresw/) + - [High Resolution Ensemble Forecast (HREF)](https://mag.ncep.noaa.gov/model-guidance-model-parameter.php?group=Model%20Guidance&model=HREF&area=CONUS&ps=area) + - [High-Resolution Rapid Refresh (HRRR)](https://rapidrefresh.noaa.gov/hrrr/) + - [Localized Aviation MOS Program (LMP)](https://vlab.noaa.gov/web/mdl/lamp) + - [Nearshore Wave Prediction System (NWPS)](https://polar.ncep.noaa.gov/nwps/) + - [Rapid Refresh (RAP)](https://rapidrefresh.noaa.gov/) + - [Real-Time & Unrestricted Mesoscale Analysis (RTMA/URMA)](https://www.nco.ncep.noaa.gov/pmb/products/rtma/) + - [Real-Time Ocean Forecast System (RTOFS)](https://polar.ncep.noaa.gov/global/) + - seaice_analysis + - [Short-Range Ensemble Forecast (SREF)](https://www.nco.ncep.noaa.gov/pmb/products/sref/) + - [Wind Speed Probabilities (WSP)](https://www.nhc.noaa.gov/gis/) + ### Input Files - 5 namelist of grib fields and associated wmo headers. - 11 input grib2 file. diff --git a/src/tocgrib2super/docs/user_guide.md b/src/tocgrib2super/docs/user_guide.md index df52c04..157ebd1 100644 --- a/src/tocgrib2super/docs/user_guide.md +++ b/src/tocgrib2super/docs/user_guide.md @@ -18,6 +18,11 @@ requested field (extract=.true.). Both options return the same message if the requested field is the only field in the GRIB2 message. +This program is used by operational applications including: + - [Air Quality Model (AQM)](https://www.nco.ncep.noaa.gov/pmb/products/aqm/) + - [Gridded LAMP (GLMP)](https://vlab.noaa.gov/web/mdl/gridded-lamp) + - [Rapid Refresh (RAP)](https://rapidrefresh.noaa.gov/) + ### Input Files - 5 Namelist of grib fields and associated wmo headers.