OpenDrift / opendrift

Open source framework for ocean trajectory modelling
https://opendrift.github.io
GNU General Public License v2.0
249 stars 120 forks source link

How did I find 'opendrift_landmask_data'? It's missing #403

Closed huseinalfarizi closed 3 years ago

huseinalfarizi commented 4 years ago

ImportError Traceback (most recent call last)

in ----> 1 lw.run(duration=timedelta(hours=48), time_step=900, time_step_output=3600) C:\Windows\System32\opendrift\opendrift\models\basemodel.py in run(self, time_step, steps, time_step_output, duration, end_time, outfile, export_variables, export_buffer_length, stop_on_error) 2227 'Adding a customised landmask may be faster...' % self.max_speed) 2228 self.timer_start('preparing main loop:making dynamical landmask') -> 2229 from opendrift.readers import reader_global_landmask 2230 reader_landmask = reader_global_landmask.Reader(extent = simulation_extent) 2231 self.add_reader(reader_landmask) C:\Windows\System32\opendrift\opendrift\readers\reader_global_landmask.py in 16 17 from opendrift.readers.basereader import BaseReader ---> 18 from opendrift_landmask_data import Landmask 19 20 import warnings ImportError: cannot import name 'Landmask' from 'opendrift_landmask_data' (unknown location)
knutfrode commented 4 years ago

There seem to be some problem with your installation. Did you follow this recipe? https://opendrift.github.io/install.html And did you remember to activate the opendrift environment?

It could also be that you need to update your local environment with:

conda env update -f environment.yml
huseinalfarizi commented 4 years ago

I installed it according to the instructions using git cloning and conda, and I have updated the environment but it still have the same issue. Fortunately I can resolve it with manual cloning from https://github.com/OpenDrift/opendrift-landmask-data master and modified some path. It is working now. This is great, I'm new on this thing, can I make this model with my own dataset? and how I setting the script or configuration? Thank you

knutfrode commented 4 years ago

Ok, I am not sure why this was necessary, but good that it works at last.

To get started, the best is to read through the turtorial, and study and modify the example scripts: https://opendrift.github.io/tutorial.html https://opendrift.github.io/gallery/index.html

huseinalfarizi commented 4 years ago

Thank you very much