SEE-GEO / ccic

Chalmers Cloud Ice Climatology
MIT License
1 stars 2 forks source link

Dataset has no attribute 'iwp' when generating the training data #9

Closed adriaat closed 1 year ago

adriaat commented 1 year ago

When generating the training data, the following error is raised:

ccic.bin.extract_training_data (ERROR     ) :: The following error was encountered while processing CloudSat granule '574':
 'Dataset' object has no attribute 'iwp'

The tests do not pass either.

simonpf commented 1 year ago

I observed this issue to occur when there is a 2BCLDCLASS file but no 2CIce file. My suspicion is that the differences in availability are due to 2CIce using the Lidar observations, while 2BCLDLASS doesn't.

Currently this just causes the extraction of training samples to fail where no 2CIce file is available. I think this is reasonable behavior given that we focus on IWP. I can add a fix later that doesn't consider these cases and thus avoids the error.

adriaat commented 1 year ago

Ok, great if you can add a fix later that avoids these cases. I couldn't find a way to solve it quickly.

Nice work in 3ac01727eb4413253715c0934947cdc29011d7d1. Some of the fixes there were done in the issue_9 branch, now deleted as it was redundant with the main branch.

adriaat commented 1 year ago

A side comment on the tests, since this issue is about the presence of iwp in the object. Few variables are defined in the tests but not used for anything. We can clean that up if needed.

simonpf commented 1 year ago

This should be fixed with 021ec4d962faaea9a742eb5c5ec165976c23b039. Closing for now.