Skip to content

Doing a plot only with currents (with no seeded elements) #1374

Answered by knutfrode
RodrigoCC11 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

You can plot a scalar field from a reader like this:
r.plot(variable='sea_water_temperature', time=datetime(2024, 8, 1, 12))
However, this does not yet support vector fields (e.g. current), and there is no reader method to create animations.

But you can make both plots and animations from a simulation object, after seeding an element that you can chose not to show:

from datetime import datetime, timedelta
from opendrift.models.oceandrift import OceanDrift

o = OceanDrift()
o.add_readers_from_list(['https://thredds.met.no/thredds/dodsC/sea/norkyst800m/1h/aggregate_be'])
o.seed_elements(lon=4, lat=60, time=datetime(2024, 8, 10))
o.run(time_step_output=timedelta(hours=1), end_time=dateti…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RodrigoCC11
Comment options

Answer selected by RodrigoCC11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants