-
Notifications
You must be signed in to change notification settings - Fork 17
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
implement cross-platform trajectory output #108
base: main
Are you sure you want to change the base?
Conversation
I chose to do a check for if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("rhdf5") |
|
What do you see as the value in supporting multiple trajectory output formats for users? Choosing a single format that supports interoperability with other languages makes sense (albeit a breaking change), but supporting I/O compatibility for multiple trajectory file formats adds maintenance burden and additional dependencies to manage. If the benefit is mostly to support user preference, then IMHO it may be better to choose a single STILT-sanctioned output format and make it users' responsibility to convert between STILT's and their own preferred conventions. |
I suppose I was following the framework of write_footprint.r where the output formats have been implemented for I hadn't really intended this to be a breaking change. Since it is an R package, I think it is reasonable that the intermediate output is R-specific (i.e. keeping Your point on maintenance burden makes sense. I think it is reasonable to remove the I like the additional option of disabling output with Ultimately, I lean towards defaulting to Happy to make changes. |
particle <- arrow::arrow_table(traj$particle) | ||
|
||
# Write receptor metadata | ||
write_meta(particle$metadata, 'receptor', traj$receptor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check if this works with multiple receptors. Didn't realize we could pass multiple receptors to simulation_step
via stilt_cli
My feelings remain the same for the origin repo, but I think I'm going to move forward with a simplified version of the cross-platform output in my own fork. I only provide the option for trajectory output to parquet files. I am also writing the stilt input including the receptor information to a json, for easy machine parsing later. Finally, I added the receptor information to the footprint netcdf attributes. I'm a bit confused by Feel free to incorporate the changes you feel are relevant. |
Are you thinking for simultaneous release evenly distributed along a line (e.g. a column receptor)? I think that's the only multi-receptor option and a single trajectory file makes sense in that context.
I'm not a maintainer of STILT anymore, so up to you and @John-C-Lin what direction you want to take it. Just chiming in for support and context. |
* relative linking * no need for stilt_wd as parameter to link_files
* num hours per met file * only call find_met_files twice if met_subgrid is enabled * implement met_hours using n_hours_per_met_file * call unique on request and output * add n_hours_per_met_file param to stilt_cli * n_hours_per_met_file guidance --------- Co-authored-by: John-C-Lin <[email protected]>
* processes_per_node * processes per node docs
resolves #107
I provided functionality to write trajectory output to
HDF5
output. In my small, local test,h5
files were marginally larger thanrds
.This should make it much easier to read the trajectories with languages like
python
, but leaves the default asrds
as most folks are just interested in the footprint which is already netcdf.I provide some example
python
code for reading in theh5
trajectory in the documentation.