-
Notifications
You must be signed in to change notification settings - Fork 0
158 lines (145 loc) · 4.44 KB
/
insar_pair.yml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# Extract bursts from pair of SLCs and run InSAR processing
name: InSAR_Pair
run-name: ${{ inputs.burstId }}
on:
workflow_dispatch:
inputs:
reference:
type: string
required: true
description: Reference SLC
default: S1A_IW_SLC__1SDV_20230621T121402_20230621T121429_049084_05E705_BAD8
secondary:
type: string
required: true
description: Secondary SLC
default: S1A_IW_SLC__1SDV_20230703T121403_20230703T121430_049259_05EC58_F9AB
burstId:
type: string
required: true
description: Secondary SLC
default: 012_023790_IW1
polarization:
type: choice
required: true
description: Polarization
default: 'VV'
options: ['VV', 'VH', 'HH']
looks:
type: choice
required: true
description: Range x Azimuth Looks
default: 20x4
options:
- 20x4
- 10x2
- 5x1
jobname:
type: string
required: false
description: Shorthand jobname (e.g. 20230621_20230703)
default: hyp3-isce2
environment:
type: environment
required: false
description: Environment that defines output location
default: production
# Must duplicate inputs for workflow_call (https://github.com/orgs/community/discussions/39357)
workflow_call:
inputs:
reference:
type: string
required: true
secondary:
type: string
required: true
burstId:
type: string
required: true
polarization:
type: string
required: true
looks:
type: string
required: true
jobname:
type: string
required: false
environment:
type: string
required: false
default: production
jobs:
hyp3-isce2:
environment: ${{ inputs.environment }}
name: ${{ inputs.jobname }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
repository: 'relativeorbit/hyp3-isce2'
ref: 'fufiters'
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v2
with:
cache-environment: true
environment-file: environment.yml
- name: Development install
run: pip install -e .
- name: Configure AWS Credentials
if: ${{ inputs.environment != 'testing' }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Copy Custom topsApp XML config
continue-on-error: true
run: |
wget https://raw.githubusercontent.com/relativeorbit/workflows/main/fufiters.xml
cat fufiters.xml
- name: Cache DEM for Burst
uses: actions/cache@v4
with:
path: ./dem
key: dem-${{ inputs.burstId }}
- name: Run Hyp3-ISCE2
env:
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD}}
ESA_USERNAME: ${{ secrets.ESA_USERNAME }}
ESA_PASSWORD: ${{ secrets.ESA_PASSWORD}}
run: |
python -m hyp3_isce2 ++process insar_tops_fufiters \
${{ inputs.reference }} \
${{ inputs.secondary }} \
--burstId ${{ inputs.burstId }} \
--polarization ${{ inputs.polarization }} \
--looks ${{ inputs.looks }} \
--apply-water-mask False \
--offsets False
- name: Get Dates for Output Subfolder Name
env:
REF: ${{ inputs.reference }}
SEC: ${{ inputs.secondary }}
run: |
PREFIX=${REF:17:8}_${SEC:17:8}
echo "PREFIX=${PREFIX}" >> $GITHUB_ENV
- name: Upload to AWS S3
if: ${{ inputs.environment != 'testing' }}
env:
BURSTID: ${{ inputs.burstId }}
BUCKET: ${{ vars.BUCKET_PREFIX }}
run: |
OUTDIR=`ls -d S1_*`
cp topsApp.xml $OUTDIR
aws s3 sync $OUTDIR $BUCKET/insar/$BURSTID/$PREFIX/$OUTDIR
- name: Upload to GitHub Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.PREFIX }}
path: S1_*FFTS