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

User Guide for from_file function #1047

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d42d090
o Guide for from_file function
rajeeja Oct 29, 2024
e9a5497
Merge branch 'main' into rajeeja/from_file_notebook
rajeeja Oct 29, 2024
db05839
o Add better examples for geojson and shapefile
rajeeja Oct 31, 2024
db2e806
Merge branch 'rajeeja/from_file_notebook' of github.com:UXARRAY/uxarr…
rajeeja Oct 31, 2024
cf666b7
Merge branch 'main' into rajeeja/from_file_notebook
rajeeja Oct 31, 2024
2b609c0
Merge branch 'main' into rajeeja/from_file_notebook
rajeeja Nov 6, 2024
0a48fab
o Add to guide
rajeeja Nov 8, 2024
0a0ac6f
o Plot NetCDF
rajeeja Nov 8, 2024
7b1bdf4
Merge branch 'main' into rajeeja/from_file_notebook
rajeeja Nov 8, 2024
338f6f3
Added shapefile remapping example
aaronzedwick Nov 8, 2024
37e4e8e
Updated remapping section
aaronzedwick Nov 8, 2024
a4e3265
Merge branch 'main' into rajeeja/from_file_notebook
aaronzedwick Nov 8, 2024
87024ec
Added plot titles
aaronzedwick Nov 8, 2024
db08979
Merge branch 'rajeeja/from_file_notebook' of https://github.com/UXARR…
aaronzedwick Nov 8, 2024
33e541c
Merge branch 'rajeeja/from_file_notebook' of github.com:UXARRAY/uxarr…
rajeeja Nov 8, 2024
8e4490d
Updated notebook
aaronzedwick Nov 11, 2024
50016f9
o Fix backend xarray for from_file, comment out plot for remapping
rajeeja Nov 11, 2024
0db628d
Merge branch 'rajeeja/from_file_notebook' of github.com:UXARRAY/uxarr…
rajeeja Nov 11, 2024
752d5b4
Fixed failing docs
aaronzedwick Nov 11, 2024
c8acb52
Merge branch 'rajeeja/from_file_notebook' of https://github.com/UXARR…
aaronzedwick Nov 11, 2024
36a837f
Merge branch 'rajeeja/from_file_notebook' of https://github.com/UXARR…
aaronzedwick Nov 11, 2024
6c5ba95
Delete docs/user-guide/.ipynb_checkpoints/from_file-checkpoint.ipynb
aaronzedwick Nov 11, 2024
5978ec0
Delete docs/user-guide/from-points.ipynb
aaronzedwick Nov 11, 2024
1a0995e
Revert "Delete docs/user-guide/from-points.ipynb"
aaronzedwick Nov 11, 2024
5d0a687
o update from file for xarray backend and add more markdown explanation
rajeeja Nov 12, 2024
0d0057f
Merge branch 'main' into rajeeja/from_file_notebook
aaronzedwick Nov 12, 2024
c3bfe67
Merge branch 'main' into rajeeja/from_file_notebook
rajeeja Nov 15, 2024
221284e
o Move to suppl. guides
rajeeja Nov 15, 2024
977312e
o Change title and fix link text
rajeeja Nov 17, 2024
2ddcafe
Merge branch 'main' into rajeeja/from_file_notebook
philipc2 Nov 26, 2024
eefa7de
o change guide title and desc
rajeeja Nov 27, 2024
d9e7089
o Add more text to guide
rajeeja Nov 27, 2024
178995d
o Plot the smaller file in the repo for geojson
rajeeja Nov 27, 2024
746b1a5
Merge branch 'main' into rajeeja/from_file_notebook
rajeeja Dec 5, 2024
bf79dbc
o better handle dataset read
rajeeja Dec 6, 2024
3bc1158
o Fix ruff-format
rajeeja Dec 6, 2024
348191b
Merge branch 'main' into rajeeja/from_file_notebook
aaronzedwick Dec 11, 2024
dfc44e4
Merge branch 'main' into rajeeja/from_file_notebook
rajeeja Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/user-guide/from-points.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.0"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
1,188 changes: 1,188 additions & 0 deletions docs/user-guide/from_file.ipynb

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/userguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ These user guides provide detailed explanations of the core functionality in UXa
`Dual Mesh Construction <user-guide/dual-mesh.ipynb>`_
Construct the Dual Mesh of an unstructured grid

`From File <user-guide/from_file.ipynb>`_
Load unstructured grids using the Grid from_file function

philipc2 marked this conversation as resolved.
Show resolved Hide resolved

Supplementary Guides
--------------------
Expand Down Expand Up @@ -106,3 +109,4 @@ These user guides provide additional details about specific features in UXarray.
user-guide/structured.ipynb
user-guide/from-points.ipynb
user-guide/holoviz.ipynb
user-guide/from_file.ipynb
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion uxarray/grid/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ def from_file(
grid_ds, source_dims_dict = _read_geodataframe(filename)

elif backend == "xarray":
grid_ds, source_dims_dict = cls.from_dataset(filename)
dataset = xr.open_dataset(filename, **kwargs)
return cls.from_dataset(dataset)
rajeeja marked this conversation as resolved.
Show resolved Hide resolved

else:
raise ValueError("Backend not supported")
Expand Down
Loading