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.
Change how GlobSim reads netcdf files so you can easily change the dimension order of the source file.
(lat,lon,time) is significantly faster than (time,lat,lon)--the default.
ideally, it will be possible to flexibly switch between default and "optimized" dimension behaviour.
Script for optimizing netcdf files
the script
globsim/interpolate/optimize.sh
transforms downloaded netcdf files so that reading all times is much fasterglobsim/interpolate/optimize.sh /data/globsim/n60/era5 /data/globsim/n60_optim/era5 --year 2001 # processes files for 2001
Flexible dimension reading
reorder_and_slice_array
that accepts an array, an ordering scheme for the array, and an ordering schemereorder_and_slice_array(slice_boundaries={'time':slice(1,100)})
reorder_and_slice_array( slice_boundaries={'latitude':slice(1,5), 'longitude':slice(1,5)})
keyword toggle
optimized=true
to use the optimized filesBenchmarks:
Closes #127
Closes #154