Skip to content

Download and Process CMC Grib2 Files #880

Download and Process CMC Grib2 Files

Download and Process CMC Grib2 Files #880

name: Download and Process CMC Grib2 Files
on:
push:
branches:
- "feat/daily-grib2-download"
# cron schedules are in UTC
# this job should run at 5.31 am pst, which translates to 1.31 pm.
schedule:
- cron: '31 13 * * *'
workflow_dispatch:
repository_dispatch:
types: run-cmc-grib-download
jobs:
dl_cansip_grib2:
defaults:
run:
shell: bash
name: 'Download and Process CMC Grib2 Files'
runs-on: ubuntu-22.04
environment: RUN
env:
OBJ_STORE_BUCKET: ${{ secrets.OBJ_STORE_BUCKET }}
OBJ_STORE_SECRET: ${{ secrets.OBJ_STORE_SECRET }}
OBJ_STORE_USER: ${{ secrets.OBJ_STORE_USER }}
OBJ_STORE_HOST: ${{ secrets.OBJ_STORE_HOST }}
WGRIB_UTILITY: /usr/local/bin/wgrib2
steps:
- uses: actions/checkout@v3
id: checkout
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- id: install_dependencies
name: install python dependencies
shell: bash
run: |
pip install --upgrade pip
pip install -r scripts/requirements.txt
- id: get_wgrib_2
name: get the wgrib2 binary
shell: bash
run: |
curl -o wgrib2 -L https://github.com/franTarkenton/wgrib2-Cygwin-Build/releases/download/20230203-0000/wgrib2
chmod +x wgrib2
mv wgrib2 $WGRIB_UTILITY
- id: download_cmc_grib
name: download grib files
shell: bash
env:
DATESTR: ${{ github.event.client_payload.idem_key }}
run: |
python scripts/src/main_cmc.py $DATESTR
# - id: debug
# name: debug and list files
# shell: bash
# run: |
# ls -la