forked from geo-smart/deep-snow
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (74 loc) · 2.5 KB
/
batch_predict_ts.yml
File metadata and controls
78 lines (74 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Batch predict snow depth over many tiles
name: batch_sd_timeseries
run-name: predict sd ${{ inputs.begin_date }}-${{ inputs.end_date }}
on:
workflow_dispatch:
inputs:
begin_date:
type: string
required: true
description: earliest date to predict snow depths with format yyyymmdd
default: '20220101'
end_date:
type: string
required: true
description: most recent date to predict snow depths with format yyyymmdd
default: '20220301'
snow_off_day:
type: string
required: true
description: snow-off month and day (perhaps late summer) with format mmdd
default: '0901'
aoi:
type: string
required: true
description: area of interest in format 'minlon minlat maxlon maxlat'
default: '-108.20 37.55 -107.61 38.09'
cloud_cover:
type: string
required: true
description: percent cloud cover allowed in images (0-100)
default: '100'
use_ensemble:
type: choice
required: true
description: whether to use model ensemble
default: 'True'
options:
- 'True'
- 'False'
jobs:
# The output of this job is a JSON mapping for a matrix job
prep_dates:
runs-on: ubuntu-latest
outputs:
MATRIX: ${{ steps.prep_dates.outputs.MATRIX_PARAMS_COMBINATIONS }}
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v2
with:
cache-environment: true
environment-file: environment.yml
- name: Select dates over time range
id: prep_dates
run: |
python -u scripts/actions/prep_time_series.py ${{ inputs.begin_date }} ${{ inputs.end_date }} ${{ inputs.snow_off_day }}
# A matrix job that calls a reuseable workflow
prep_tiles:
needs: prep_dates
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.prep_dates.outputs.MATRIX) }}
name: ${{ matrix.target_date }}
uses: ./.github/workflows/batch_predict_sd.yml
with:
target_date: ${{ matrix.target_date }}
snow_off_date: ${{ matrix.snow_off_date }}
aoi: ${{ inputs.aoi }}
cloud_cover: ${{ inputs.cloud_cover }}
use_ensemble: ${{ inputs.use_ensemble }}