Skip to content
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

Merged
merged 3 commits into from
Jun 16, 2023

Conversation

hvdosser
Copy link
Collaborator

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 ocean current speed isn't available (as is usually the case for realtime data).

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).
@callumrollo callumrollo mentioned this pull request Jun 14, 2023
@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.43 🎉

Comparison is base (469fc59) 79.21% compared to head (fae4226) 79.65%.

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     

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -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']):
Copy link
Member

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...

Copy link
Member

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?

Copy link
Collaborator Author

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.

Copy link
Member

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.

@jklymak jklymak merged commit bc16ef4 into c-proof:main Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants