-
Notifications
You must be signed in to change notification settings - Fork 121
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
Unstructured reader (FVCOM) #436
Conversation
Interesting rearrangement. Perhaps then the ad-hoc boolean |
Yes, renamed analytical to continuous as that seems to make more sense. Not all models using it are analytical, but they can provide values at continuous input. Unstructured will cover infinite dimensions, but they will mostly be automatically garbage collected by python. return_block can be removed. |
Continuous readers will mostly be continuous in both time and space, though there may be exceptions. E.g. new reader_constant_2d is continuous in time, but discrete/gridded in space. |
Yes, but it is continuous from the point of view of basemodel - it can take any input value and does its own interpolation (or selects nearest value)? |
If removing |
On second thought, reader_constant_2d should be a regular structured reader, as it does not do its own interpolation, but returns a block. So I guess what characterizes Another reader in the borderland is reader_ArtificialOceanEddy, which uses an analytical equation to calculate variables directly at particle positions, but which can also return this on a discrete grid if user has specified And then there is the case that reader provides interpolated variables, but with discrete times, such as reader_timeseries |
Yes, exactly.
Yes, indeed. So you can ask for values for a continuous range of arguments. I am open for both names, it is important that we describe these things in the documentation of the class.
Is there any advantage in allowing
That is the current constraint. I think the most natural solution, if following the file/class layout in this PR, is to have StructuredSpatial and StructuredTemporal classes so that they can be composed. Have to think about how exactly that can work, one might have to inherit the other. Maybe we have to go for ContinuousTemporalStructuredSpatial. |
I agree that |
I don't know about that, but if it is not used anymore it would make things simpler to remove it. |
Cannot use xarray (yet) because of: pydata/xarray#2233 |
7b6d4e6
to
acd312f
Compare
See https://github.com/gauteh/opendrift/tree/fvcom-noblock for code removing |
22875e7
to
b96a3c0
Compare
Notes on current implementation:
|
…__get_variables_derived__
…icles to better see bottleneckes. Disabled animation background which is not yet working.
…ster access at later timesteps. Marking bottleneck with info-line.
…nstead of using hasattr
…bsetting instead on obtained numpy array.
…e test is passing.
… instead of in each reader.
Converting the FVCOM file from Netcdf3 to Netcdf4 doubles the speed for local files, and will probably make it easier for opendap servers as well. |
…s indices. Renamed method z in unstructured reader to z_from_sigma.
After the two last commits, I expect all examples to complete. |
…e block is True (verified against master with block = True as well)
Re-enabled tests, fixed a couple of errors. Removed traces of block I could
find. Timeseries at position values was wrong because old code use block =
False which causes different interpolation. With block = True in old code
values match exactly.
man. 30. nov. 2020 kl. 19:27 skrev Gaute Hope <[email protected]>:
… Great! I am running now locally too to test.
>
|
Great! I am running now locally too to test.
… |
Rember:
use_block