@@ -180,6 +180,9 @@ def wind3dp_download(dataset, startdate, enddate, path=None, **kwargs):
180
180
if not os .path .exists (f ):
181
181
# downloaded_file = Fido.fetch(result[0][i], path=path, max_conn=max_conn)
182
182
downloaded_file = wind3dp_single_download (files [i ], path = path )
183
+ if downloaded_file == []:
184
+ print ('Trying download from CDAWeb...' )
185
+ downloaded_file = Fido .fetch (result [0 ][i ], path = path ) #, max_conn=max_conn)
183
186
184
187
except (RuntimeError , IndexError ):
185
188
print (f'Unable to obtain "{ dataset } " data for { startdate } -{ enddate } !' )
@@ -288,13 +291,18 @@ def wind3dp_load(dataset, startdate, enddate, resample="1min", multi_index=True,
288
291
energies ['Bins_Text' ]= np .around (e_low / 1e3 , 2 ).astype ('string' ) + ' - ' + np .around (e_high / 1e3 , 2 ).astype ('string' ) + ' keV'
289
292
290
293
meta = {'channels_dict_df' : energies ,
291
- 'APPROX_ENERGY_LABELS' : metacdf .varget ('APPROX_ENERGY_LABELS' ),
292
294
'ENERGY_UNITS' : metacdf .varattsget ('ENERGY' )['UNITS' ],
293
295
'FLUX_UNITS' : metacdf .varattsget ('FLUX' )['UNITS' ],
294
296
'FLUX_FILLVAL' : metacdf .varattsget ('FLUX' )['FILLVAL' ],
295
- 'FLUX_LABELS' : metacdf .varget ('FLUX_ENERGY_LABL' ),
296
297
}
297
298
299
+ # for SFSP, SOSP, SFPD, SFSP:
300
+ try :
301
+ meta ['APPROX_ENERGY_LABELS' ] = metacdf .varget ('APPROX_ENERGY_LABELS' )
302
+ meta ['FLUX_LABELS' ] = metacdf .varget ('FLUX_ENERGY_LABL' )
303
+ except :
304
+ pass
305
+
298
306
# create multi-index data frame of flux
299
307
if multi_index :
300
308
if dataset == 'WI_SFPD_3DP' or dataset == 'WI_SOPD_3DP' :
0 commit comments