6
6
workflow_dispatch :
7
7
inputs :
8
8
cloud_cover :
9
- type : choice
9
+ type : string
10
10
required : true
11
- description : percent cloud cover allowed in images
11
+ description : percent cloud cover allowed in images (0-100)
12
12
default : ' 10'
13
13
start_month :
14
14
type : choice
50
50
S2_search :
51
51
runs-on : ubuntu-latest
52
52
outputs :
53
- BURST_IDS : ${{ steps.asf-search .outputs.BURST_IDS }}
54
- MATRIX : ${{ steps.asf-search .outputs.MATRIX_PARAMS_COMBINATIONS }}
53
+ BURST_IDS : ${{ steps.S2_search .outputs.IMAGE_DATES }}
54
+ MATRIX : ${{ steps.S2_search .outputs.MATRIX_PARAMS_COMBINATIONS }}
55
55
defaults :
56
56
run :
57
57
shell : bash -el {0}
@@ -95,21 +95,23 @@ jobs:
95
95
[75.42382800808971,36.41082887114753]]]
96
96
}
97
97
98
- # We use the api from element84 to query the data
98
+ # Use the api from element84 to query the data
99
99
URL = "https://earth-search.aws.element84.com/v1"
100
100
catalog = pystac_client.Client.open(URL)
101
101
102
102
search = catalog.search(
103
103
collections=["sentinel-2-l2a"],
104
104
intersects=bbox,
105
- query={"eo:cloud_cover": {"lt": ${{ inputs.cloud_cover }}}}, # less than 10% cloud cover
105
+ query={"eo:cloud_cover": {"lt": ${{ inputs.cloud_cover }}}}
106
106
)
107
107
108
108
# Check how many items were returned
109
109
items = search.item_collection()
110
110
print(f"Returned {len(items)} Items")
111
111
112
+ # create xarray dataset without loading data
112
113
sentinel2_stack = stackstac.stack(items)
114
+ # filter to specified month range
113
115
sentinel2_stack_snowoff = sentinel2_stack.where((sentinel2_stack.time.dt.month >= ${{ inputs.start_month }}) & (sentinel2_stack.time.dt.month <= ${{ inputs.stop_month }}), drop=True)
114
116
115
117
image_dates = sentinel2_stack_snowoff.time.dt.strftime('%Y-%m-%d').values.tolist()
@@ -127,23 +129,19 @@ jobs:
127
129
print(f'number of image pairs: {len(pairs)}')
128
130
129
131
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
130
- print(f'BURST_IDS ={image_dates}', file=f)
132
+ print(f'IMAGE_DATES ={image_dates}', file=f)
131
133
print(f'MATRIX_PARAMS_COMBINATIONS={matrixJSON}', file=f)
132
134
133
- #STOPPED HERE 5/29/2024
134
135
135
136
# A matrix job that calls a reuseable workflow
136
- hyp3-isce2 :
137
- needs : searchASF
137
+ autoRIFT :
138
+ needs : S2_search
138
139
strategy :
139
140
fail-fast : false
140
- matrix : ${{ fromJson(needs.searchASF .outputs.MATRIX) }}
141
+ matrix : ${{ fromJson(needs.S2_search .outputs.MATRIX) }}
141
142
name : ${{ matrix.name }}
142
- uses : ./.github/workflows/single-job .yml
143
+ uses : ./.github/workflows/image_correlation_pair .yml
143
144
with :
144
- reference : ${{ matrix.reference }}
145
- secondary : ${{ matrix.secondary }}
146
- looks : ${{ inputs.looks }}
147
- apply_water_mask : ${{ inputs.apply_water_mask }}
145
+ img1_date : ${{ matrix.img1_date }}
146
+ img2_date : ${{ matrix.img2_date }}
148
147
workflow_name : ${{ matrix.name }}
149
- secrets : inherit
0 commit comments