Closed mevo-creator closed 3 years ago
Yes, it seems to be a Windows issue. It is a bit hard for me to debug this one since I have no Windows machine available, and also since days are quite busy.
But perhaps you can try in the meantime yourself to find a workaround (in reader_ROMS_native.py) according to discussions like the following? https://github.com/usgs/libcomcat/issues/184
ok. I'll try to go through the discussion to find a way. I am a beginner in python so not sure how much I could achieve but I'll give it a try :) Thanks!
Hi @knutfrode , The above issue related to windows got solved by itself in Opendrift version 1.4.2.
I've another query if you could guide me with. From literature studies, we have found that the sunlight (weathering) is responsible for breaking down of polymers over a period of time. However, the impact of solar irradiation changes with latitude and depth in the water column. We are trying to use Opendrift for analysing how the number of particles are changing with depth. Basically, trying to see at what depth the majority of particles end up after each time step. Is there any plotting/analysis tool within Opendrift that can give us output in terms of statistics (numbers) of particles at different depths? For instance, if 200000 particles are seeded and tracked for a year, after each time step what percentage of particles are between 0 and 10m, 10 and 20m and so on.
I did find an interesting plotting method o.animate_vertical_distribution(bins=30)
in this example however this only works in Openoil and not in Oceandrift (the plotting takes a very long time in Oceandrift and not all time steps get plotted). I also tried some other plotting method that you'd suggested earlier for instance o.plot_property('z')
or o.plot_vertical_distribution()
however these methods generates plots of all particles that are seeded/tracked in the simulation and don't give statistics in terms of pure numbers. Is there some command/other approaches by which we can get numbers for eg percentage of total particles between 0 and 10, 10 and 20 and so on at different time steps? Please let me about this. Thanks
There are no specific methods to provide such statistics, but this should be fairly straightforward to do as post-processing from the history-array.
animate_vertical_distribution
should work the exact same way for OceanDrift
as for OpenOil
, but it might be slow for many particles (as with any plotting/animation method).
It should also plot every output time step (which may be larger than calculation time step).
ok. I would imagine so since the position of particles is stored in the output file at each time step. But how can we approach this post-processing from history-array. Do we need to import the position of particles from output file and make our own analysis method? it would be helpful if you could explain this briefly on how we could approach this?
I'll wait for more time for plotting animate_vertical_distribution
If you import the simulation to an object o
, you can get the depths by
z = o.get_property('z')[0]
, with dimensions (output_timestep, particle_number)
This is also stored the same way as variable z
in the netCDF-file.
From there you would need to make your own analysis method for what you want to achieve.
Ok. I will try and implement this approach. Thank you for your guidance.
Hi @knutfrode , I need to understand the resolution of the SVIM currents data set inorder to refer it in the publication ('https://thredds.met.no/thredds/dodsC/nansen-legacy-ocean/svim_daily_agg') that we are using as a reader in this simulation. I found this link SVIM that archives the data set. Also, this publication that explains how the SVIM data was generated. Lienetal2013-EvaluationofaNordicSeas4kmnumericaloceanmodelhindcastarchiveSVIM1960-2011 (1).pdf
I need to know if this is the right link and publication corresponding to SVIM data set, please confirm this. Thanks
I can confirm that this is the right link and reference. You may also mention that you accessed the data through thredds.met.no
Thank you so much for quick response!
Closing, re-open if needed.
Hello Team, First of all, Congratulations and thanks so much for developing easy to use open source trajectory modelling software. I'm new to python and hope i can use this software for my PhD research here at University of Stavanger in Norway. I've installed Opendrift and trying to run tutorials and examples. However, when running tutorials, I'm getting error when trying to add reader from a local file and also when trying to import landmask. Can someone please guide me about this issue. I'm pasting errors below. Thanks in advance!
-------------Error while trying to add reader from a local file--------------
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 1, in
File "C:\Users\mevo.conda\envs\opendrift\lib\site-packages\opendrift\readers\reader_netCDF_CF_generic.py", line 144, in init
raise ValueError(e)
ValueError: [Errno 2] No such file or directory: b'norkyst800_16Nov2015.nc'
-------------------- Error when importing landmask--------------------