OpenDrift / opendrift

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

simulation times that aren't in the hydrodynamic file #1112

Closed CaroMedel closed 1 year ago

CaroMedel commented 1 year ago

Hi,

When I run a simulation and select a start date that I know is not in my hydrodynamic file, Opendrift runs. The same happens if I run a simulation with a duration greater than the number of days contained in the hydrodynamic file.

I specify the start date like this: time = datetime(2019,2,28,18,0,0) o.seed_elements(lon=4.5, lat=60.0, z=z, radius=0, number=number, time=time)

I specify the duration of the simulation like this: o.run(duration=timedelta(days=5), time_step=time_step, outfile='output.nc')

Why is this happening? I thought that if it didn't find the specified date, Opendrift wouldn't run. What does it simulate on days where there is no hydrodynamic information?

Best, Caro

knutfrode commented 1 year ago

OpenDrift will interpolate forcing in time, but will not extrapolate outside of reader coverage. Fallback values will be used for variables whenever not None, otherwise particles are deactivated.

But the log (use loglevel=0) will tell you why simulation stopped.

CaroMedel commented 1 year ago

I see, reviewing the output files, the particles stopped their movement in the times in which there is no hydrodynamic information, but the simulation continues running without error and no message regarding time.

Thanks for your answer