-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a FillValue for u, v to allow profile submission to IOOS #152
Conversation
As part of the if-loop where the profile-averaged glider speed u and v are defined, I added an else statement to set u and v to a FillValue defined in the metadata yaml file, if current speed isn't available (as is usually the case for realtime data).
…llvalue This merge updates dbdreader to correct a bug that was causes tests to fail.
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #152 +/- ##
==========================================
+ Coverage 79.21% 79.65% +0.43%
==========================================
Files 7 7
Lines 1376 1376
==========================================
+ Hits 1090 1096 +6
+ Misses 286 280 -6 ☔ View full report in Codecov by Sentry. |
@@ -67,6 +67,12 @@ def extract_timeseries_profiles(inname, outdir, deploymentyaml): | |||
|
|||
dss['v'] = dss.water_velocity_northward.mean() | |||
dss['v'].attrs = profile_meta['v'] | |||
elif ('water_velocity_eastward' not in dss.keys()) and ('_FillValue' in profile_meta['u']): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is '_FillValue'
usually? I'm not familiar with how that gets set up...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is not meta data do we want to fill with NaN anyways, or just not have the variable at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IOOS suggests -999 for a _FillValue, and it is specified in the variable-specific metadata for u and for v.
I think if we don't specify it in the metadata, we probably don't want the variable at all. That allows people who don't care about e.g. submitting to IOOS to run the code without unused variables taking up space in their netcdf files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats fine. Seems a little strange for FillValue to be a variable-specific metadata, but maybe different sensors need different fill values.
As part of the
if
loop where the profile-averaged glider speed u and v are defined, I added anelse
statement to set u and v to aFillValue
defined in the metadata yaml file, if ocean current speed isn't available (as is usually the case for realtime data).