Skip to content

Commit

Permalink
update variable names for clarity and in line with common usage (#211)
Browse files Browse the repository at this point in the history
* change 'dataset' to 'product' in core and test code
* update 'source' input parameter to 'path' in variables module (part of a not-yet-implemented feature).
  • Loading branch information
JessicaS11 authored Jul 7, 2021
1 parent 808296c commit 6cf5d8f
Show file tree
Hide file tree
Showing 14 changed files with 200 additions and 177 deletions.
38 changes: 19 additions & 19 deletions examples/ICESat-2_DAAC_DataAccess2_Subsetting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -58,12 +58,12 @@
"source": [
"### Create a query object and log in to Earthdata\n",
"\n",
"For this example, we'll be working with a sea ice dataset (ATL09) for an area along West Greenland (Disko Bay)."
"For this example, we'll be working with a sea ice product (ATL09) for an area along West Greenland (Disko Bay)."
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -86,12 +86,12 @@
"source": [
"### Discover Subsetting Options\n",
"\n",
"You can see what subsetting options are available for a given dataset by calling `show_custom_options()`. The options are presented as a series of headings followed by available values in square brackets. Headings are:\n",
"* **Subsetting Options**: whether or not temporal and spatial subsetting are available for the dataset\n",
"You can see what subsetting options are available for a given product by calling `show_custom_options()`. The options are presented as a series of headings followed by available values in square brackets. Headings are:\n",
"* **Subsetting Options**: whether or not temporal and spatial subsetting are available for the data product\n",
"* **Data File Formats (Reformatting Options)**: return the data in a format other than the native hdf5 (submitted as a key=value kwarg to `order_granules(format='NetCDF4-CF')`)\n",
"* **Data File (Reformatting) Options Supporting Reprojection**: return the data in a reprojected reference frame. These will be available for gridded ICESat-2 L3B datasets.\n",
"* **Data File (Reformatting) Options Supporting Reprojection**: return the data in a reprojected reference frame. These will be available for gridded ICESat-2 L3B data products.\n",
"* **Data File (Reformatting) Options NOT Supporting Reprojection**: data file formats that cannot be delivered with reprojection\n",
"* **Data Variables (also Subsettable)**: a dictionary of variable name keys and the paths to those variables available in the dataset"
"* **Data Variables (also Subsettable)**: a dictionary of variable name keys and the paths to those variables available in the product"
]
},
{
Expand Down Expand Up @@ -131,23 +131,23 @@
"source": [
"## About Data Variables in a query object\n",
"There are two possible variable parameters associated with each ```query``` object.\n",
"1. `order_vars`, which is for interacting with variables during data querying, ordering, and downloading activities. `order_vars.wanted` holds the user's list to be submitted to the NSIDC subsetter and download a smaller, reproducible dataset.\n",
"1. `order_vars`, which is for interacting with variables during data querying, ordering, and downloading activities. `order_vars.wanted` holds the user's list to be submitted to the NSIDC subsetter and download a smaller, reproducible subset of the data product.\n",
"2. `file_vars`, which is for interacting with variables associated with local files [not yet implemented].\n",
"\n",
"Each variables parameter (which is actually an associated Variables class object) has methods to:\n",
"* get available variables, either available from the NSIDC or the file (`avail()` method/attribute).\n",
"* append new variables to the wanted list (`append()` method).\n",
"* remove variables from the wanted list (`remove()` method).\n",
"\n",
"Each variables instance also has a set of attributes, including `avail` and `wanted` to indicate the list of variables that is available (unmutable, or unchangeable, as it is based on the input dataset specifications or files) and the list of variables that the user would like extracted (updateable with the `append` and `remove` methods), respectively. We'll showcase the use of all of these methods and attributes below."
"Each variables instance also has a set of attributes, including `avail` and `wanted` to indicate the list of variables that is available (unmutable, or unchangeable, as it is based on the input product specifications or files) and the list of variables that the user would like extracted (updateable with the `append` and `remove` methods), respectively. We'll showcase the use of all of these methods and attributes below."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### ICESat-2 data variables\n",
"ICESat-2 data is natively stored in a nested file format called hdf5. Much like a directory-file system on a computer, each variable (file) has a unique path through the heirarchy (directories) within the file. Thus, some variables (e.g. `'latitude'`, `'longitude'`) have multiple paths (one for each of the six beams in most datasets). \n",
"ICESat-2 data is natively stored in a nested file format called hdf5. Much like a directory-file system on a computer, each variable (file) has a unique path through the heirarchy (directories) within the file. Thus, some variables (e.g. `'latitude'`, `'longitude'`) have multiple paths (one for each of the six beams in most products). \n",
"\n",
"To increase readability, some display options (2 and 3, below) show the 200+ variable + path combinations as a dictionary where the keys are variable names and the values are the paths to that variable.\n",
"\n",
Expand All @@ -172,7 +172,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"By passing the boolean `options=True` to the `avail` method, you can obtain lists of unique possible variable inputs (var_list inputs) and path subdirectory inputs (keyword_list and beam_list inputs) for your dataset. These can be helpful for building your wanted variable list."
"By passing the boolean `options=True` to the `avail` method, you can obtain lists of unique possible variable inputs (var_list inputs) and path subdirectory inputs (keyword_list and beam_list inputs) for your data product. These can be helpful for building your wanted variable list."
]
},
{
Expand All @@ -199,14 +199,14 @@
"source": [
"### Building your wanted variable list\n",
"\n",
"Now that you know which variables and path components are available for your dataset, you need to build a list of the ones you'd like included in your dataset. There are several options for generating your initial list as well as modifying it, giving the user complete control over the list submitted.\n",
"Now that you know which variables and path components are available for your product, you need to build a list of the ones you'd like included. There are several options for generating your initial list as well as modifying it, giving the user complete control over the list submitted.\n",
"\n",
"The options for building your initial list are:\n",
"1. Use a default list for the dataset (not yet fully implemented across all datasets. Have a default variable list for your field/dataset? Submit a pull request or post it as an issue on GitHub!)\n",
"1. Use a default list for the product (not yet fully implemented across all products. Have a default variable list for your field/product? Submit a pull request or post it as an issue on GitHub!)\n",
"2. Provide a list of variable names\n",
"3. Provide a list of profiles/beams or other path keywords, where \"keywords\" are simply the unique subdirectory names contained in the full variable paths of the dataset. A full list of available keywords for the dataset is displayed in the error message upon entering `keyword_list=['']` into the `append` function (see below for an example) or by running `region_a.order_vars.avail(options=True)`, as above\n",
"3. Provide a list of profiles/beams or other path keywords, where \"keywords\" are simply the unique subdirectory names contained in the full variable paths of the product. A full list of available keywords for the product is displayed in the error message upon entering `keyword_list=['']` into the `append` function (see below for an example) or by running `region_a.order_vars.avail(options=True)`, as above\n",
"\n",
"Note: all datasets have a short list of \"mandatory\" variables/paths (containing spacecraft orientation and time information needed to convert the data's `delta_time` to a readable datetime) that are automatically added to any built list. If you have any recommendations for other variables that should always be included (e.g. uncertainty information), please let us know!\n",
"Note: all products have a short list of \"mandatory\" variables/paths (containing spacecraft orientation and time information needed to convert the data's `delta_time` to a readable datetime) that are automatically added to any built list. If you have any recommendations for other variables that should always be included (e.g. uncertainty information), please let us know!\n",
"\n",
"Examples of using each method to build and modify your wanted variable list are below."
]
Expand Down Expand Up @@ -234,7 +234,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The keywords available for this dataset are shown in the error message upon entering a blank keyword_list, as seen in the next cell."
"The keywords available for this product are shown in the error message upon entering a blank keyword_list, as seen in the next cell."
]
},
{
Expand All @@ -253,7 +253,7 @@
"### Modifying your wanted variable list\n",
"\n",
"Generating and modifying your variable request list, which is stored in `region_a.order_vars.wanted`, is controlled by the `append` and `remove` functions that operate on `region_a.order_vars.wanted`. The input options to `append` are as follows (the full documentation for this function can be found by executing `help(region_a.order_vars.append)`).\n",
"* `defaults` (default False) - include the default variable list for your dataset (not yet fully implemented for all datasets; please submit your default variable list for inclusion!)\n",
"* `defaults` (default False) - include the default variable list for your product (not yet fully implemented for all products; please submit your default variable list for inclusion!)\n",
"* `var_list` (default None) - list of variables (entered as strings)\n",
"* `beam_list` (default None) - list of beams/profiles (entered as strings)\n",
"* `keyword_list` (default None) - list of keywords (entered as strings); use `keyword_list=['']` to obtain a list of available keywords\n",
Expand Down Expand Up @@ -539,7 +539,7 @@
"source": [
"## Check the variable list in your downloaded file\n",
"\n",
"Compare the available variables associated with the full dataset relative to those in your downloaded data file."
"Compare the available variables associated with the full product relative to those in your downloaded data file."
]
},
{
Expand All @@ -557,7 +557,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Check the downloaded dataset\n",
"#### Check the downloaded data\n",
"Get all `latitude` variables in your downloaded file:"
]
},
Expand Down
Loading

0 comments on commit 6cf5d8f

Please sign in to comment.