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

Update read module coordinate dimension manipulations to use new xarray index #473

Merged
merged 15 commits into from
Nov 27, 2023

Conversation

JessicaS11
Copy link
Member

Since the data read-in module was built, xarray has added explicit indexing, which was causing a warning (read.py:599: UserWarning: rename 'delta_time' to 'photon_idx' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.) to appear during the reader.load() step when coordinate dimensions were manipulated internally. This PR updates that portion of the code to use .swap_dims, greatly simplifying it and removing the warning.

JessicaS11 and others added 15 commits September 25, 2023 11:45
* Adding argo search and download script

* Create get_argo.py

Download the 'classic' argo data with physical variables only

* begin implementing argo dataset

* 1st draft implementing argo dataset

* implement search_data for physical argo

* doctests and general cleanup for physical argo query

* beginning of BGC Argo download

* parse BGC profiles into DF

* plan to query BGC profiles

* validate BGC param input function

* order BGC params in order in which they should be queried

* fix bug in parse_into_df() - init blank df to take in union of params from all profiles

* identify profiles from initial API request containing all required params

* creates df with only profiles that contain all user specified params
Need to dload additional params

* modified to populate prof df by querying individual profiles

* finished up BGC argo download!

* assert bounding box type in Argo init, begin framework for unit tests

* Adding argo search and download script

* Create get_argo.py

Download the 'classic' argo data with physical variables only

* begin implementing argo dataset

* 1st draft implementing argo dataset

* implement search_data for physical argo

* doctests and general cleanup for physical argo query

* beginning of BGC Argo download

* parse BGC profiles into DF

* plan to query BGC profiles

* validate BGC param input function

* order BGC params in order in which they should be queried

* fix bug in parse_into_df() - init blank df to take in union of params from all profiles

* identify profiles from initial API request containing all required params

* creates df with only profiles that contain all user specified params
Need to dload additional params

* modified to populate prof df by querying individual profiles

* finished up BGC argo download!

* assert bounding box type in Argo init, begin framework for unit tests

* need to confirm spatial extent is bbox

* begin test case for available profiles

* add tests for argo.py

* add typing, add example json, and use it to test parsing

* update argo to submit successful api request (update keys and values submitted)

* first pass at porting argo over to metadata+per profile download (WIP)

* basic working argo script

* simplify parameter validation (ordered list no longer needed)

* add option to delete existing data before new download

* continue cleaning up argo.py

* fix download_by_profile to properly store all downloaded data

* remove old get_argo.py script

* remove _filter_profiles function in favor of submitting data kwarg in request

* start filling in docstrings

* clean up nearly duplicate functions

* add more docstrings

* get a few minimal argo tests working

* add bgc argo params. begin adding merge for second download runs

* some changes

* WIP test commit to see if can push to GH

* WIP handling argo merge issue

* update profile to df to return df and move merging to get_dataframe

* merge profiles with existing df

* clean up docstrings and code

* add test_argo.py

* add prelim test case for adding to Argo df

* remove sandbox files

* remove bgc argo test file

* update variables notebook from development

* simplify import statements

* quickfix for granules error

* draft subpage on available QUEST datasets

* small reference fix in text

* add reference to top of .rst file

* test argo df merge

* add functionality to Quest class to pass search criteria to all datasets

* add functionality to Quest class to pass search criteria to all datasets

* update dataset docstrings; reorder argo.py to match

* implement quest search+download for IS2

* move spatial and temporal properties from query to genquery

* add query docstring test for cycles,tracks to test file

* add quest test module

* standardize print outputs for quest search and download; is2 download needs auth updates

* remove extra files from this branch

* comment out argo portions of quest for PR

* remove argo-branch-only init file

* remove argo script from branch

* remove argo test file from branch

* comment out another line of argo stuff

* Update quest.py

Added Docstrings to functions within quest.py and edited the primary docstring for the QUEST class here.

Note I did not add Docstrings to the implicit __self__ function.

* Update test_quest.py

Added comments (not Docstrings) to test functions

* Update dataset.py

Minor edits to the doc strings

* Update quest.py

Edited docstrings

* catch error with downloading datasets in Quest; template test case for multi dataset query

---------

Co-authored-by: Kelsey Bisson <[email protected]>
Co-authored-by: Romina <[email protected]>
Co-authored-by: zachghiaccio <[email protected]>
Co-authored-by: Zach Fair <[email protected]>
* add OA API warning
* comment out tests that use OA API

---------

Co-authored-by: GitHub Action <[email protected]>
---------

Co-authored-by: GitHub Action <[email protected]>
* add filelist and product properties to Read object
* deprecate filename_pattern and product class Read inputs
* transition to data_source input as a string (including glob string) or list
* update tutorial with changes and user guidance for using glob

---------
Co-authored-by: Jessica Scheick <[email protected]>
* add kwarg acceptance for data queries and download_all in quest
* Add QUEST dataset page to RTD

---------

Co-authored-by: zachghiaccio <[email protected]>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Jessica Scheick <[email protected]>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Jessica Scheick <[email protected]>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Jessica Scheick <[email protected]>
Refactor Variables class to be user facing functionality
Copy link

Binder 👈 Launch a binder notebook on this branch for commit 9bcfd09

I will automatically update this comment whenever this PR is modified

@JessicaS11 JessicaS11 requested a review from weiji14 November 20, 2023 22:34
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, great to see that the code can be simplified (#222 was a mess)! I haven't tested this locally, but the unit tests are passing so should be fine 🤞

@JessicaS11 JessicaS11 merged commit e8e12e6 into development Nov 27, 2023
5 checks passed
@JessicaS11 JessicaS11 deleted the xarrayplay branch November 27, 2023 18:10
JessicaS11 added a commit that referenced this pull request Jan 5, 2024
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.

4 participants