gridding updates#248
Conversation
| skip_vars = {'time', lat_varname, lon_varname, depth_varname, profile_index_varname} | ||
| skip_vars = { | ||
| 'time', lat_varname, lon_varname, depth_varname, profile_index_varname, | ||
| "distance_over_ground", "DISTANCE_OVER_GROUND", |
There was a problem hiding this comment.
I tried to do this in some way other than adding both 'distance_over_ground' and 'DISTANCE_OVER_GROUND' to skip_vars (eg, using utils._resolve_role), but couldn't figure out how
There was a problem hiding this comment.
I think if we look at the OG1 files we will see an entry for DISTANCE_OVER_GROUND
DISTANCE_OVER_GROUND:
processing_method:
distance_over_ground:
latitude: LATITUDE
longitude: LONGITUDE
long_name: Distance over ground flown since mission start
units: km
I think this should gain a processing_role: distance_over_ground and then the "default" distance over ground should also get that processing role.
There was a problem hiding this comment.
Makes sense. I added processing_role: distance_over_ground to the example slocum/seaexplorer OG1 yml files, and updated the gridding code to use utils._resolve_role for dog.
and then the "default" distance over ground should also get that processing role.
I think this means to add 'distance_over_ground' to the 'known_roles' block in _get_varnames, so I added it there (original shown below). But please redirect me as needed
def _get_varnames(deployment):
...
known_roles = {
'time', 'latitude', 'longitude', 'pressure', 'temperature',
'conductivity', 'salinity', 'depth', 'profile_index',
'profile_direction', 'oxygen_concentration',
}
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #248 +/- ##
==========================================
+ Coverage 68.02% 68.11% +0.08%
==========================================
Files 15 15
Lines 2549 2562 +13
==========================================
+ Hits 1734 1745 +11
- Misses 815 817 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| ds[profile_index_varname].values[good], | ||
| ds[td].values[good], | ||
| statistic='mean', | ||
| statistic=method, |
There was a problem hiding this comment.
Used method to be consistent with the for k in ds.keys(): block, even though the for td, bin_stat in profile_lookup.items(): uses bin_stat as the varname instead.
Update: I also switched from bin_stat to method in the for td, bin_stat in profile_lookup.items(): block, to be consistent throughout the function.
Addresses #226
ds[k].attrs.keys(), rather than inds[k].attrs.values().