Skip to content
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

Load smap file from filename regex #46

Closed
rafaqz opened this issue May 21, 2020 · 5 comments
Closed

Load smap file from filename regex #46

rafaqz opened this issue May 21, 2020 · 5 comments

Comments

@rafaqz
Copy link
Owner

rafaqz commented May 21, 2020

Getting the date from the HDF5 is too slow.

@jamesmaino
Copy link

Can we increase the priority of this one? Adds a good 30 mins to the start up every time I use the full SMAP data set.

@rafaqz
Copy link
Owner Author

rafaqz commented Jun 4, 2020

Wow 30 mins.

You can do it by just regex filtering the filenames

smapfiles = joinpath.(smap_folder, [f for f in readdir(smapfolder) if occursin(r".h5$", f) && occursin("_2017" , f)])
smapseries = SMAPseries(smapfiles)

See

https://github.com/cesaraustralia/SpottedWingDrosophila/blob/master/establishment.jmd#L270

Is that enough or should we build that in to GeoData.jl?

@rafaqz
Copy link
Owner Author

rafaqz commented Jun 4, 2020

SMAPseries actually takes a Vector of String:

https://github.com/rafaqz/GeoData.jl/blob/master/src/sources/smap.jl#L114

@jamesmaino
Copy link

Oh I didn't realise it could already taken a vector of strings. I think this is enough for now but would be useful in future, e.g. for AWAP grids or something were there are lots of grid files.

@rafaqz
Copy link
Owner Author

rafaqz commented Jul 27, 2020

closed by #54 so this is automatic

@rafaqz rafaqz closed this as completed Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants