Replies: 5 comments 3 replies
-
Hi, This seems quite strange: the array to be initialized should not have more time steps than 100 ( Can you post more of the error message, including at which line this is happening? |
Beta Was this translation helpful? Give feedback.
-
Ok, it seems that the simulation has been successfully completed and saved to file, but is simply too large to be imported back into memory.
An alternative is to use |
Beta Was this translation helpful? Give feedback.
-
Hello again! Hope everything is going great Thanks for your answer. As you mention, it generates an NetCDF file, where I can extract the data of the run and make some analyisis. But in terms on using OpenDrift to plot, I still can not. I tried to open the file as you mentioned with the elements, but its just too few to have an idea of the run. The error: At the end, taking a look to the river runoff example, I think could be the best way to plot it in density fields, and at the end will give me a density perspective, if would let me open a large output. but when I try to open it, I have this error: I open the file with: And I get this: `TypeError Traceback (most recent call last) ~/opendrift/opendrift/init.py in open_xarray(filename, analysis_file, chunks) ~/opendrift/opendrift/export/io_netcdf.py in import_file_xarray(self, filename, chunks) ~/.conda/envs/opendrift/lib/python3.9/genericpath.py in exists(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType Thanks for your time and help !! :) |
Beta Was this translation helpful? Give feedback.
-
I wonder if your netCDF-file may be incomplete, e.g. due to the simulation ending without being able to postprocess the file. Or maybe this importing does not work since you subset the output with Anyway, as you say, plotting only a subset of either particles or timestep may be a limited visualization, so it might be better to show density fields, which at least is based on all particles and all time steps. It could be useful to see the |
Beta Was this translation helpful? Give feedback.
-
Ok, your version is slightly outdated, and also out of sync with the 3rd
party requirements.
See here for how to update:
https://opendrift.github.io/install.html
Basically it should be (from OpenDrift folder):
git pull
conda env update -f environment.yml
pip install -e .
…On Tue, Feb 1, 2022, 23:28 camines ***@***.***> wrote:
Hello again,
Sorry for having you for so long in this. I really really appreciate your
time and help :)
The weird thing is that with less particles was working well.
With opendrift.open(file, elements=.... ) it works, even the large .nc
file. But it doesent show me much, that's why I'm trying with the densities.
The opendrift.open(file, times=.... ) gives me error, even with an old
small output file.
The opendrift.open_xarray() gives me the error I specify before, even
with older small files. I'm just using import opendrift, maybe I need
something additional?
Today I have something very weird. The model run, and I was just waiting
for the output .nc file, and actually run until the end without the Memory
error. I just added the Horizontal diffusivity variable. When I tried to
plot, the Kernel die. Now even with just few particles, on that specific
script, it just dont work
`Time:
Start: 2010-01-01 00:00:00
Present: 2010-01-02 00:00:00
Calculation steps: 46 * 1:00:00 - total time: 1 day, 0:00:00
Output steps: 2 * 1 day, 0:00:00
'The simulation stopped before requested end time was reached.'`
Model: PlastDrift (OpenDrift version 1.5.6) I have this one, how can I
update it? :)
I check as you recommend the pytest, and I have a lot of errors and
warnings. Would you recommend to update, or reinstall opendrift?
I send you an image of the end
------------------------------
A parallel question. It is possible to plot a vector plot without the
particles?
Some like an average of the forcings?
I did it for animations, and for plots, by background=['x_sea_water_velocity',
'y_sea_water_velocity'] but is there a way to do it just the forcing?
I tried with show_elements=False, show_trajectories=False, but it didn't
worked
Thanks again for your help and time :)
[image: pytest]
<https://user-images.githubusercontent.com/64263250/152061716-9824b49b-ccdc-4929-92ac-515ebbef7eaf.png>
—
Reply to this email directly, view it on GitHub
<#845 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABH25I2KPUHHZMV6OAAOZA3UZBNANANCNFSM5M325LEQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Dear all,
I'm presenting two memory errors,
First saving, but selecting few variables :
#o.run(steps=(24*365*11), time_step=3600, time_step_output=3600*24, outfile='Tons_run.nc',export_variables=['ID', 'age_seconds', 'origin_marker','lon','lat'])
Error:
MemoryError: Unable to allocate 6.92 GiB for an array with shape (48678, 4016) and data type [('ID', '<i4'), ('status', '<i4'), ('moving', '<i4'), ('age_seconds', '<f4'), ('origin_marker', '<i2'), ('lon', '<f4'), ('lat', '<f4'), ('z', '<f4'), ('wind_drift_factor', '<f4'), ('terminal_velocity', '<f4')]
Second just runnung:
o.run()
Error:
MemoryError: Unable to allocate 9.54 GiB for an array with shape (48678, 26302) and data type float64
This model was running with less seeded particles,
Thanks for your time!
Beta Was this translation helpful? Give feedback.
All reactions