Closed jarq6c closed 1 year ago
Ping @aaraney
@jarq6c, thanks for pinging me. Im excited to start reviewing this tomorrow!
@jarq6c, it looks like newer commits got rebased on top of this PR yesterday. I think you can do an interactive rebase (git rebase -i HEAD~4
) on your nwm-new-units
branch, drop the three new commits, and then force push to get us back to where we were before. Then, I think you need to rebase your nwn-new-units
branch on top of main
, resolve any conflicts, and force push again. The first force push is optional, but I think its worth it just to make sure the history lines up on GitHub.
@jarq6c, it looks like newer commits got rebased on top of this PR yesterday. I think you can do an interactive rebase (
git rebase -i HEAD~4
) on yournwm-new-units
branch, drop the three new commits, and then force push to get us back to where we were before. Then, I think you need to rebase yournwn-new-units
branch on top ofmain
, resolve any conflicts, and force push again. The first force push is optional, but I think its worth it just to make sure the history lines up on GitHub.
Started a new PR from a new branch over on #227
This turned out to be a bit bigger than I had intended, but it is the result of months of experimentation as well as feedback from frequent users of National Water Model output. I'll summarize changes for each component.
FileDownloader.py
Added an
overwrite
boolean parameter that will warn and skip similarly named files.NWMFileProcessor.py
Updated
get_dataset
to accept thexarray.open_mfdataset
paths
argument. Essential coordinates (reference_time
,time
, andfeature_id
) are always returned.NWMClient.py
Updated abstract interface to accept an
nwm_feature_ids
parameter to facilitate retrieval of smaller amounts of data. Unfortunately, retrieving data is still relatively slow, but this new interface accommodates the most common use-case (retrieval of time series data from a few sites).NWMFileClient.py
Added
unit_system
parameter to match oldernwm_client
unit handling. Replacedget_dataset
method withget_files
that just downloads files and returns their local paths.get
method works with severalconfigurations
andreference_times
by default. Implementsnwm_feature_ids
parameter.ParquetStore.py
Formerly
ParquetCache.py
, I decided to rename this module and reimplement as aMutableMapping
similar topandas.HDFStore
. It can still be used as a context manager, but now it also includes key-access and inherits useful methods likeget
andpop
fromMutableMapping
. As a consequence, the oldget
method was removed. This could live somewhere else, eventually.NWMClientDefaults.py
Added defaults for handling units, variables, and the new
ParquetStore
.UnitHandler.py
Taken verbatim from the older
nwm_client
. This could potentially live somewhere else (eventually)._version.py
bumped to 7.0.0 due to breaking interface changes
Checklist