-
Notifications
You must be signed in to change notification settings - Fork 36
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 primitive match return function to CDMS reader #260
base: develop
Are you sure you want to change the base?
Conversation
tools/cdms/cdms_reader.py
Outdated
sec_lat.append(float(secondary.lat[int(y)].values)) | ||
sec_time.append(float(secondary.time[int(y)].values)) | ||
sec_speed.append(float(secondary.wind_speed[int(y)].values)) | ||
sec_dir.append(float(secondary.wind_to_direction[int(y)].values)) |
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.
@alovett-COAPS This change to the reader appears to be specific just for the primary = sst and secondary = wind use case. This reader should be generic to support any variable(s). In the use case where secondary is an in situ source there can be also be multiple variables returned.
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.
Updated function to support more use cases than just the wind-sst matchup, updated documentation to reflect changes.
tools/cdms/README.md
Outdated
@@ -14,7 +14,7 @@ Imported packages: | |||
* csv | |||
* collections | |||
* logging | |||
* xarray |
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.
@alovett-COAPS It appears xarray isn't used at all in cdms_reader.py so I think we should remove it as a dependency.
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.
Looks good. Thanks Amanda!
Fulfils requirement from SDAP-470- adding in functionality to cdms_reader.py to return matches in an alternate, simplified format