irfu / irfu-matlab

Matlab routines to work with space data, particularly with MMS and Cluster/CAA data. Also some general plasma routines.
56 stars 46 forks source link

SolO IRFU quickloooks: solo.read_TNR(): No handling of non-existent TNR CDFs #105

Closed ErikPGJ closed 1 year ago

ErikPGJ commented 1 year ago

Step 1: Latest code?

Step 2: Describe your environment

Step 3: Describe the problem

Crashes when making the call solo.qli.quicklooks_main_cron('/nonhome_data/work_files//SOLAR_ORBITER/irfu-matlab_qli/mission/solar_orbiter/+solo/irf_logo.png', '/data/solo/data_yuri/', '/home/erjo/temp/so_qli/so_qli_MTEST.2022-09-12_10.41.21.1_1_2022-08-08T00:00:00---2022-08-09T00:00:00', '1', '1', '2022-08-08T00:00:00', '2022-08-09T00:00:00');.

SPICE/MICE is OK
IRBEM .. not OK. Please contact IRFU if you need IRBEM for your intended use of irfu-matlab!
Operating system is OK
Matlab version is OK
CDF_LEAPSECONDSTABLE is OK
saving caching status
DB caching enabled
exception.message=No cdf files specified
dataobj, row 72
rcdf, row 229
read_TNR, row 53
quicklooks_24_6_2_h, row 203
quicklooks_24_6_2_h_local, row 314
quicklooks_main, row 151
quicklooks_main_cron, row 55

The reason is that solo.read_TNR()(via rcdf()) looks up "solo_L2_rpw-tnr-surv-cdag" files through explicit paths but does not have any functionality for handling the file not being found. Presumably, the same code is not called when isempty(data.Etnr) (solo.qli.quicklooks_24_6_2_h()), ths avoiding many (but not all) failure (@ErikPGJ's guess).

I have a temporary/final(?) bugfix for this in bc8b504b. But it seems ugly.

ErikPGJ commented 1 year ago

Closing with bc8b504b as the only solution.