Skip to content

Commit fa5a475

Browse files
authored
Merge pull request #55 from vincelhx/main
renaming
2 parents f18b784 + 6e343e5 commit fa5a475

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

grdwindinversion/inversion.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ def makeL2asOwi(xr_dataset, dual_pol, copol, crosspol, copol_gmf, crosspol_gmf,
226226
xr_dataset.owiNrcs_no_noise_correction.attrs[
227227
'comment'] = 'owiNrcs_no_noise_correction ; no recalibration'
228228

229+
if 'swath_number' in xr_dataset:
230+
xr_dataset = xr_dataset.rename({
231+
'swath_number' : 'owiSwathNumber',
232+
'swath_number_flag' : 'owiSwathNumberFlag'
233+
})
234+
229235
if "sigma0_raw__corrected" in xr_dataset:
230236
xr_dataset['owiNrcs_no_noise_correction_recalibrated'] = xr_dataset['sigma0_raw__corrected'].sel(pol=copol)
231237
xr_dataset.owiNrcs_no_noise_correction_recalibrated.attrs = xr_dataset.sigma0_raw__corrected.attrs
@@ -238,10 +244,7 @@ def makeL2asOwi(xr_dataset, dual_pol, copol, crosspol, copol_gmf, crosspol_gmf,
238244
xr_dataset.owiNrcs.attrs['definition'] = 'owiNrcs_no_noise_correction_recalibrated - owiNesz'
239245

240246

241-
xr_dataset = xr_dataset.rename({
242-
'swath_number' : 'owiSwathNumber',
243-
'swath_number_flag' : 'owiSwathNumberFlag'
244-
})
247+
245248

246249

247250
if dual_pol:

0 commit comments

Comments
 (0)