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

Separate netCDF files for each time step #79

Open
Zhangxiangyu98 opened this issue Oct 19, 2023 · 1 comment
Open

Separate netCDF files for each time step #79

Zhangxiangyu98 opened this issue Oct 19, 2023 · 1 comment

Comments

@Zhangxiangyu98
Copy link

Hi, I've encountered some issues while using the package. My data is a large set of high-resolusion model data stored in separate netCDF files for each time step, with each file containing variables like u, v, w, salt, temp, etc. For example, one of my netCDF files is named data0001.nc and it contains these variables, each with dimensions (lon, lat, depth, time), where the time dimension has a length of 1. And there are data0002.nc, data0003.nc and data0004.nc.... I'd like to know if the program can directly handle this type of data and if so, how should I set the dimensions and timestamps? I attempted to set the dimensions and timestamps parameters, both with and without setting the time dimension in dimensions, and also tried providing a time sequence as timestamps when calling f = filtering.LagrangeFilter(). However, I encountered errors during these operations.
Additionally, if I want to process a specific subregion of the data, can I use the indices parameter to set lon and lat values?

@angus-g
Copy link
Owner

angus-g commented Oct 19, 2023

Hi, thanks for using the library! I haven't looked at this for a while, so I might be a bit rusty.

I'd like to know if the program can directly handle this type of data and if so, how should I set the dimensions and timestamps?

The input loading is based directly on OceanParcels, and supports globs. If all your files have the same structure, something like data*.nc should work. If you get the specific error you obtain, I might be able to guide a bit more here. It's worth noting that setting up variables and dimensions is a bit fiddly and it's easy to make a mistake there!

Additionally, if I want to process a specific subregion of the data, can I use the indices parameter to set lon and lat values?

Indices is meant more for picking a specific depth level. Check out the seed_subdomain function for specifying a subregion.

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