OpenDrift is a software for modeling the trajectories and fate of objects or substances drifting in the ocean, or even in the atmosphere.

Overview
Comments
  • Unable to add reader from a local file and import landmask

    Unable to add reader from a local file and import landmask

    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--------------

    reader_norkyst = reader_netCDF_CF_generic.Reader('norkyst800_16Nov2015.nc') 13:40:31 INFO: Opening dataset: norkyst800_16Nov2015.nc 13:40:31 INFO: Opening file with Dataset Traceback (most recent call last): File "C:\Users\mevo.conda\envs\opendrift\lib\site-packages\opendrift\readers\reader_netCDF_CF_generic.py", line 142, in init self.Dataset = Dataset(filename, 'r') File "netCDF4_netCDF4.pyx", line 2321, in netCDF4._netCDF4.Dataset.init File "netCDF4_netCDF4.pyx", line 1885, in netCDF4._netCDF4._ensure_nc_success FileNotFoundError: [Errno 2] No such file or directory: b'norkyst800_16Nov2015.nc'

    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--------------------

    reader_landmask = reader_global_landmask.Reader( ... extent=[2, 8, 59, 63]) 13:43:39 DEBUG: Adding new variable mappings ERROR:root:could not verify read permissions for group and others on landmask. Traceback (most recent call last): File "C:\Users\mevo.conda\envs\opendrift\lib\site-packages\opendrift_landmask_data-0.6-py3.8.egg\opendrift_landmask_data\mask.py", line 77, in check_permissions if not os.stat(self.lockf).st_mode & 0o777 == 0o777: FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\Users\mevo\AppData\Local\Temp\landmask\.mask.dat.lock'

    opened by mevo-creator 111
  • wind_drift_factor

    wind_drift_factor

    I'm new here, just going through the tutorial, and have a couple of very basic questions.

    1. I have never fully understood the reason for the wind_drift_factor in offline particle tracking. Is it used mainly in cases where there is windage? Or is it more because the particles are assumed to be in the upper millimetres of a top layer that is perhaps a half metre or more thick? Are there any observational studies to support its use?
    2. If I change 'u': 'x_sea_water_velocity' to 'u_eastward': 'x_sea_water_velocity' in my reader (and similarly for v), will the code know not to rotate by angle?
    question 
    opened by John-Luick 40
  • Improved methods for saving animations

    Improved methods for saving animations

    -new method based on saving and grab_frame method in matplotlib.animation writers

    the new method works significantly faster when MPLBACKEND=agg is used as for
    example for generation of sphinx gallery images in circleCI headless server
    
    the previous method ( baed on FuncAnimation ) is still used in interactive
    mode locally when no filename is given
    

    -taking out the code that build filenames in sphinx gallery in separate method

    -fix for comparing animations of different length (example_rungekutta_norkyst.py)

    opened by manuelaghito 28
  • adding Dockerfile and instructions for use in docs/containers.md

    adding Dockerfile and instructions for use in docs/containers.md

    hey OpenDrift! I've finished a Docker container, along with instructions for export to Singularity (likely the more needed one for use on a shared resource) and would like to propose adding the Dockerfile and markdown document (instructions for usage, see files section in this PR for both) to the repository. I've built the container and provided it on Docker Hub, and would be happy to update when new versions are available, or help you to build it automatically on Docker Hub from the repository. Our user at Stanford reports that the Singularity container is running smoothly for her, so I am hopeful this might be useful to others.

    Issues Addressed

    • this will close #79
    opened by vsoch 28
  • openoil

    openoil

    I am changing viscosity and density in the model, but there are no changes taking place (Evaporation remains same) how to change those values .... please help!!

    Thanks in Advance!!!

    opened by dharanidharan12 24
  • punkrockwriters

    punkrockwriters

    Improvements to animation generation and saving, and on plot_vertical_distribution()

    With the default parameter fastwriter=False everything is still as before sho it should be safe to merge, but I think we can use fastwriter=True in all animation(), animation_profile() and animate_vertical_distribution(), or put it True directly in _save_animation(). I tested many examples and couldn't find problems

    But nice if you also check first. logger.info call in _save_animation() shows elapsed time. Check enclosed example

    opened by manuelaghito 21
  • No legend labels in examples

    No legend labels in examples

    Hi all,

    When running most of the examples (except those for OilSpil) I get the following warning:

    UserWarning: No labelled objects found. Use label='...' kwarg on individual plots. warnings.warn("No labelled objects found. "

    I'm relatively new to python, so maybe there is a simple solution to this but I haven't found it so far.

    Thanks for any help!

    opened by EmmaCartuyvels 20
  • Very slow performance with more than 30000 particles

    Very slow performance with more than 30000 particles

    I have tested the Telemac Selafin Reader and I noticed a consequent drop in performances when there are more than 30 000 particles. In comparison with the other particle tracker I know it seems very little (have done up to 10⁶ particles without much trouble). The quantity of RAM used, even with an output file, is very large (40Gb for 30000 particles). I am wondering what is the interest to always convert the projection system when you already have a metric projection with metric velocities? I would think that reprojection is one of the main culprit. Is that for Coriolis? I would think that you could avoid millions of operation of reprojection by using an approximation. The fact that each time-step of the ocean model calls the reader is also an issue as it is over-sampled most of the time. I understood that you were working on this. Finally the reader is parallelised but it is not clear if the model is. I have used OceanDrift as a model with coastline action previous

    opened by Boorhin 18
  • using multiple single gfs and hycom files error: nc file does not have a aggregation dimension

    using multiple single gfs and hycom files error: nc file does not have a aggregation dimension

    I used multiple single gfs and hycom files to run the leeway model. I have added the "standard_name" attributes to the files. The names of gfs and hycom files are as follows: gfs_1p00_sfc_wind_uv_Global_2020070600_t000.nc, gfs_1p00_sfc_wind_uv_Global_2020070600_t003.nc, ..., gfs_1p00_sfc_wind_uv_Global_2020070600_t072.nc and hycom_glb_sfc_water_uv_Global_2020070600_t000.nc, hycom_glb_sfc_water_uv_Global_2020070600_t003.nc, hycom_glb_sfc_water_uv_Global_2020070600_t072.nc. I used the wildcards simply like gfs_1p00_sfc_wind_uv_Global_2020070600_t0*.nc and hycom_glb_sfc_water_uv_Global_2020070600_t0*.nc to read these files. But there is an error: nc file does not have a aggregation dimension. How to solve the error, thanks a lot.

    question 
    opened by limaolin1981611 18
  • add sealice model

    add sealice model

    2021-06-21 5d629b2b julien introduced vertical mixing 2021-06-18 0160dcbf julien Debugging reader selafin the lice are now able to sense and move vertically There is a memory leak 2021-06-18 84afb9a7 julien Functional superindividuals actively swimming towards light and sinking at night 2021-06-17 f4f2a82e julien first successful loading no run yet 2021-06-16 260911ce julien Modification of variables in sea lice model minor other fiel editions 2021-06-16 4b1b1a66 julien New method for parametrisation Not working 2021-06-16 199dc25b julien use of add_config to setup the parameters Use the biomass in elements and compute the population based on proportions of the reference population (linear relation) 2021-06-16 266abf90 julien first try

    opened by gauteh 17
  • Adding Docker Builds and Deploy with CircleCI

    Adding Docker Builds and Deploy with CircleCI

    This pull request will update the CircleCI recipe to build containers for all of:

    • opendrift/opendrift (python 3 without oil)
    • opendrift/opendrift:py2 (python 2 without oil)
    • opendrift/opendrift-oil (python 2 with oil)

    Specifically, containers will be built (for preview and that the build is successful) on any PRs, and then merge to master will build and deploy the same.

    There's an entire namespace that includes python 2 / python 3, along with version, and these are printed in the CI and listed in the docker/README.md. I didn't get a chance to build these all locally because it would take a looong time (conda!) but thankfully we can use the parallel Circle workflow setup to run builds at the same time. This might need some tweaking, so I'm labeling as a WIP.

    I renamed the Dockerfile.oil to Dockerfile.oil.py2 in anticipation that some day we will have a Python 3 too :)

    Signed-off-by: Vanessa Sochat [email protected]

    opened by vsoch 17
  • URL Links for wind & ocean currents databases

    URL Links for wind & ocean currents databases

    Hi all,

    It should be quite obvious but I'm a beginner with OpenDrift, apologies! ... May someone tell me some URLs where I could download subsets for the zone and time I'm analyzing? Something similar to that: https://psl.noaa.gov/mddb2/makePlot.html?variableID=155703... but for U/V together in a nc file and for ocean currents

    Thanks a lot! Best regards,

    Sergio

    opened by ssosas 0
  • ChemicalDrift data tables

    ChemicalDrift data tables

    think we should move the data in

    def emission_factors(self, scrubber_type, chemical_compound):
    
    def init_chemical_compound(self, chemical_compound = None):
    

    out in a separate file, do you agree? what is the recommended format / way

    opened by manuelaghito 1
  • Issue with initial particle positions in backward mode

    Issue with initial particle positions in backward mode

    Hi Opendrift dev team @knutfrode @gauteh , I think we came across a bug that affects the initial (i.e. at t0) and following particle positions in backward simulations.

    We realized that by looking at the first timestep of our backward simulations (that use a one-off release) and noting that it wasn't the same as specified in seed_elements() (it looked like a step after the initial position specified). The problem doesn't seem to happen for forward simulations.

    I prepared a set of simple simulations with constant currents so the issue can be reproduced. test_initial_position_backwards_runs.zip

    Content is summarized below

    • test_FORWARD.py : run a few steps in forward time
    • test_BACKWARD.py : run a few steps in backward time
    • test_BACKWARD_output_step_equals_simulation_step.py : run a few steps in backward time using the output step equal to simulation step They each produce a netcdf file, and these were used to make the plots below. In these, I plot the first and following particle clouds at t0, t1, t2 etc... and overlay the release location. See how the first cloud of particle is does not fit with the release location in the second plot. Using an output step equal to simulation steps seems to fix the issue (third plot down).

    I'll have a go at stepping through the code to see where the issue might come from but I think you'll likely be much faster than me to pinpoint where it might come from !

    FORWARD

    BACKWARD

    BACKWARD_output_step_equals_simulation_step

    opened by simonweppe 5
  • Transitioning from one monthly ROMS input file to the next

    Transitioning from one monthly ROMS input file to the next

    Hi All

    I am playing around with using ROMS input files which are stored monthly. As my OpenDrift simulations can span multiple months, I am adding the required ROMS input files as separate readers i.e. one reader per calendar month. I encounter a problem when transitioning from one month to the next, when the time in the OpenDrift simulation is not actually covered by either file i.e. the last date of one file might be 2005-01-31 00:00:00 and the first time-step of the next file would be 2005-02-01 00:00:00, so neither reader covers the time between these two files, and so OpenDrift terminates at 2005-01-31 00:00:00.

    I am presently getting around this by using netcdf operators to add the first time-step of the each file to the end of the file for the previous month. This solves my problem, but I was wondering if there is another way around the problem without having to edit the input files? There are probably others out there who have tried to run simulations using multiple monthly ROMS input files?

    Thanks in advance! Giles

    opened by GilesFearon 2
  • OpenDrift simulation should consist of separate steps

    OpenDrift simulation should consist of separate steps

    • Data integrity: reduce chance of aliasing
      • Less chance of confusion
      • Can reuse init object, since it is not mutated by simulation
      • Since it can be reused it can be used for parallelization
    • Methods can only be run on a simulation that is in a valid state:
      • Plot is only meaningful on result (at least as it is)
    • Easier to separate data from functionality:
      • Result should (hopefully) have a single data member (xarray dataset?), with some convenience methods
    • Generic Analysis package can work on this data member, and thus be non-opendrift specific.
    • Less coupled code: maintenance should be easier and more fun!
    opened by gauteh 2
Owner
OpenDrift
OpenDrift is a software package for modeling the trajectories and fate of objects or substances drifting in the ocean, or even in the atmosphere.
OpenDrift
Detecting Underwater Objects (DUO)

Underwater object detection for robot picking has attracted a lot of interest. However, it is still an unsolved problem due to several challenges. We take steps towards making it more realistic by addressing the following challenges.

null 27 Dec 12, 2022
Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with Theano

PyMC3 is a Python package for Bayesian statistical modeling and Probabilistic Machine Learning focusing on advanced Markov chain Monte Carlo (MCMC) an

PyMC 7.2k Dec 30, 2022
Statsmodels: statistical modeling and econometrics in Python

About statsmodels statsmodels is a Python package that provides a complement to scipy for statistical computations including descriptive statistics an

statsmodels 8k Dec 29, 2022
BioMASS - A Python Framework for Modeling and Analysis of Signaling Systems

Mathematical modeling is a powerful method for the analysis of complex biological systems. Although there are many researches devoted on produ

BioMASS 22 Dec 27, 2022
We're Team Arson and we're using the power of predictive modeling to combat wildfires.

We're Team Arson and we're using the power of predictive modeling to combat wildfires. Arson Map Inspiration There’s been a lot of wildfires in Califo

Jerry Lee 3 Oct 17, 2021
A real data analysis and modeling project - restaurant inspections

A real data analysis and modeling project - restaurant inspections Jafar Pourbemany 9/27/2021 This project represents data analysis and modeling of re

Jafar Pourbemany 2 Aug 21, 2022
PyStan, a Python interface to Stan, a platform for statistical modeling. Documentation: https://pystan.readthedocs.io

PyStan PyStan is a Python interface to Stan, a package for Bayesian inference. Stan® is a state-of-the-art platform for statistical modeling and high-

Stan 229 Dec 29, 2022
A Python package for the mathematical modeling of infectious diseases via compartmental models

A Python package for the mathematical modeling of infectious diseases via compartmental models. Originally designed for epidemiologists, epispot can be adapted for almost any type of modeling scenario.

epispot 12 Dec 28, 2022
Flood modeling by 2D shallow water equation

hydraulicmodel Flood modeling by 2D shallow water equation. Refer to Hunter et al (2005), Bates et al. (2010). Diffusive wave approximation Local iner

null 6 Nov 30, 2022
PyNHD is a part of HyRiver software stack that is designed to aid in watershed analysis through web services.

A part of HyRiver software stack that provides access to NHD+ V2 data through NLDI and WaterData web services

Taher Chegini 23 Dec 14, 2022
Python-based Space Physics Environment Data Analysis Software

pySPEDAS pySPEDAS is an implementation of the SPEDAS framework for Python. The Space Physics Environment Data Analysis Software (SPEDAS) framework is

SPEDAS 98 Dec 22, 2022
CPSPEC is an astrophysical data reduction software for timing

CPSPEC manual Introduction CPSPEC is an astrophysical data reduction software for timing. Various timing properties, such as power spectra and cross s

Tenyo Kawamura 1 Oct 20, 2021
A Pythonic introduction to methods for scaling your data science and machine learning work to larger datasets and larger models, using the tools and APIs you know and love from the PyData stack (such as numpy, pandas, and scikit-learn).

This tutorial's purpose is to introduce Pythonistas to methods for scaling their data science and machine learning work to larger datasets and larger models, using the tools and APIs they know and love from the PyData stack (such as numpy, pandas, and scikit-learn).

Coiled 102 Nov 10, 2022
Python Library for learning (Structure and Parameter) and inference (Statistical and Causal) in Bayesian Networks.

pgmpy pgmpy is a python library for working with Probabilistic Graphical Models. Documentation and list of algorithms supported is at our official sit

pgmpy 2.2k Dec 25, 2022
🧪 Panel-Chemistry - exploratory data analysis and build powerful data and viz tools within the domain of Chemistry using Python and HoloViz Panel.

???? ??. The purpose of the panel-chemistry project is to make it really easy for you to do DATA ANALYSIS and build powerful DATA AND VIZ APPLICATIONS within the domain of Chemistry using using Python and HoloViz Panel.

Marc Skov Madsen 97 Dec 8, 2022
Created covid data pipeline using PySpark and MySQL that collected data stream from API and do some processing and store it into MYSQL database.

Created covid data pipeline using PySpark and MySQL that collected data stream from API and do some processing and store it into MYSQL database.

null 2 Nov 20, 2021
Pandas on AWS - Easy integration with Athena, Glue, Redshift, Timestream, QuickSight, Chime, CloudWatchLogs, DynamoDB, EMR, SecretManager, PostgreSQL, MySQL, SQLServer and S3 (Parquet, CSV, JSON and EXCEL).

AWS Data Wrangler Pandas on AWS Easy integration with Athena, Glue, Redshift, Timestream, QuickSight, Chime, CloudWatchLogs, DynamoDB, EMR, SecretMana

Amazon Web Services - Labs 3.3k Jan 4, 2023
First and foremost, we want dbt documentation to retain a DRY principle. Every time we repeat ourselves, we waste our time. Second, we want to understand column level lineage and automate impact analysis.

dbt-osmosis First and foremost, we want dbt documentation to retain a DRY principle. Every time we repeat ourselves, we waste our time. Second, we wan

Alexander Butler 150 Jan 6, 2023