-
Notifications
You must be signed in to change notification settings - Fork 68
Add NetCDF data file write/read #1007
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
Merged
Merged
Changes from all commits
Commits
Show all changes
175 commits
Select commit
Hold shift + click to select a range
993be9f
Start generic netcdf data io class
drroe 26d461d
Add id and initial creation of file
drroe a9be17e
Start getting dimensions
drroe db31546
Update files and dependencies
drroe ad02dac
Add to DataFile
drroe 8a8e8ff
Start test
drroe 4a4c9db
Indicate netcdf will be valid for 1d, 2d, 3d
drroe 98f8a9d
Start adding sets
drroe 8f5fca4
Save dimension indices for each set
drroe 5c807d9
Define dimensions
drroe 5fcd289
New grouping strategy
drroe 4575126
Start defining variables
drroe 61e3403
Choose type
drroe dc8d1e5
Add legends
drroe 2301c06
Do variable write
drroe a772073
Do index write
drroe a4d3507
Put 1D set write into a separate routine
drroe 81f61ad
Ensure all metadata is added to each variable
drroe e12d530
Add nctest
drroe b04cf41
Merge branch 'master' into netcdf.data
drroe f71b396
Merge branch 'master' into netcdf.data
drroe beb9419
Improve code docs
drroe f3c82ed
Add ifdef
drroe b5a134e
Start read. Ensure netcdf file is closed after read/write.
drroe 395df94
Start inquiring about variables stored in the netcdf file
drroe 0835452
Add monotonic attribute to distinguish between double and xymesh
drroe ada6e62
Start testing the mesh set
drroe e9cf5d4
Add DvalPtr function to DataSet_1D so writing XY mesh works correctly
drroe 8f5d366
Added an xy mesh set
drroe 8d740a8
Fix typo
drroe 45c1530
Centralize recognized NetCDF conventions in the NC namespace.
drroe 918b5a2
Use conventionsStr routine
drroe f8d42e8
Create single routine for creating the Conventions string
drroe 5b636c6
Set Conventions string to CPPTRAJ_DATA
drroe 0496367
Add note about keeping in sync with corresponding enum
drroe 02bd5cd
Add 'index' attribute for variables. Remove AMBER application string.
drroe 03ef4dd
Recognized index for a group of 1d vars
drroe bf55de0
Start reading data set metadata
drroe 48c955c
Read more variables. Change index var status string from index to
drroe a0f13b6
Finish reading metadata. Add dataset description
drroe 51802ed
Start a separate routine for xy mesh sets
drroe 880d3e0
Separate routine for writing xy mesh sets
drroe d6697c8
Store min and step instead of explicit X and Y values for monotonic
drroe 8feda48
Read descriptioin
drroe 2c8541b
Add metadata and description to both xy sets
drroe 928c664
Store varids for mesh
drroe 9d1b85b
Save min and step only for the monotonic sets. Have xy mesh vars
drroe 80538a7
Add function to get type from description
drroe 87e09e7
Do XY mesh read
drroe 6de7b2f
Make Resize a DataSet_1D function
drroe ba9dd5e
Implement Yptr to write to DataSet_1D underlying arrays
drroe 45c5138
Read into generic 1d sets
drroe 8e19f3d
New dimension labels. For XY mesh, only store attributes for the X var
drroe 6b26ac4
Add more checks for reading XY mesh. Store attributes for X var only in
drroe 350c81f
Ensure XY mesh is marked
drroe bf625a2
For backwards compat, if no label set for 1D set assume Frame
drroe b4c997e
Test netcdf data file read
drroe dcfdbbb
Enable netcdf data test
drroe cfa1f14
Add warning that not all data saved for PH sets
drroe 7a62492
Fix variable type for PH set
drroe d0c9b9c
Ensure data set dimension label is stored
drroe 03b1aed
Add some debug
drroe 4a7ad0e
Start matrix write
drroe a6ed243
Start testing matrix write
drroe 31b3fe1
Finish initial matrix write
drroe 53548fa
Add missing breaks
drroe 1f93d51
Ensure all 3 matrix kinds are written
drroe 956710f
Store vect and mass if defined
drroe 4524407
Add the ndim attribute
drroe bc11f59
More matrix stuff. New read routine that should hopefully make it easier
drroe 9aa719d
Save nrows/ncols as attributes. Allocate matrix on read
drroe a586095
Actually read data
drroe 8a1315d
Read matrix vect data
drroe b3553bf
Read matrix mass data
drroe d508ba0
Change ascii precision to override the default
drroe 10ed802
Read nsnapshots
drroe f3ca92e
Test that netcdf matrix is diagonalized the same way after reading
drroe d212445
Comment out the old read routine
drroe b9d2458
Start modes write to netcdf. For netcdf, allow sets with different
drroe 1320ad3
Consolidate variable creation
drroe 1c8e542
Write the associated variables
drroe a8d7264
Mass write
drroe 12d5698
Get rid of unused fxn
drroe e99a5f5
Get size of all modes-related vars
drroe 45e1aa6
Read modes data
drroe b1b1c51
Compare original evecs with those written from the netcdf file
drroe 6af202a
Merge branch 'master' into netcdf.data
drroe 52f606e
Start a further abstraction of the netcdf functions
drroe e28ff5c
Fix classes. Update xy mesh write
drroe 9305f44
Have read routine use the Dimensions_ array. Start putting individual
drroe c3d70dd
Put matrix read in its own routine
drroe a43b688
Split out generic 1d set read into its own function
drroe 87bc5ab
Put modes read into its own function
drroe 0f5685b
Update save with new var names
drroe 2a6e704
Dont rely on const ref to the Dimensions_ array since it can change when
drroe 6387f23
Test symmetric mass weighted covar
drroe 9d64ee3
Test diag of mw covar
drroe 97a3170
Add 3d grid write
drroe e9b0af6
Try to standardize the index dimension more
drroe 3df312c
Create single function for adding index info. Have xy mesh set use it.
drroe d537a53
Use new index function for 1d and 2d sets
drroe 7ba71cb
One function to add all common info from a dataset
drroe adeafe4
New function to read index dimension info
drroe 930b9da
Try to get reads working. They dont yet.
drroe 76680c6
Needed quotes, mistakenly was a variable.
drroe 8cacebd
For backwards compatibility, sets with index variable instead of
drroe cff9a62
Merge branch 'master' into netcdf.data
drroe 41d7ee6
Merge branch 'master' into netcdf.data.merge.master
drroe bae02cc
Merge branch 'master' into netcdf.data
drroe e4ca92e
Merge branch 'master' into netcdf.data
drroe 1de934c
Add but do not enable 3d grid read yet
drroe c58d48f
Update clean rules
drroe 77010c3
Start 3d read routine. Add origin and ucell attributes for grid.
drroe 1db16a1
Finish 3d grid read and enable test
drroe 5be1125
String write routine
drroe 584a73f
Start adding string write to writeData_1D
drroe 5accd4b
Finish string write
drroe 2eeb607
Remove separate string write code. In writeData_1D now.
drroe 8d847d4
Add a test that will write string data sets to netcdf
drroe 1993140
Put xy mesh write into writeData_1D
drroe cb1eb45
Remove old xy write routine
drroe 3c61831
Remove old x array code
drroe f62397f
Ensure string sets will be written if by themselves. Ensure other set
drroe 44a46bf
Implement string set read
drroe 69fd2ff
Create SetElement function for DataSet_string so that reading strings
drroe c3c57d4
Test string reads
drroe 427e05b
Define vector variable
drroe 13d1f32
Do vector set write. Use defineVar() to set child var id for string
drroe 762c14d
Start adding a vector test
drroe e3f97f1
Read vector data
drroe bd485f9
Test read of vector data
drroe 680fdae
Use NC::fmtTypeStr
drroe 771b4dd
Clear up error message
drroe 9e4c223
Do vector/scalar write. Needs to be separate because its currently a "0
drroe 2543554
Add vector/scalar set read write
drroe bacb1fb
Merge branch 'master' into netcdf.data
drroe b8a39a4
Hide some debug info
drroe 0a2a17c
Start new implementation of netcdf cluster matrix format
drroe 3d75b6f
Do the cluster matrix variable writes
drroe b043a7f
Start adding a cluster matrix write test
drroe 0439073
Merge branch 'master' into netcdf.data
drroe 6d4ed85
Merge branch 'netcdf.data' into netcdf.data.cmatrix
drroe e8273ef
Merge branch 'master' into netcdf.data
drroe c5c84a2
Make cpptraj conventions check part of ID
drroe d81dd7d
Start cluster pairwise matrix read
drroe 37428e3
Fix comment
drroe 119c9c6
Finish pairwise matrix read
drroe 97243b9
Add cluster pairwise test
drroe 920e4b6
Add attributes for cluster pairwise matrix and change the ordering so
drroe a2034f2
Get rid of unused code
drroe 5660e2d
Remove old code. Improve code docs
drroe 78a2a52
Remove unneeded function
drroe c13daa5
Generalize AddDataSetIndexInfo so it can be used for any set
drroe a327829
If frames were sieved out of the pairwise cluster matrix (i.e. the
drroe b9d7600
Change nindexdim to nindexvar. Really it refers to index variables, not
drroe bc97d12
Update with nindexdim -> nindexvar
drroe fa70066
Update warning
drroe 2e4f19c
Hide debug info
drroe 8e01e53
Remove unused code
drroe fa96346
Remove more unused code
drroe b036ba8
Test user specified name for netcdf dataset read
drroe a79a764
Actually use user specfied name
drroe 1730035
Test storing cluster num vs time in netcdf data along with pairwise
drroe 83bc8a9
Change write for unsigned int set; netcdf classic does not have an
drroe 017558d
Add routine for reading unsigned ints
drroe 13d1074
Add test for read/write unsigned ints
drroe ebbc25a
Add netcdf data file format to table
drroe b4eac12
Version 6.16.3. Revision bump for addition of netcdf datafile
drroe dc6bc80
Use delete[] instead of incorrect delete
drroe 6a13af7
Add missing arg for mprinterr
drroe 933a798
Convert to size_t before multiply to prevent potential overflows.
drroe 204634f
Ensure that if a grid is to be allocated, all processes allocate it
drroe 8942e2e
Fix error message formatting
drroe c3e4d38
Try to fix TOCTOU issue
drroe 1694217
Try to avoid multiplication overflows
drroe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.