Replies: 2 comments
-
It seems there is something wrong with your installation. Did you follow the steps on https://opendrift.github.io/install.html ? It is probably best to not make any modifications in basemodel.py, or any of the core files. To test your installation, you can run |
Beta Was this translation helpful? Give feedback.
-
Thank you for getting back to me. when I run pytest from miniconda prompt, I get error - """ I am using python version - 3.11.0 |
Beta Was this translation helpful? Give feedback.
-
Hello Team,
I am trying to learn particle modeling. I am trying to replicate the example 'river runoff'.
"""
import os
from datetime import datetime, timedelta
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.dates import DateFormatter
import opendrift
from opendrift.models.oceandrift import OceanDrift
from opendrift.readers import reader_oscillating
outfile = 'runoff.nc' # Raw simulation output
histogram_file = 'runoff_histogram.nc'
o = OceanDrift(loglevel=20)
"""
Error :
12:08:12 INFO opendrift.models.basemodel:241: Could not import iomodule netcdf
Traceback (most recent call last):
Cell In[4], line 17
o = OceanDrift(loglevel=20)
File C:\opendrift\opendrift\models\oceandrift.py:115 in init
super(OceanDrift, self).init(*args, **kwargs)
File C:\opendrift\opendrift\models\basemodel.py:242 in init
self.io_init = types.MethodType(io_module.init, self)
UnboundLocalError: cannot access local variable 'io_module' where it is not associated with a value.
In basemodel.py file, I tried to assign a value for 'io_module ' variable. Still I am facing error.
Beta Was this translation helpful? Give feedback.
All reactions