Add NWM netcdf re-formatting script #27
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WARNING: does not work in initial statecontains compatibility issues to be fixed
in subsequent commits.
A version of this script is used to operationally transform the NWM native outputs to this post-processed form.
Essentially, the post-processing combines all timesteps from a given forecast cycle into a single file and writes the data so that values for a given location are contiguous in the dataset.
Running the simple test in this repository (use the wget scripts to download data and then run
python test_create_timeseries.py
, shows that it takes about 3 seconds to convert a single forecast cycle's worth of 18short_range
outputs and about 50 seconds for a single set ofmedium_range
outputs. Note that linear scaling would give slightly less time, so we probably have some tuning to do.Also, the function has been tweaked to allow larger chunks and more overall memory (10 Gb) for the medium_range test.
TODO: