-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change to use h5netcdf backend for reads (#132)
* Replace netCDF4 package dependency with h5netcdf * Update read/write engine to h5netcdf The commit adjusts the xarray `open_mfdataset()` and `to_netcdf()` method calls to use the h5netcdf engine for reading and writing operations. The corresponding tests were also updated. It also updates the `info` module and tests to reflect the use of the h5netcdf package. * Improve code comment clarity sentence structure * Enable parallel reading by default The default configuration for reading files has been changed from sequential to parallel. This change was implemented by modifying the default value in the `config.get` method for the "parallel read" field in the `extract.py` file. This should improve performance for operations that involve reading multiple files. * Restore netcdf4 package for use as write engine When h5netcdf is used as the engine for writes the resulting netCDF4 files are not read correctly by ncdump or xarray.open_dataset(..., engine="netcdf4"). So, we'll use h5netcdf to read and netcdf4 to write. Returning netcdf4 as a dependency also restores the ncdump tool to the environment. * Restore netcdf4 package dependency in test env * Explicitly use netcdf4 to write test datasets This ensures consistency with dataset writing in extract.write_netcdf(). * Include both netcdf4 & h5netcdf in versions info
- Loading branch information
1 parent
c580720
commit 9db197c
Showing
10 changed files
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ dependencies: | |
- click | ||
- dask | ||
- flox | ||
- h5netcdf | ||
- netCDF4 | ||
- pip | ||
- python=3.12 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ dependencies: | |
- click | ||
- dask | ||
- flox | ||
- h5netcdf | ||
- netCDF4 | ||
- pip | ||
- python | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ dependencies: | |
- click | ||
- dask | ||
- flox | ||
- h5netcdf | ||
- netCDF4 | ||
- pip | ||
- python=3.12 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ dependencies = [ | |
"click", | ||
"dask", | ||
"flox", | ||
"netCDF4", | ||
"h5netcdf", | ||
"pyyaml", | ||
"rich", | ||
"structlog", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters