Write L2 to file and leave all additional variable derivation for the L2toL3 step #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
types: [opened, reopened, synchronize, edited] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: process_l2_test | |
steps: | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
path: "main" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
python3 -m pip install --upgrade setuptools | |
cd $GITHUB_WORKSPACE/main | |
pip install . | |
- name: Clone AWS Level 0 data repo for testing | |
env: | |
GITLAB_TOKEN : ${{ secrets.GITLAB_TOKEN }} | |
run: | | |
cd $GITHUB_WORKSPACE | |
git clone --depth 1 https://oauth2:${{ env.GITLAB_TOKEN }}@geusgitlab.geus.dk/glaciology-and-climate/promice/aws-l0.git | |
- name: Run data processing | |
env: | |
TEST_STATION: KPC_U CEN2 JAR | |
shell: bash | |
run: | | |
mkdir $GITHUB_WORKSPACE/out/ | |
mkdir $GITHUB_WORKSPACE/out/L2/ | |
mkdir $GITHUB_WORKSPACE/out/L3/ | |
for i in $(echo ${{ env.TEST_STATION }} | tr ' ' '\n'); do | |
python3 $GITHUB_WORKSPACE/main/src/pypromice/process/get_l2.py -c $GITHUB_WORKSPACE/aws-l0/raw/config/$i.toml -i $GITHUB_WORKSPACE/aws-l0/raw -o $GITHUB_WORKSPACE/out/L2 | |
python3 $GITHUB_WORKSPACE/main/src/pypromice/process/get_l2tol3.py -i $GITHUB_WORKSPACE/out/L2/$i_10min.nc -o $GITHUB_WORKSPACE/out/L3 -t 10min | |
- name: Upload test output | |
uses: actions/upload-artifact@v3 | |
with: | |
name: result | |
path: out |