-
Notifications
You must be signed in to change notification settings - Fork 2
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
[OpenDrift] Request for smaller chunks #46
Comments
OK, so you'd like smaller chunks in the trajectories.nc file? That's the raw output file written by the opendrift model, so I'd have to edit the opendrift source code to do that.... which is not ideal. Alternatively, we could generate another postprocessed file where the chunk size is specified? |
I didn't realize that was the output from opendrift. I haven't looked inside the .nc file yet, so I don't know that much about what I'm trying to render (I guess I should do this first). Is this conceptually similar to the croco output where the raw netcdf file is difficult to use? |
the opendrift output is a lot more intuitive than croco... |
Right, I see it's not as straight forward as 'where will the particle be at Questions!
|
To answer the question 'where will the particle be at t = x', you would get that from the lon, lat variables (and z if you wanted the depth). All variables have dimensions (trajectory, time), where trajectory corresponds to the particles, so you would be able to extract the location of particle p at time t. To answer the other questions
|
Thanks very much for including the JSON kerchunk output. If it's not too much trouble, please can you specify smaller chunks in the NetCDF file.
Looking at the output at https://mnemosyne.somisana.ac.za/somisana/opendrift/20230904/test_east_coast_blowout, I see in the JSON file that the smallest retrievable chunk is 3.7MB. If I remember specifying chunk sizes for tier3 output there is a tradeoff between write-speed and chunk size (more chunks = longer to create the NetCDF file).
It's easy to do: https://github.com/SAEON/somisana/blob/stable/toolkit/cli/applications/croco/regrid_tier3/__init__.py#L258-L289
Here is an example of the output: https://mnemosyne.somisana.ac.za/somisana/algoa-bay/5-day-forecast/202309/20230906_hourly_avg_t3.kerchunk.json
I can make a get request to get all salt values at a particular depth/time for all lat/longs.
(The salt is defined as
[time, depth, lat, long]
-"salt/.zattrs": "{\"_ARRAY_DIMENSIONS\":[\"time\",\"depth\",\"latitude\",\"longitude\"],\"long_name\":\"averaged salinity\",\"standard_name\":\"sea_water_salinity\",\"units\":\"PSU\"}"
)The text was updated successfully, but these errors were encountered: