Skip to content

Commit

Permalink
update concise notebook add additional drop variables (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Feb 15, 2023
1 parent 938eb04 commit 5093ab6
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions jupyter_notebooks/harmony_concise_api_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,18 @@
"else:\n",
" group = group[0]\n",
" \n",
"drop_variables = [\n",
" 'time',\n",
" 'sample',\n",
" 'meas_ind',\n",
" 'wvf_ind',\n",
" 'ddm'\n",
"]\n",
" \n",
"try:\n",
" ds = xr.open_dataset(filename, group=group, decode_times=False)\n",
"except xr.core.variable.MissingDimensionsError:\n",
" ds = xr.open_dataset(filename, group=group, decode_times=False, drop_variables=['time','sample'])\n",
" ds = xr.open_dataset(filename, group=group, decode_times=False, drop_variables=drop_variables)\n",
"\n",
"print(list(ds.variables))\n",
" \n",
Expand Down Expand Up @@ -273,13 +281,17 @@
" x = \"longitude\"\n",
"elif \"beam_clon\" in variables:\n",
" x = \"beam_clon\"\n",
"elif \"sp_lon\" in variables:\n",
" x = \"sp_lon\"\n",
" \n",
"if \"lat\" in variables:\n",
" y = \"lon\"\n",
"elif \"latitude\" in variables:\n",
" y = \"longitude\"\n",
"elif \"beam_clat\":\n",
"elif \"beam_clat\" in variables:\n",
" y = \"beam_clat\"\n",
"elif \"sp_lat\" in variables:\n",
" y = \"sp_lat\"\n",
" \n",
"for index in range(0, max_results):\n",
" \n",
Expand Down

0 comments on commit 5093ab6

Please sign in to comment.