Merged
Conversation
For HALO-(AC)3, some sondes seem to have landed on ice. For example, 3 sondes in the 5-sonde circle flown close to the pole (last flight of the campaign, 20220412). Therefore, they kept transmitting data from the surface (outside of their design to sink, which they couldn't in this case). This causes problems with QC. The function added by this commit should detect if the sonde is a floater. To determine if a sonde is a floater is difficult with an algorithm because "floaters" behave quite differently. I decided to go for a simple check, i.e. if the gpsalt (altitude from gps) and pressure (pres) has not changed (by more than 1 m and 1 hPa, respectively) in a user-decided number of consecutive timesteps (default 3) for measurements at the surface (decided by gpsalt_threshold, default 25m), then the sonde is a floater. This is not perfect, but it should work for most cases. The function adds an attribute `is_floater`(True/False) and if that is True, it will also add another attribute `landing_time`. The latter attribute will be used to restrict measurements from the sonde to the time before it landed, for QC and for inclusion in to L2 and onwards.
6 tasks
if a sonde is detected as a floater, this method will create another attr called `cropped_aspen_ds` which will be the same xr.Dataset as `aspen_ds` except the time coordinates will be cut-off where greater than the `landing_time` attr. this is so that later on, QC checks (e.g. profile_fullness) and data levels from L2 onwards can use the cropped_aspen_ds for floaters.
if the sonde is a floater, then the data after landing shouldn't go past QC. Therefore, for L2 and onwards, the dataset would be ASPEN cropped to landing time, i.e. the `cropped_aspen_ds` attribute created with the `crop_aspen_ds_to_landing_time` method. This is so that users do not have to deal with problems that usually come around with floaters. Of course, it is important to know when the ASPEN dataset (i.e. L1) has been changed because the sonde was a floater. Therefore, every L2 file will now carry a global attribute called `is_floater` which will indicate if the sonde is a floater.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For HALO-(AC)3, some sondes seem to have landed on ice. For example, 3 sondes in the 5-sonde circle flown close to the pole (last flight of the campaign, 20220412). Therefore, they kept transmitting data from the surface (outside of their design to sink, which they couldn't in this case). This causes problems with QC.
The function added by this commit should detect if the sonde is a floater.
To determine if a sonde is a floater is difficult with an algorithm because "floaters" behave quite differently. I decided to go for a simple check, i.e. if the gpsalt (altitude from gps) and pressure (pres) has not changed (by more than 1 m and 1 hPa, respectively) in a user-decided number of consecutive timesteps (default 3) for measurements at the surface (decided by gpsalt_threshold, default 25m), then the sonde is a floater.
This is not perfect, but it should work for most cases. The function adds an attribute
is_floater(True/False) and if that is True, it will also add another attributelanding_time. The latter attribute will be used to restrict measurements from the sonde to the time before it landed, for QC and for inclusion in to L2 and onwards.